feat(run): --no-recreate reuses existing dependencies as-is - #14144
Open
ndeloof wants to merge 1 commit into
Open
feat(run): --no-recreate reuses existing dependencies as-is#14144ndeloof wants to merge 1 commit into
ndeloof wants to merge 1 commit into
Conversation
The dependencies a one-off starts go through the regular create path and its config-hash divergence check, with no way to opt out: any resolution difference with the command that created them (environment, model edit) recreates the dependency — destroying state a previous run built up (issue docker#13769's database losing its users). up already offers --no-recreate for exactly this; run now aligns: the flag maps to the "never" recreate policy, propagated through the RunOptions.CreateOptions fields that startDependencies previously dropped. Default behavior is unchanged (empty policy = "diverged"). Closes docker#13769 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
docker-agent
left a comment
Contributor
There was a problem hiding this comment.
Assessment: 🟢 APPROVE
The flag implementation is clean and correct. The flag wires properly from the CLI option through createOptions.noRecreate → recreateStrategy() / dependenciesRecreateStrategy() (both already handle noRecreate → RecreateNever), and the propagation into startDependencies via options.Recreate / options.RecreateDependencies is complete. Default behavior is unchanged. No logic errors, nil-pointer risks, or missing error handling found in the changed code.
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.
runstarts its dependencies through the regular create path and its config-hash divergence check, with no way to opt out: any resolution difference with the command that created them recreates the dependency — destroying state a previous run built up (#13769: database losing its users).upalready offers--no-recreatefor exactly this;runnow aligns.The flag maps to the existing "never" recreate policy, propagated through the
RunOptions.CreateOptionsfieldsstartDependenciespreviously dropped. Default behavior is unchanged (empty policy = "diverged"). E2E test pins both sides: default recreates a diverged dependency,--no-recreatereuses it as-is.Closes #13769
🤖 Generated with Claude Code