fix(ci): retry cosign transparency log failures#965
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #965 +/- ##
=========================================
- Coverage 10.99% 8.61% -2.38%
=========================================
Files 173 314 +141
Lines 8671 15743 +7072
=========================================
+ Hits 953 1357 +404
- Misses 7612 14260 +6648
- Partials 106 126 +20 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: Prasanth Baskar <bupdprasanth@gmail.com>
d0e73fb to
1178f8c
Compare
Member
Author
|
@codex review |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds resilience to the Cosign attest/sign steps in the Dagger publish pipeline so transient Sigstore/Rekor transport errors are retried and duplicate Rekor entries from reruns are treated as success.
Changes:
- New
cosignWithRetryshell wrapper that retries up to 3 times on transient transport errors (INTERNAL_ERROR, stream errors, timeouts, connection reset, temporary failure) with linear backoff, and short-circuits to success oncreateLogEntryConflict/ "equivalent entry already exists". - Per-cosign
--timeoutraised from1mto2m, and arguments routed through a newshellQuotehelper. - Minor cleanup in
PublishImageAndSign(trailing whitespace / stray semicolon in theGenerateSBOMcall).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Summary
cosign attestandcosign signwhen Sigstore/Rekor returns transient transport errors such as streamINTERNAL_ERROR.Root Cause
The image publish step succeeds before the workflow enters Sigstore/Rekor signing. The Dagger module ran each
cosigncommand once, so transient transparency-log errors or duplicate entries from reruns failed the whole job even when the publish side had completed.Testing
git diff --checkdagger call publish-image-and-sign --helpgo test ./...under.daggeris not runnable from a plain checkout because the generatedinternal/daggerpackage is gitignored and absent until Dagger loads the module.Closes #964