Repository navigation
Conversation
shykes
force-pushed
the
volatile-vars
branch
2 times, most recently
from
April 3, 2026 23:49
5e6f091 to
b99bf41
Compare
shykes
marked this pull request as ready for review
April 4, 2026 00:14
Contributor
|
This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
Contributor
Author
|
Now that egraph is merged, we can rebase this and hopefully get it merged too! |
Contributor
|
This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
Contributor
|
This PR was closed because it has been stalled for 7 days with no activity. |
shykes
force-pushed
the
volatile-vars
branch
2 times, most recently
from
May 13, 2026 16:14
6f79f23 to
1c35210
Compare
Contributor
Author
|
This has been adapted to theseus. PTAL 🙏 |
dagger-codex
Bot
force-pushed
the
volatile-vars
branch
from
May 21, 2026 00:22
41492dd to
9984f12
Compare
Handle both scp-style and ssh:// GitHub remotes when the version module fetches tags inside alpine/git. This keeps tag lookup working for worktrees whose origin uses an SSH URL. Signed-off-by: Solomon Hykes <[email protected]>
Add a helper for deriving the digest a call would have with a different immediate receiver digest. Volatile exec cache keys use this to normalize receiver history without changing argument or module identity. Signed-off-by: Solomon Hykes <[email protected]>
Allow dynamic-input callers to transform a broad equivalent cache hit into a detached result for the current request. The cache publishes the transformed result under the exact request instead of teaching the exact request identity to the broad shared hit. Signed-off-by: Solomon Hykes <[email protected]>
Cover the cache contract used by volatile-style dynamic inputs: rewrite raw values out of call identity, propagate required session-resource handles, allow sessions with the bound handle to hit cache, and reject unbound sessions. Signed-off-by: Solomon Hykes <[email protected]>
Add withVolatileVariable and withoutVolatileVariable for non-secret env values that apply only to future execs. Volatile values stay out of persistent env introspection and image config, are rejected by Dagger-side expansion, and are ignored for exec cache identity while still being rebased onto cache-hit containers for later execs. Signed-off-by: Solomon Hykes <[email protected]>
Regenerate GraphQL schema, SDK bindings, and generated reference output for withVolatileVariable and withoutVolatileVariable. Signed-off-by: Solomon Hykes <[email protected]>
Explain when to use volatile variables, how they differ from persistent env and secrets, and why they are an expert-only cache escape hatch. Signed-off-by: Solomon Hykes <[email protected]>
Reformat persistedContainerExecLazy struct tags to satisfy gofmt and replace the inlined container-cloning block in withExec with a call to the existing cloneContainerForSchemaChild helper. Signed-off-by: Solomon Hykes <[email protected]>
Add two cache-level tests: - concurrent sessions with divergent volatile values resolve their own bindings independently after sharing a broad cache hit - nested volatile + non-volatile exec chain: changing only the volatile value reuses the volatile exec cache while a changed non-volatile marker correctly triggers a miss on the child Scope the dynamic-input / CacheHitTransform mechanism in cache_egraph.go to clarify that volatile variables are currently the only consumer. Signed-off-by: Solomon Hykes <[email protected]>
dagger-codex
Bot
force-pushed
the
volatile-vars
branch
from
May 22, 2026 06:09
9984f12 to
4e0b4fb
Compare
Merged
Contributor
|
merged via #13223 |
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.
tl;dr — New
Container.withVolatileVariablelets you pass non-secret env vars (commit SHA, branch ref, CI run ID) into execs without invalidating cache and without the log redaction you get from thewithSecretVariableworkaround.Fixes #12902
Today the only way to pass changing metadata into execs without busting cache is
withSecretVariablewith a fixedcacheKey— but these values aren't secrets, so you get unwanted redaction.withVolatileVariablefixes this: it sets a non-secret env var visible towithExecbut excluded from cache identity. If an exec reruns for another reason, it sees the latest volatile values.Volatile variables are not persisted into OCI image config, not returned by
envVariable/envVariables, and not available toexpand: true. This is an expert-only escape hatch — if the value actually affects the exec result, Dagger will silently serve stale cache.Example
Schema
Full diff
Internals
The dagql cache layer gains support for "dynamic inputs" — call arguments whose raw values are rewritten out of cache identity but whose session-bound handles are still propagated and validated on cache hits.