Skip to content

fix(release): add release-assets completeness gate (GH-4523)#4524

Merged
alekspetrov merged 1 commit into
mainfrom
pilot/GH-4523
Jul 24, 2026
Merged

fix(release): add release-assets completeness gate (GH-4523)#4524
alekspetrov merged 1 commit into
mainfrom
pilot/GH-4523

Conversation

@alekspetrov

Copy link
Copy Markdown
Collaborator

Summary

GH-4523 reported v2.245.1's GitHub release missing pilot-linux-{amd64,arm64}.tar.gz, which the S2 hosted-instance bootstrap (pilot-console S3 bridge) and the AWS box self-upgrade both depend on.

Root cause

Investigated against ground truth:

  • gh release view v2.245.1 shows all 10 expected assets present today, including both linux tarballs.
  • The goreleaser workflow run for that tag (30014298612, 2026-07-23T14:06:55Z) shows in its own logs that pilot-linux-amd64.tar.gz and pilot-linux-arm64.tar.gz were built and uploaded successfully at 14:09:16Z.
  • There was only one workflow run for the v2.245.1 tag (no retries/re-runs), and all release assets share the same upload timestamp window (14:09–14:10Z) from that single run.

So the reported symptom did not reproduce from the pipeline's own logs or the release's current state — most likely the observation happened during the ~90s upload window or hit a transient GitHub API/UI propagation delay. Regardless of the exact trigger, the pipeline had no automated check that would catch a genuinely incomplete release (partial goreleaser matrix, a swallowed upload failure, API listing lag), so that entire class of bug was invisible until a downstream consumer broke (today's S2 e2e had to fall back to v2.245.0).

Fix

  • Added scripts/verify-release-assets.sh <tag>: checks that every asset named in .goreleaser.yaml's build/archive matrix (pilot-{linux,darwin}-{amd64,arm64}.tar.gz, pilot-windows-amd64.zip, checksums.txt) exists on the tag's GitHub release, retrying up to 5x with backoff to absorb any listing lag.
  • Wired it into .github/workflows/release.yml as a "Verify release assets" step immediately after the GoReleaser step — fails the job (and the release train) loudly if anything is missing.
  • Desktop bundles are intentionally excluded from this gate since release-desktop.yml is a separate, slower workflow that can finish after release.yml.
  • Documented the investigation + design in .agent/sops/operations/release-asset-completeness-gate.md and added a FEATURE-MATRIX.md row.

Test plan

  • go build ./... passes (no Go changes, sanity check only)
  • Ran scripts/verify-release-assets.sh v2.245.1 locally against the real release — passes, confirms all 6 expected assets present
  • Ran a modified copy against a nonexistent tag — fails loudly with exit code 1 and a clear missing-assets report
  • scripts/check-secret-patterns.sh passes
  • YAML validated (python3 -c "import yaml; yaml.safe_load(...)")

v2.245.1's GitHub release was reported missing pilot-linux-{amd64,arm64}.tar.gz,
which the S2 hosted-instance bootstrap and AWS box self-upgrade both depend on.

Root cause: investigated against ground truth (goreleaser workflow run
30014298612 and the live v2.245.1 release) — the linux archives were in fact
built and uploaded by that run and are present on the release today, so the
reported symptom did not reproduce from the pipeline's own logs. Regardless,
the pipeline had no automated check that would catch a genuinely incomplete
release (partial matrix, swallowed upload failure, API listing lag), so the
failure class was invisible until a downstream consumer broke.

Add scripts/verify-release-assets.sh, wired into release.yml right after the
GoReleaser step: asserts every asset in the .goreleaser.yaml build/archive
matrix exists on the tag's release (with retry/backoff for listing lag),
failing the release train loudly on any miss.
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@alekspetrov
alekspetrov merged commit bb699e7 into main Jul 24, 2026
5 checks passed
@alekspetrov
alekspetrov deleted the pilot/GH-4523 branch July 24, 2026 09:07
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.

2 participants