Commit e0b0476
Skip missing upstream branches in scheduled build (#382)
## Summary
The hourly **Scheduled** workflow has been failing on every run because
`branches.yaml` lists branches that don't (yet) exist on the upstream
repo — most recently `geth/bal-devnet-7`. Each failure also pings
Discord, so the signal-to-noise on real breakages is poor.
### Root cause
`process_commits` in `.github/workflows/scheduled.yml` already detects a
missing upstream ref via the GitHub API and logs:
```
[LINE:28] Error fetching commit hash for ethereum/go-ethereum#bal-devnet-7, skipping.
```
…but the downstream loops still iterate over **every** config in
`config.yaml`. For the missing entry:
1. `COMMIT_HASH` comes back empty.
2. The Docker Hub check queries the malformed image
`ethpandaops/geth:bal-devnet-7-` (trailing dash).
3. That tag (unsurprisingly) doesn't exist, so the entry is classified
as "needs build" and added to the deploy matrix.
4. The deploy job fails at `actions/checkout` with `A branch or tag with
the name 'bal-devnet-7' could not be found`.
Confirmed against the latest run (`gh run 26026938948`).
### Fix
Two narrow changes inside the `check` job:
- **Docker Hub existence loop** — `continue` when `COMMIT_HASH` is
empty/null. Avoids wasted Docker Hub queries against malformed tags.
- **Build-config generation loop** — same skip, plus a `::warning::`
annotation and a row appended to `$GITHUB_STEP_SUMMARY` (under a `##
Skipped builds (upstream ref missing)` heading written once).
The workflow stays green, the Discord notification step (`if:
cancelled() || failure()`) no longer fires for missing-branch noise, and
every skipped branch is plainly visible on the run page.
### Self-healing
No state is persisted. The moment the branch is pushed upstream, the
GitHub API returns a SHA on the next hourly cron → `COMMIT_HASH` is
non-empty → the skip branch isn't taken → Docker Hub reports the proper
`<tag>-<sha>` image missing → the build runs and pushes normally. No
manual intervention needed when the branch reappears.
## Test plan
- [ ] Trigger `gh workflow run scheduled.yml` after merge.
- [ ] Confirm the run is green even though `geth/bal-devnet-7` is still
missing upstream.
- [ ] Confirm a `::warning::` annotation appears on the run page for the
missing entry.
- [ ] Confirm the run summary contains a `Skipped builds (upstream ref
missing)` table listing the geth row (and any others).
- [ ] Confirm an existing branch (e.g. `geth/master`) still builds
normally if its image is missing on Docker Hub.
- [ ] Confirm no Discord notification fires for the skipped entries.
Co-authored-by: Barnabas Busa <busa.barnabas@gmail.com>1 parent e3310e7 commit e0b0476
1 file changed
Lines changed: 23 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
169 | 174 | | |
170 | 175 | | |
171 | 176 | | |
| |||
195 | 200 | | |
196 | 201 | | |
197 | 202 | | |
| 203 | + | |
198 | 204 | | |
199 | 205 | | |
200 | 206 | | |
201 | 207 | | |
202 | 208 | | |
203 | 209 | | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
204 | 227 | | |
205 | 228 | | |
206 | 229 | | |
| |||
0 commit comments