Repository navigation
refactor(compose): move the plan types to internal/planning - #14408
Merged
Merged
Conversation
docker-agent
left a comment
Contributor
There was a problem hiding this comment.
Assessment: 🟢 APPROVE
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
4 of 15 tasks
ndeloof
force-pushed
the
internal-plan
branch
from
October 29, 2026 07:23
428acd5 to
d6dd02d
Compare
docker-agent
left a comment
Contributor
There was a problem hiding this comment.
Assessment: 🟢 APPROVE
ndeloof
force-pushed
the
internal-plan
branch
from
October 29, 2026 11:06
d6dd02d to
de140dc
Compare
docker-agent
left a comment
Contributor
There was a problem hiding this comment.
Assessment: 🟢 APPROVE
ndeloof
force-pushed
the
internal-plan
branch
2 times, most recently
from
November 4, 2026 17:17
c7283ea to
f9a98c1
Compare
ndeloof
force-pushed
the
internal-plan
branch
from
November 12, 2026 16:49
f9a98c1 to
121062d
Compare
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
ndeloof
force-pushed
the
internal-plan
branch
from
November 16, 2026 13:41
121062d to
2de606f
Compare
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.
What this PR does, in one sentence
Moves the reconciliation plan types (
Plan,PlanNode,Operation,OperationTypeand theOp*constants) out ofpkg/composeinto a self-containedinternal/planningpackage.Context
PlanandOperationare the vocabulary the reconciler writes and the executor reads, but they are declared inpkg/composeand exported from it, so they are part of the/v5public API even though nothing outside the package uses them. They are also among the most isolated pieces of the package:plan.goneeds nothing from the rest ofpkg/compose. This is part of the effort tracked in #14396 to splitpkg/composeand to shrink its exported surface.What the PR brings
plan.goand its test move unchanged tointernal/planning(only the package clause differs); the reconciler, the executor andup/createnow refer to the qualified names. The rest of the diff is the mechanical qualification of identifiers, with no behavior change and no change to any test assertion.Plan.addNode, whichreconcile.goand the tests call across the new package boundary: it becomes the exportedPlan.AddNode, the minimum needed.Backendinterface and no forwarder: the package has no dependency onpkg/compose(or on anything else of the project).pkg/compose:Plan(withStringandIsEmpty),PlanNode,PlanPhase,PhaseCreate,PhaseStart,Operation,OperationType(withString) and the sixteenOp*constants (OpCreateNetwork,OpRemoveNetwork,OpDisconnectNetwork,OpConnectNetwork,OpCreateVolume,OpRemoveVolume,OpCreateContainer,OpStartContainer,OpStopContainer,OpRemoveContainer,OpRenameContainer,OpRunProvider,OpWaitCondition,OpRunPreStart,OpRunPostStart,OpCreateHookContainer). Nothing in this repository outsidepkg/composereferences them.planningrather thanplanbecauseplanis the usual name of local variables across the reconciler and its tests, which would have shadowed the package and forced a much noisier diff.Why this is the right next brick
It is the leaf of the plan engine cluster: moving it first means
reconcile,observed_stateandexecutorcan follow later without dragging the plan types along. It is independent of the other extractions of the series, and keeps the changes toreconcile.goto the qualification of identifiers so it stays easy to rebase for the open PRs touching that file.Part of #14396
🤖 Generated with Claude Code