Bug 252711 - [WPE] built-product-archive should not unconditionally include the Tools and Source directories
Summary: [WPE] built-product-archive should not unconditionally include the Tools and ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WPE WebKit (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Carlos Alberto Lopez Perez
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-21 17:50 PST by Carlos Alberto Lopez Perez
Modified: 2023-02-22 04:19 PST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Alberto Lopez Perez 2023-02-21 17:50:30 PST
This is a funny bug.

I discovered it when deploying the new upcoming WPE EWS queue (see bug 250706)

All the bots were failing to build without patch (step: compile-webkit-without-change)

Example: https://ews-build.webkit.org/#/builders/86/builds/37/steps/31/logs/stdio


This is because this layout-test EWS bots do the following (very summarized).

1) Download and un-compress the built-product from the build-only EWS bot
2) Run layout tests
3) if there are unexpected failures, unapply patch and build WebKit without patch.


And the issue here is that the build-products that the build-only EWS bots were generating included some stamp files like:

./Tools/cog-prefix/src/cog-stamp/cog-gitclone-lastrun.txt
./Tools/cog-prefix/src/cog-stamp/cog-patch
./Tools/cog-prefix/src/cog-stamp/cog-build
./Tools/cog-prefix/src/cog-stamp/cog-done
./Tools/cog-prefix/src/cog-stamp/cog-configure
./Tools/cog-prefix/src/cog-stamp/cog-gitinfo.txt
./Tools/cog-prefix/src/cog-stamp/cog-install
./Tools/cog-prefix/src/cog-stamp/cog-mkdir
./Tools/cog-prefix/src/cog-stamp/cog-download


So this caused that when CMake tried to re-build without patch it skipped the step 'cog gitclone' and since the bots were recently deployed it didn't had a cog clone from a previous run.

This can be easily reproduced as follows:


works:
 rm -fr Tools/wpe/cog WebKitBuild/WPE/Release/
 Tools/Scripts/build-webkit --wpe --release

fails:
 rm -fr Tools/wpe/cog WebKitBuild/WPE/Release/
 python3 Tools/CISupport/download-built-product --release https://s3-us-west-2.amazonaws.com/ews-archives.webkit.org/wpe-x86_64-release/8c3872d5.zip
 python3 Tools/CISupport/built-product-archive --platform=wpe --release extract
 Tools/Scripts/build-webkit --wpe --release


[6980/7234] Performing download step (git clone) for 'cog'
-- Avoiding repeated git clone, stamp file is up to date: '/app/webkit/WebKitBuild/Release/Tools/cog-prefix/src/cog-stamp/cog-gitclone-lastrun.txt'
[6981/7234] Performing update step for 'cog'
FAILED: Tools/cog-prefix/src/cog-stamp/cog-update /app/webkit/WebKitBuild/Release/Tools/cog-prefix/src/cog-stamp/cog-update 
cd /app/webkit/Tools/wpe/cog && /usr/bin/cmake -P /app/webkit/WebKitBuild/Release/Tools/cog-prefix/tmp/cog-gitupdate.cmake
CMake Error at /app/webkit/WebKitBuild/Release/Tools/cog-prefix/tmp/cog-gitupdate.cmake:25 (message):
  Failed to get the hash for HEAD:
  fatal: not a git repository: '.git'
Comment 1 Carlos Alberto Lopez Perez 2023-02-21 18:34:07 PST
Pull request: https://github.com/WebKit/WebKit/pull/10487
Comment 2 EWS 2023-02-22 04:19:34 PST
Committed 260672@main (7093ddf8f134): <https://commits.webkit.org/260672@main>

Reviewed commits have been landed. Closing PR #10487 and removing active labels.