Bug 250623

Summary: [EWS] clean-up-git-repo step tries to delete invalid branches
Product: WebKit Reporter: David Kilzer (:ddkilzer) <ddkilzer>
Component: Tools / TestsAssignee: David Kilzer (:ddkilzer) <ddkilzer>
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   
See Also: https://bugs.webkit.org/show_bug.cgi?id=251211

Description David Kilzer (:ddkilzer) 2023-01-14 09:13:37 PST
[EWS] clean-up-git-repo step tries to delete invalid branches:

```
/bin/sh -c 'git branch | grep -v '"'"' main$'"'"' | xargs git branch -D || true'
 in dir /Volumes/Data/worker/iOS-16-Build-EWS/build (timeout 300 secs)
 watching logfiles {}
 argv: [b'/bin/sh', b'-c', b"git branch | grep -v ' main$' | xargs git branch -D || true"]
 using PTY: False
error: branch '*' not found.
error: branch '(HEAD' not found.
error: branch 'detached' not found.
error: branch 'at' not found.
error: branch 'origin/main)' not found.
Deleted branch fix171805-svg-textLength (was 78a3a1afebe9).
program finished with exit code 0
elapsedTime=0.099196
```

Example:  <https://ews-build.webkit.org/#/builders/77/builds/12461>
Comment 1 David Kilzer (:ddkilzer) 2023-01-14 09:14:26 PST
Maybe the step should do something like `git checkout main` first before running this command?
Comment 2 Radar WebKit Bug Importer 2023-01-21 10:08:22 PST
<rdar://problem/104512536>
Comment 3 David Kilzer (:ddkilzer) 2023-08-20 10:21:27 PDT
Pull request: https://github.com/WebKit/WebKit/pull/16877
Comment 4 EWS 2023-08-21 09:21:16 PDT
Committed 267090@main (318e60ffceea): <https://commits.webkit.org/267090@main>

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