Repository navigation
fix: prevent double buildkit caching on remote git operations - #9840
Merged
Merged
Conversation
This was *probably* causing flakes, and had the potential to cause big issues. Essentially, for remote operations we were caching twice: - The DagOp for the `Git.tree` operation (with a cache key of the git ID) - The underlying git operation (with a cache key of the git commit) This was very confusing to think about, and probably could have resulted in lots of weird cache issues. The simple fix here is to just remove the extra DagOp layer when caching remote git sources, and to take more manual control over DagOp caching in this case. Ideally! We would have core interfaces, which would then allow us to have different specializations of `GitRef` and `GitRepository` at the dagql handler level, so we wouldn't actually need this kind of refactor. But it's not *super* trivial to add them, so this is quick hacky fix to get the behavior working as desired. Signed-off-by: Justin Chadwell <[email protected]>
jedevc
force-pushed
the
fix-double-buildkit-caching
branch
from
March 11, 2025 15:08
b535c0f to
37d6263
Compare
sipsma
approved these changes
Mar 12, 2025
vikram-dagger
pushed a commit
to vikram-dagger/dagger
that referenced
this pull request
Mar 17, 2025
…#9840) This was *probably* causing flakes, and had the potential to cause big issues. Essentially, for remote operations we were caching twice: - The DagOp for the `Git.tree` operation (with a cache key of the git ID) - The underlying git operation (with a cache key of the git commit) This was very confusing to think about, and probably could have resulted in lots of weird cache issues. The simple fix here is to just remove the extra DagOp layer when caching remote git sources, and to take more manual control over DagOp caching in this case. Ideally! We would have core interfaces, which would then allow us to have different specializations of `GitRef` and `GitRepository` at the dagql handler level, so we wouldn't actually need this kind of refactor. But it's not *super* trivial to add them, so this is quick hacky fix to get the behavior working as desired. Signed-off-by: Justin Chadwell <[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.
This was probably causing flakes, and had the potential to cause big issues. Should hopefully fix the issue noted in #9730 (comment).
Essentially, for remote operations we were caching twice:
Git.treeoperation (with a cache key of the git ID)The simple fix here is to just remove the extra DagOp layer when caching remote git sources, and to take more manual control over DagOp caching in this case.
Ideally! We would have core interfaces, which would then allow us to have different specializations of
GitRefandGitRepositoryat the dagql handler level, so we wouldn't actually need this kind of refactor. But it's not super trivial to add them, so this is quick hacky fix to get the behavior working as desired.