fix: scope asModule cache per-session to prevent cross-worktree collision#12901
Draft
eunomie wants to merge 1 commit intodagger:mainfrom
Draft
fix: scope asModule cache per-session to prevent cross-worktree collision#12901eunomie wants to merge 1 commit intodagger:mainfrom
eunomie wants to merge 1 commit intodagger:mainfrom
Conversation
…sion When running `dagger call` from two different git worktrees simultaneously against the same engine daemon, the content-digest cache in dagql could return a Module from a different session. That Module carries a path-dependent ContextDirectoryPath from the wrong worktree, causing "module not found" errors. Scope the asModule resolver with CachePerSession so each session gets its own result, preventing the content-digest cache from leaking path-dependent state across sessions. Signed-off-by: Yves Brissaud <yves@dagger.io>
5c9939d to
1a1da24
Compare
Contributor
|
@eunomie did you confirm this change specifically fixes the problem for you? i.e. you can repro the issue on the previous commit from main before this one, but this commit specifically fixes it. Just checking because I don't see why caching The real fix for all this is #11856 because it completely eliminates the possibility of the problem fundamentally, but if this change unblocks you I'm fine with it in the meantime. |
Member
Author
|
I'm putting it back to draft, waiting to #11856 to fix it. It's sometimes annoying but not a huge problem for now |
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.
When running
dagger callfrom two different git worktrees simultaneously against the same engine daemon, the content-digest cache in dagql could return a Module from a different session. That Module carries a path-dependent ContextDirectoryPath from the wrong worktree, causing "module not found" errors.Scope the asModule resolver with CachePerSession so each session gets its own result, preventing the content-digest cache from leaking path-dependent state across sessions.