engine: fix nested execs created by modules to not be module clients#11458
Merged
sipsma merged 3 commits intodagger:mainfrom Dec 3, 2025
Merged
engine: fix nested execs created by modules to not be module clients#11458sipsma merged 3 commits intodagger:mainfrom
sipsma merged 3 commits intodagger:mainfrom
Conversation
82542ee to
92a57fe
Compare
92a57fe to
15dab67
Compare
a1cde97 to
f375208
Compare
vito
approved these changes
Dec 3, 2025
Contributor
vito
left a comment
There was a problem hiding this comment.
Nice, this could be pretty handy for agents
Comment on lines
+1360
to
+1365
| for i := len(client.parents) - 1; i >= 0; i-- { | ||
| parent := client.parents[i] | ||
| if parent.mod != nil { | ||
| return parent.mod, nil | ||
| } | ||
| } |
There was some vestigial looking code when creating execs that resulted in nested execs created by modules to be marked as being clients for that module. This is subtly incorrect since they are not actually module clients (i.e. clients for function calls of the module), they are just execs created by the module. This broke some cases of trying to load further modules from these nested execs because filesync tries to find the "non-module parent client", and would thus skip over the nested exec client up to the main caller. Signed-off-by: Erik Sipsma <erik@sipsma.dev>
Signed-off-by: Erik Sipsma <erik@sipsma.dev>
Signed-off-by: Erik Sipsma <erik@sipsma.dev>
f375208 to
e073cf9
Compare
raykao
pushed a commit
to raykao/dagger
that referenced
this pull request
Dec 9, 2025
…agger#11458) * engine: fix nested execs created by modules to not be module clients There was some vestigial looking code when creating execs that resulted in nested execs created by modules to be marked as being clients for that module. This is subtly incorrect since they are not actually module clients (i.e. clients for function calls of the module), they are just execs created by the module. This broke some cases of trying to load further modules from these nested execs because filesync tries to find the "non-module parent client", and would thus skip over the nested exec client up to the main caller. Signed-off-by: Erik Sipsma <erik@sipsma.dev> * integ test Signed-off-by: Erik Sipsma <erik@sipsma.dev> * fix service hostnames Signed-off-by: Erik Sipsma <erik@sipsma.dev> --------- Signed-off-by: Erik Sipsma <erik@sipsma.dev>
raykao
pushed a commit
to raykao/dagger
that referenced
this pull request
Dec 14, 2025
…agger#11458) * engine: fix nested execs created by modules to not be module clients There was some vestigial looking code when creating execs that resulted in nested execs created by modules to be marked as being clients for that module. This is subtly incorrect since they are not actually module clients (i.e. clients for function calls of the module), they are just execs created by the module. This broke some cases of trying to load further modules from these nested execs because filesync tries to find the "non-module parent client", and would thus skip over the nested exec client up to the main caller. Signed-off-by: Erik Sipsma <erik@sipsma.dev> * integ test Signed-off-by: Erik Sipsma <erik@sipsma.dev> * fix service hostnames Signed-off-by: Erik Sipsma <erik@sipsma.dev> --------- Signed-off-by: Erik Sipsma <erik@sipsma.dev>
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.
There was some vestigial looking code when creating execs that resulted in nested execs created by modules to be marked as being clients for that module. This is subtly incorrect since they are not actually module clients (i.e. clients for function calls of the module), they are just execs created by the module.
This broke some cases of trying to load further modules from these nested execs because filesync tries to find the "non-module parent client", and would thus skip over the nested exec client up to the main caller.
reported by a user here: https://discord.com/channels/707636530424053791/1440182254126108763/1440182254126108763