Bug 224444

Summary: Make Commit Queue robust by adding few git commands to clean up repository
Product: WebKit Reporter: Aakash Jain <aakash_jain>
Component: Tools / TestsAssignee: Aakash Jain <aakash_jain>
Status: RESOLVED FIXED    
Severity: Normal CC: aakash_jain, ap, jbedard, ryanhaddad, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
[fast-cq] Patch none

Description Aakash Jain 2021-04-12 12:07:03 PDT
Make Commit Queue robust against various issues by adding few git commands to clean up repository.
Comment 1 Aakash Jain 2021-04-12 12:15:26 PDT
Created attachment 425772 [details]
Patch
Comment 2 Aakash Jain 2021-04-12 12:15:58 PDT
Sample run (for this step): https://ews-build.webkit-uat.org/#/builders/26/builds/1731
Comment 3 Jonathan Bedard 2021-04-12 13:05:40 PDT
Comment on attachment 425772 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=425772&action=review

> Tools/CISupport/ews-build/steps.py:3141
> +                    ['git', 'checkout', 'origin/main', '-b', 'main']]

What lead to this sequence of commands? The -D (delete local branch), in particular, seems suspect
Comment 4 Alexey Proskuryakov 2021-04-12 14:30:19 PDT
See Tools/EWSTools/start-queue-mac.sh:

# This somewhat quirky sequence of steps seems to clear up all the broken
# git situations we've gotten ourself into in the past.
git clean -f # Remove any left-over layout test results, added files, etc.
git rebase --abort # If we got killed during a git rebase, we need to clean up.
git fetch origin # Avoid updating the working copy to a stale revision.
git checkout origin/master -f
git branch -D master
git checkout origin/master -b master

We should have a similar comment, or maybe even have comments in both places saying that we want to keep these in sync.
Comment 5 Aakash Jain 2021-04-12 16:28:05 PDT
Created attachment 425808 [details]
[fast-cq] Patch
Comment 6 Aakash Jain 2021-04-12 16:34:02 PDT
(In reply to Alexey Proskuryakov from comment #4)
> We should have a similar comment, or maybe even have comments in both places saying that we want to keep these in sync.
Added similar comment in updated patch. Deleting the old EWS scripts in Bug 224460.

Also removed 'git rebase --abort' command since buildbot doesn't perform rebase anywhere, and we also do not perform rebase in our buildbot configuration.
Comment 7 Aakash Jain 2021-04-12 16:37:30 PDT
Sample run: https://ews-build.webkit-uat.org/#/builders/26/builds/1735
Comment 8 EWS 2021-04-12 17:48:24 PDT
Committed r275853 (236418@main): <https://commits.webkit.org/236418@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 425808 [details].
Comment 9 Radar WebKit Bug Importer 2021-04-12 17:49:12 PDT
<rdar://problem/76567390>