Bug 224444 - Make Commit Queue robust by adding few git commands to clean up repository
Summary: Make Commit Queue robust by adding few git commands to clean up repository
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Aakash Jain
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-04-12 12:07 PDT by Aakash Jain
Modified: 2021-04-12 17:49 PDT (History)
5 users (show)

See Also:


Attachments
Patch (9.16 KB, patch)
2021-04-12 12:15 PDT, Aakash Jain
no flags Details | Formatted Diff | Diff
[fast-cq] Patch (9.17 KB, patch)
2021-04-12 16:28 PDT, Aakash Jain
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>