Repository navigation
fix(dagger): stop caching attestation functions across runs - #3468
Merged
Merged
Conversation
Dagger caches module function results for up to seven days by default, so running the same attestation again could return the attestation ID created by an earlier run, failing with "attestation not yet initialized" once that attestation had been pushed, or skip the push entirely. Cache the functions that create or change an attestation, or read its live state, only for the current session. Assisted-by: Claude Code Signed-off-by: Javier Rodriguez <javier@chainloop.dev>
Contributor
AI Session Checks —
|
| Status | Policy | Material | Messages |
|---|---|---|---|
| ✅ Passed | pr-min-approvals |
pr-info |
- |
| ✅ Passed | pr-description-required |
pr-info |
- |
pr-user-story-linked |
pr-info |
PR/MR #3468 does not reference a user story or issue in title, description, or branch 'fix(dagger): stop caching attestation functions across runs'. Expected patterns: ["(?i)[A-Z]+-[0-9]+", "#[0-9]+", "(?i)[A-Z]{2", "}-[0-9]+", "(?i)gh-[0-9]+", "(?i)\[[A-Z]+-[0-9]+\]"] |
Powered by Chainloop and Chainloop Trace
javirln
marked this pull request as ready for review
September 24, 2026 08:45
jiparis
approved these changes
Sep 24, 2026
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 Dagger module relied on Dagger's default function caching, which keeps a function's result for up to seven days across runs. Attestation functions have side effects and depend on live state, so replaying a cached result causes problems: running
initagain with the same inputs returns the attestation ID created by an earlier run, and adding evidence to it fails withattestation not yet initializedonce that attestation has been pushed. A run identical to a previous one can also be served entirely from the cache and never push an attestation.This removes that cross-run caching from
Init,AddRawEvidence,AddFileEvidence,Push,Status,MarkFailed,MarkCanceled,WorkflowCreate,ContainerandDebug. They are now cached only for the current session, so every run initializes and pushes its own attestation, while an attestation keeps a single ID for the whole session it was created in. Disabling the cache entirely is not an option, because it would re-initialize the attestation every time it is referenced.AI assistance: written with Claude Code.