You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
🐞 Git-remote workspace (-W <remote>@<sha>) re-runs execs on every commit even when the mounted Workspace.directory is identical #14903
When the workspace is a git remote (-W github.com/<org>/<repo>@<sha>), an exec that mounts Workspace.directory content re-runs on every new commit, even when the mounted directory is byte-identical between the two commits. The same function run from a local checkout of the same commits hits the cache as expected.
For CI this means every push is effectively a cold run when the trigger uses the -W <remote>@<sha> form, which is the natural shape for running checks on a pushed commit.
Make three commits that each change only README.md, which is outside the include list.
Run dagger -W github.com/<org>/<repo>@<sha> -c '<fn> | digest' at the first commit, twice.
Run it at the next commit.
Observed
Same sha twice: identical digest, and withExec is CACHED both times.
Next README-only sha: Workspace.directory ... DONE [0.0s], then withExec bash some/dir/build.sh /out DONE [3.8s]. It re-ran.
The mounted input is byte-identical across those commits: ws.directory(...).digest returns the same digest at both shas.
Control
From a local checkout in one fixed directory (git checkout --detach <sha>, no -W), the same function at the next README-only commit is a cache hit: check DONE [0.5s].
Expected
An exec whose inputs are content-identical should hit the cache regardless of which commit of a git-remote workspace it was evaluated from.
Dagger version
v1.0.0-beta.21 (CLI and self-hosted engine, tcp://)
Notes
The exec's cache key seems to pick up something per-commit from the remote workspace's identity, such as the ref or the snapshot it came from, beyond the mounted directory's content digest. We worked around it by running from a fixed local checkout, and can share traces if useful.
Activity