Repository navigation
ate-setup: retry each ko release image with backoff - #3446
Merged
Benjamin Elder (BenTheElder) merged 2 commits intoOct 29, 2026
Merged
Benjamin Elder (BenTheElder) merged 2 commits into
Benjamin Elder (BenTheElder) merged 2 commits into
Conversation
Anna Pendleton (annapendleton)
force-pushed
the
release-images-retry
branch
from
October 29, 2026 18:50
df959c3 to
9dceedf
Compare
Anna Pendleton (annapendleton)
requested review from
Lior Lieberman (LiorLieberman) and
Grant McCloskey (MushuEE)
October 29, 2026 18:52
Lior Lieberman (LiorLieberman)
left a comment
Collaborator
There was a problem hiding this comment.
can we do the retry within the "publish release-images" script? will be nicer than running the workflow again and more targeted to amend/remove later
Anna Pendleton (annapendleton)
force-pushed
the
release-images-retry
branch
from
October 29, 2026 19:00
9dceedf to
ccddc82
Compare
Lior Lieberman (LiorLieberman)
previously approved these changes
Oct 29, 2026
Lior Lieberman (LiorLieberman)
left a comment
Collaborator
There was a problem hiding this comment.
approving to unblock first relrease - will revisit before it we ship something like this at main
Anna Pendleton (annapendleton)
changed the base branch from
release-1.0
to
main
October 29, 2026 19:31
Anna Pendleton (annapendleton)
force-pushed
the
release-images-retry
branch
from
October 29, 2026 19:31
cb379b7 to
90b856c
Compare
Build each ko image in its own ko run and retry only that image if it fails: up to 3 attempts, waiting 10s then 20s, logging each error. ghcr.io can briefly deny pushes to a package it has just created. Signed-off-by: Anna Pendleton <[email protected]>
Anna Pendleton (annapendleton)
force-pushed
the
release-images-retry
branch
from
October 29, 2026 19:31
90b856c to
3bc51a7
Compare
Grant McCloskey (MushuEE)
approved these changes
Oct 29, 2026
Grant McCloskey (MushuEE)
left a comment
Collaborator
There was a problem hiding this comment.
[This is not blocking for this review - bias to merge for rc1]
- The test swaps a package global. Tests replace var wait. AGENTS.md says not to add package globals just so tests can swap behavior. The wait could live on Runner or come from Retry instead.
- It retries every error, not just the denial. A compile error or a bad label would also be retried twice, adding 30 seconds of waiting per image before the job fails. AGENTS.md says to retry only the errors you expect. Checking ko's stderr for DENIED: permission_denied would keep other failures fast. My branch does that. 3. Release images now build one at a time. Before, one ko invocation built all 11 images in parallel in about 51 seconds. Eleven separate invocations will be slower. The Go build cache is shared, so I'd expect a few minutes, well within the
job's 30-minute timeout, but I haven't measured it. - Minor:
- The test's denial message is a write_package blob PATCH, but the real failure was read_package on an SBOM manifest PUT. It doesn't affect the test, which retries any error.
- The exported Retry type and the pushRetry package variable are configuration with only one user. A constant inside BuildEach would do.
| t.Helper() | ||
| dir = t.TempDir() | ||
| binary = filepath.Join(dir, "ko") | ||
| script := "#!/bin/sh\n" + |
Collaborator
There was a problem hiding this comment.
TODO (non-blocking): we should put scripts like this into a testdata folder under the package instead of writing them to disk at runtime. This is less complex, less flaky, faster, and allows us to shellcheck the scripts.
Lior Lieberman (LiorLieberman)
previously approved these changes
Oct 29, 2026
Replace the exported Retry type and hand-rolled backoff with retry.OnError and a wait.Backoff, as kube/apply.go does. Signed-off-by: Anna Pendleton <[email protected]>
Benjamin Elder (BenTheElder)
approved these changes
Oct 29, 2026
| // has just created. | ||
| var buildBackoff = wait.Backoff{Steps: 3, Duration: 10 * time.Second, Factor: 2} | ||
|
|
||
| // BuildEach runs BuildTagged once per import path, retrying each failure per |
Collaborator
There was a problem hiding this comment.
TODO:
- BuildEach doesn't imply we're pushing, this API feels like a footgun. however it is an internal package
- It seems like we should be able to have ko build them all in one pass to dedupe some costs?
Benjamin Elder (BenTheElder)
enabled auto-merge
October 29, 2026 20:33
This was referenced Oct 29, 2026
Lior Lieberman (LiorLieberman)
pushed a commit
that referenced
this pull request
Oct 29, 2026
…ge with backoff (#3459) Cherry-pick of #3446 onto `release-1.0`, with no changes (`git cherry-pick -x` of both commits). Needed for the 1.0 release: the v1.0.0-rc.1 release run (https://github.com/agent-substrate/substrate/actions/runs/40925903340) failed in **Publish images** with `DENIED: permission_denied`. ghcr.io can briefly deny pushes to a package it has just created, and this is the first release that creates them. `ate-setup publish release-images` now builds each ko image in its own `ko build`. If an image fails, it logs the error and retries that image, for up to 3 attempts, waiting 10s then 20s (`retry.OnError` with a `wait.Backoff`). AI use: AI-assisted. - [x] Tests pass --------- Signed-off-by: Anna Pendleton <[email protected]> Co-authored-by: Anna Pendleton <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The v1.0.0-rc.1 release run (https://github.com/agent-substrate/substrate/actions/runs/40925903340) failed in Publish images with
DENIED: permission_denied. ghcr.io can briefly deny pushes to a package it has just created, and this is the first release that creates them.ate-setup publish release-imagesnow builds each ko image in its ownko build. If an image fails, it logs the error and retries that image, for up to 3 attempts, waiting 10s then 20s. The workflow is unchanged.