Plan layer: run provider plan servers, add provider planning to simulate
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 28/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- docker, go, kubernetes
- Domain
- cli, cloud, infrastructure
Research direction
Start by reading design/one-pager-cli-simulate.md and the accepted crossplane/cli#181 design, then review project simulate and resource simulate from issues #367 and #368. Confirm the approved upjet PlanService design in upjet#694 before implementing the internal plan-server orchestration and routing. Done means both commands produce provider plans or marked fallback diffs, support the documented flags, and satisfy the listed output and upgrade-preview criteria.
Written by the indexing model from the issue text.
Description
What
Implement the provider layer from the accepted design (crossplane/cli#181,design/one-pager-cli-simulate.md): run provider packages as local plan servers and route rendered/input MRs to them, upgrading both simulate commands from client-side diffs to provider-computed plans.
Blocked on the crossplane/upjet PlanService design PR. this issue follows whatever that review approves. https://github.com/crossplane/upjet/pull/694
Scope:
- Image sources. Project
dependsOnforproject simulate; providers installed on the current cluster context forresource simulate;--provider-imagesoverrides either. The override only changes the image list, never routing. - Container orchestration. Start each provider image with its
internal plan-serverentrypoint as a local Docker container, following render's runtime conventions (pull policy, cleanup on exit). Deterministic container names derived from the image digest.--keep-plan-serversleaves containers running for later runs to reuse; a changed image never matches a stale server. - Routing. Call each server's
GetInfo, build the routing table from declared API groups. A resource with no route is detected up front. - Matching. Match rendered to live composed resources by the
crossplane.io/composition-resource-nameannotation, falling back to group/kind/name; merge the live MR's external-name annotation and status into the request. Live resources with no rendered counterpart enter the plan as deletes. - Rendering responses. Field changes inline in CRD terms, sensitive values redacted, computed values as
(known after apply), replacement warnings inline, provider diagnostics under their resource. Replaces counted separately in the summary (N requires replacement) with the wedge warning from the design. - Fallback. A resource with no plan server gets the client-side diff, marked
[?], with the closing approximate warning.--skip-planskips the plan layer entirely (no containers start). - Provider upgrade preview.
resource simulate --all --provider-images <image>: enumerate managed resources of the served groups from the cluster, plan each with its own spec as desired and itself as live; anything that is not a no-op is a finding.
Acceptance criteria
- Both simulate commands produce provider-computed plans for resources whose provider serves the plan protocol, and
[?]client-side diffs for the rest, in one run. - Routing comes only from
GetInfo; no image-name parsing, no registry queries. -
--provider-images,--skip-plan,--keep-plan-serversbehave as documented; leftover containers follow the naming scheme and are reused only on digest match. -
--allpreviews a provider upgrade with zero cloud API calls and no cloud credentials. - Replaces are counted separately and never presented as destroy-and-recreate; the unsynced-until-replaced warning prints.
- JSON/YAML output includes actions, field changes, replace information, and diagnostics, sufficient for a PR bot to gate on "any replace anywhere".
Out of scope
- The PlanService protocol and server implementation https://github.com/crossplane/upjet/pull/694
- Non-upjet providers serving plans
Dependencies
Depends on the project simulate https://github.com/crossplane/cli/issues/367 and resource simulate https://github.com/crossplane/cli/issues/368 issues, and on the approved upjet PlanService design.
- Dominant language
- Go
- Stars
- 19
- Forks
- 31
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 53
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from crossplane/cli
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
crossplane/cli#282 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
crossplane/cli#384 ·
-
crossplane/cli#379 · 1 assignee ·
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 68/100
crossplane/cli#370 ·
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 55/100
crossplane/cli#368 · 2 reactions ·
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
kind/bug needs-triage
Difficulty 1/5 Under an hour Newbie friendliness 72/100
matrixorigin/matrixone#29223 ·
-
needs-acceptance wg/data-plane-networking
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
vllm-project/semantic-router#4024 · 1 comment ·