Skip to content

publish-verify: bound the scheduled sweep; report a timed-out sweep - #1291

Merged
bpalermo merged 1 commit into
upgrade/publish-verify-sweep-supersededfrom
upgrade/publish-verify-sweep-bound
Oct 6, 2026
Merged

bpalermo merged 1 commit into
upgrade/publish-verify-sweep-supersededfrom
upgrade/publish-verify-sweep-bound

Conversation

@bpalermo

@bpalermo bpalermo commented Oct 5, 2026

Copy link
Copy Markdown
Owner

Stacked on the superseded-head PR (#1282).

Why the sweep timed out

Three scheduled sweeps in a row (37243212359, 37269704858, 37328769954) hit the 30-minute job limit during the cosign step and concluded cancelled. The issue step only reacted to failure(), so none of them reported anything, and the backstop verified nothing from 10-04 23:17 to 10-05 22:44.

The cause, measured from the run logs: every sweep re-read the whole last day of push heads, so each head was looked up and cosign-verified at ~11 of the day's 12 sweeps. One sweep's cost therefore grew with the day's merges. Per head the sweep does 44 registry lookups and 27 cosign verifications (9 images × index + 2 children). The digests are commit-stamped, so there was nothing to dedupe.

sweep heads gate (lookups) cosign total
10-02 19:23 5 1m44 ~3m20 5m27
10-04 15:25 40 11m57 (18 s/head) 1089 verified, ~17m (0.96 s each) 29m42, passed by 18 s
10-04 23:17 34 13m24 (24 s/head) cut off cancelled
10-05 14:56 22 18m45 (51 s/head) 238 of ~600 in 10m05 (2.5 s each) cancelled

The logs show no 429 (curl --retry 2 would hide one). On 10-05 the same work ran ~2.6× slower per request against quay.io. The timeouts came from a head count that tracked a busy day, multiplied by registry latency, against a fixed limit.

What changed

  • Bound the head set. When RECENT_SINCE_LAST_GREEN=1 is set (the workflow sets it on the gate step), --recent starts reading at the start of the last green scheduled sweep, minus the 2 h grace, minus a 30 min overlap. That sweep already verified every head older than that point. It never reads further back than the full day. With no green sweep on record, or an unparsable or future timestamp, it reads the full day (fail closed). In steady state a sweep covers ~2.5 h of heads instead of ~22 h, and each head is verified about twice. See sweep_since and github_last_green_sweep in scripts/push-heads-lib.sh. A hand-run make check-published is unchanged (opt-in, because the math needs GNU date).
  • An overrun reports. The gate and cosign steps get timeout-minutes: 20, so an overrun fails a step and the issue step reports it. The issue step also runs on cancelled(), to cover the job limit (now 50 = 2 × 20 + setup/reporting). When no MISSING or UNVERIFIED line was recorded, the body leads with "publish-verify did not finish … UNVERIFIED" and names the gate and cosign conclusions, instead of "(see the run log)" under a "missing artifacts" lead. It is still the same one rolling issue.
  • Header comments and docs/runbook.md updated.

Untouched: what the workflow checks out (ref: main), its permissions, publish.yaml, proxy-release.yml. CodeQL will likely re-raise the known actions/untrusted-checkout false positive on this file. It is left for the owner to dismiss.

Proof

  • bazel test //scripts/...: 4/4 pass, including the new //scripts:sweep_since_test (9 cases: anchored window, clamped to the day, fail-closed on none, unparsable or future timestamps, and the LAST_GREEN_SWEEP override including set-but-empty).
  • make actionlint clean; lint with fail_on_violation clean; make format-check clean.
  • Sweep timing and the dispatch result are in the PR comments.

Closes #1281

🤖 Generated with Claude Code

https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr

Three scheduled sweeps in a row (37243212359, 37269704858, 37328769954)
hit the 30-minute job limit in the cosign step, concluded `cancelled`, and
the issue step (failure() only) stayed silent: the backstop verified
nothing from 2026-10-04 23:17 until 10-05 22:44.

Why it got slow: every sweep re-read the full last day of push heads, so
each head was looked up and cosign-verified at ~11 sweeps, and a sweep's
cost grew with the day's merges. Per head: 44 registry lookups + 27 cosign
verifications (9 images x index + 2 children; digests are commit-stamped,
nothing to dedupe).
  10-02 19:23   5 heads   gate 1m44  cosign 3m21     5m27 total
  10-04 15:25  40 heads   gate 11m57 (18 s/head) cosign 17m18 (0.96 s
               each, 1089)                         29m42 (passed by 18 s)
  10-04 23:17  34 heads   gate 13m24 (24 s/head), cosign cut off  cancelled
  10-05 14:56  22 heads   gate 18m45 (51 s/head), cosign 238 of ~600 in
               10m05 (2.5 s each)                  cancelled
No 429 in the logs (curl --retry 2 would hide one); the 10-05 runs show
the same work ~2.6x slower per request on quay.io. So: a head count that
tracked a busy day, multiplied by registry latency, against a fixed limit.

The fix bounds the head set: with RECENT_SINCE_LAST_GREEN=1 (set by the
workflow) --recent reads from the last green SCHEDULED sweep's start minus
the grace period minus a 30-minute overlap -- that sweep verified every
head older than that -- and never further back than the full day. No
green sweep on record, or an unparsable/future timestamp, reads the full
day (sweep_since; //scripts:sweep_since_test). Steady state: ~2.5 h of
heads per sweep instead of ~22 h, so each head is verified about twice.

Reporting: the gate and cosign steps get timeout-minutes: 20, so an
overrun fails a step and the issue step reports it; the issue step also
runs on cancelled() for the job limit (now 50: 2 x 20 + setup and
reporting). When no MISSING/UNVERIFIED line was recorded the rolling
issue's body says the check did not finish and names the gate/cosign
conclusions, instead of "(see the run log)" under a "missing artifacts"
lead. Same one rolling issue.

Closes #1281

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
@bpalermo
bpalermo force-pushed the upgrade/publish-verify-sweep-bound branch from b9845a2 to ee6e514 Compare October 6, 2026 00:16
bpalermo added a commit that referenced this pull request Oct 6, 2026
The `gateway-http` and `mesh-http` jobs repeated the same 16 steps, and the
"Check formatting" block was duplicated between ci.yaml's `format` and
proxy.yml's `lint`. Both now live in composite actions, in the style of
run-e2e-script/setup-kind (#1261/#1262).

- .github/actions/run-conformance holds the pinned Go (#1283), the images
  artifact, setup-kind with the cluster, cloud-provider-kind (opt-in),
  the Gateway API + aether CRDs, `helm install` (suite `--set` values plus
  the shared image overrides), readiness, the gateway-api checkout, the
  suite run, the report upload, diagnostics and cleanup. Inputs cover
  what differs: profile, suite, cluster name, gateway-api version, helm
  values, readiness script, report file and artifact, logs dir and
  artifact, diagnostics, logs-when, soft.
- Kept as before: job ids, `if:`/`only=` dispatch, timeouts (90m),
  report-failure's needs, the artifact names (gateway-http- and
  mesh-http-conformance-report, conformance-logs, mesh-conformance-logs)
  and the report file names. Also kept: each suite's diagnostics, and
  mesh-http collecting and uploading its logs on every run
  (`logs-when: always`) while gateway-http does so only on failure.
- The suite step now prints `go version` first, as evidence of the
  toolchain.
- .github/actions/format-check: the //:format.check run plus the
  language-set assertion (#853), with the expected languages as input
  (ci.yaml: Starlark, Go, Shell, Protocol Buffer; proxy.yml: Starlark,
  Shell). An empty input fails instead of asserting nothing.
- //e2e:kind_pin_test check 7 now also covers composite actions: one
  that drives kind must use setup-kind. A job that calls run-conformance
  no longer has a kind command of its own. //e2e:go_pin_test scans only
  an action's `runs:` block, because input descriptions mention
  `go test`. Both were seen red with setup-go/setup-kind removed from
  run-conformance.
- publish-verify.yaml: correct the stale comment that named main.yaml's
  `diff` as the only root repository-cache saver (ci.yaml's `diff` saves
  too). This edit was taken because #1291 changes that file at the same time.

e2e.yaml: 824 -> 582 lines (800 on main before #1283).

Closes #1286

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
@bpalermo
bpalermo merged commit 178b975 into main Oct 6, 2026
44 checks passed
@bpalermo
bpalermo deleted the upgrade/publish-verify-sweep-bound branch October 6, 2026 00:26
bpalermo added a commit that referenced this pull request Oct 6, 2026
The `gateway-http` and `mesh-http` jobs repeated the same 16 steps, and the
"Check formatting" block was duplicated between ci.yaml's `format` and
proxy.yml's `lint`. Both now live in composite actions, in the style of
run-e2e-script/setup-kind (#1261/#1262).

- .github/actions/run-conformance holds the pinned Go (#1283), the images
  artifact, setup-kind with the cluster, cloud-provider-kind (opt-in),
  the Gateway API + aether CRDs, `helm install` (suite `--set` values plus
  the shared image overrides), readiness, the gateway-api checkout, the
  suite run, the report upload, diagnostics and cleanup. Inputs cover
  what differs: profile, suite, cluster name, gateway-api version, helm
  values, readiness script, report file and artifact, logs dir and
  artifact, diagnostics, logs-when, soft.
- Kept as before: job ids, `if:`/`only=` dispatch, timeouts (90m),
  report-failure's needs, the artifact names (gateway-http- and
  mesh-http-conformance-report, conformance-logs, mesh-conformance-logs)
  and the report file names. Also kept: each suite's diagnostics, and
  mesh-http collecting and uploading its logs on every run
  (`logs-when: always`) while gateway-http does so only on failure.
- The suite step now prints `go version` first, as evidence of the
  toolchain.
- .github/actions/format-check: the //:format.check run plus the
  language-set assertion (#853), with the expected languages as input
  (ci.yaml: Starlark, Go, Shell, Protocol Buffer; proxy.yml: Starlark,
  Shell). An empty input fails instead of asserting nothing.
- //e2e:kind_pin_test check 7 now also covers composite actions: one
  that drives kind must use setup-kind. A job that calls run-conformance
  no longer has a kind command of its own. //e2e:go_pin_test scans only
  an action's `runs:` block, because input descriptions mention
  `go test`. Both were seen red with setup-go/setup-kind removed from
  run-conformance.
- publish-verify.yaml: correct the stale comment that named main.yaml's
  `diff` as the only root repository-cache saver (ci.yaml's `diff` saves
  too). This edit was taken because #1291 changes that file at the same time.

e2e.yaml: 824 -> 582 lines (800 on main before #1283).

Closes #1286

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
bpalermo added a commit that referenced this pull request Oct 6, 2026
The `gateway-http` and `mesh-http` jobs repeated the same 16 steps, and the
"Check formatting" block was duplicated between ci.yaml's `format` and
proxy.yml's `lint`. Both now live in composite actions, in the style of
run-e2e-script/setup-kind (#1261/#1262).

- .github/actions/run-conformance holds the pinned Go (#1283), the images
  artifact, setup-kind with the cluster, cloud-provider-kind (opt-in),
  the Gateway API + aether CRDs, `helm install` (suite `--set` values plus
  the shared image overrides), readiness, the gateway-api checkout, the
  suite run, the report upload, diagnostics and cleanup. Inputs cover
  what differs: profile, suite, cluster name, gateway-api version, helm
  values, readiness script, report file and artifact, logs dir and
  artifact, diagnostics, logs-when, soft.
- Kept as before: job ids, `if:`/`only=` dispatch, timeouts (90m),
  report-failure's needs, the artifact names (gateway-http- and
  mesh-http-conformance-report, conformance-logs, mesh-conformance-logs)
  and the report file names. Also kept: each suite's diagnostics, and
  mesh-http collecting and uploading its logs on every run
  (`logs-when: always`) while gateway-http does so only on failure.
- The suite step now prints `go version` first, as evidence of the
  toolchain.
- .github/actions/format-check: the //:format.check run plus the
  language-set assertion (#853), with the expected languages as input
  (ci.yaml: Starlark, Go, Shell, Protocol Buffer; proxy.yml: Starlark,
  Shell). An empty input fails instead of asserting nothing.
- //e2e:kind_pin_test check 7 now also covers composite actions: one
  that drives kind must use setup-kind. A job that calls run-conformance
  no longer has a kind command of its own. //e2e:go_pin_test scans only
  an action's `runs:` block, because input descriptions mention
  `go test`. Both were seen red with setup-go/setup-kind removed from
  run-conformance.
- publish-verify.yaml: correct the stale comment that named main.yaml's
  `diff` as the only root repository-cache saver (ci.yaml's `diff` saves
  too). This edit was taken because #1291 changes that file at the same time.

e2e.yaml: 824 -> 582 lines (800 on main before #1283).

Closes #1286

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
bpalermo added a commit that referenced this pull request Oct 6, 2026
The `gateway-http` and `mesh-http` jobs repeated the same 16 steps, and the
"Check formatting" block was duplicated between ci.yaml's `format` and
proxy.yml's `lint`. Both now live in composite actions, in the style of
run-e2e-script/setup-kind (#1261/#1262).

- .github/actions/run-conformance holds the pinned Go (#1283), the images
  artifact, setup-kind with the cluster, cloud-provider-kind (opt-in),
  the Gateway API + aether CRDs, `helm install` (suite `--set` values plus
  the shared image overrides), readiness, the gateway-api checkout, the
  suite run, the report upload, diagnostics and cleanup. Inputs cover
  what differs: profile, suite, cluster name, gateway-api version, helm
  values, readiness script, report file and artifact, logs dir and
  artifact, diagnostics, logs-when, soft.
- Kept as before: job ids, `if:`/`only=` dispatch, timeouts (90m),
  report-failure's needs, the artifact names (gateway-http- and
  mesh-http-conformance-report, conformance-logs, mesh-conformance-logs)
  and the report file names. Also kept: each suite's diagnostics, and
  mesh-http collecting and uploading its logs on every run
  (`logs-when: always`) while gateway-http does so only on failure.
- The suite step now prints `go version` first, as evidence of the
  toolchain.
- .github/actions/format-check: the //:format.check run plus the
  language-set assertion (#853), with the expected languages as input
  (ci.yaml: Starlark, Go, Shell, Protocol Buffer; proxy.yml: Starlark,
  Shell). An empty input fails instead of asserting nothing.
- //e2e:kind_pin_test check 7 now also covers composite actions: one
  that drives kind must use setup-kind. A job that calls run-conformance
  no longer has a kind command of its own. //e2e:go_pin_test scans only
  an action's `runs:` block, because input descriptions mention
  `go test`. Both were seen red with setup-go/setup-kind removed from
  run-conformance.
- publish-verify.yaml: correct the stale comment that named main.yaml's
  `diff` as the only root repository-cache saver (ci.yaml's `diff` saves
  too). This edit was taken because #1291 changes that file at the same time.

e2e.yaml: 824 -> 582 lines (800 on main before #1283).

Closes #1286


Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr

Co-authored-by: Claude Fable 5.1 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci: the scheduled publish-verify sweep has timed out three times in a row — the backstop is silently off

1 participant