Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Add `crossplane project simulate`

Abierto
#367 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 3 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
25/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
go
Área
cli

Línea de trabajo

Comienza con design/one-pager-cli-simulate.md y el diseño aceptado de crossplane/cli#181; después, inspecciona cómo project run construye funciones embebidas. Traza la maquinaria de crossplane-diff y las etapas enumeradas de discover, prepare, render, diff y report. Se considera terminado cuando el comando y cada criterio de aceptación, incluidos los modos de entrada, los XRs fijados, los claims, los formatos de salida y el descubrimiento con ámbito, funcionan según lo descrito.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

enhancement
What

Implement crossplane project simulate as an alpha command, per the accepted design (crossplane/cli#181, design/one-pager-cli-simulate.md).
provider plan servers lands separately, until then the command behaves as --skip-plan always.

This includes the groundwork the design bases simulate on: bringing the crossplane-diff machinery into crossplane/cli as internal packages, with its maintainers' involvement, per "Building on crossplane-diff, Not Beside It".

The flow:

  1. Discover. Parse the project file, find Compositions under the project's API paths, list the XRs on the target cluster whose type each Composition composes. --namespace and --name scope the run.
  2. Prepare. Build the project's embedded functions locally, exactly as project run does.
  3. Render. Re-render each XR with the local Composition and functions, feeding in observed composed resources; resolve required resources with the resolver.
  4. Diff. Calculator + server-side dry-run + removal detection.
  5. Report. Per-XR diffs, Plan: N to add, M to change, K to destroy summary, output formats below.

Also in scope, per the design:

  • No-project input mode: -f accepts changed Composition or XR files directly; matching XRs are discovered on the cluster, functions run from the packages installed on the cluster, everything not overridden locally is fetched live.
  • Pinned XRs: compositionUpdatePolicy: Manual XRs print as deferred by default, simulate with --include-pinned. Exception: when the working tree changes an embedded function, pinned XRs are simulated against their pinned CompositionRevision fetched from the cluster with the locally built functions (function packages are not pinned with the revision until crossplane/crossplane#6139).
  • Claims: a claim passed as a changed file is converted to its XR with the CLI's existing conversion machinery and simulated; results print under the claim's name.
  • Output formats: -o plan (annotated manifest, default), -o diff (line-by-line unified diff, Markdown diff-block compatible, what crossplane-diff emits today), -o json|yaml (one typed result per resource).
  • Flags: as in the design's kong struct (minus the plan-layer flags): -f, --namespace, --name, --include-pinned, --max-iterations, --timeout, --max-concurrency, -o.
Acceptance criteria
  • Resolver, calculator, dry-run, and comp discovery live as internal packages in crossplane/cli, with crossplane-diff maintainer agreement on ownership recorded (CODEOWNERS).
  • crossplane project simulate (alpha) previews Composition, embedded function, and XR changes against a live cluster.
  • -f composition.yaml works without a project.
  • Pinned XRs print as deferred with the documented message; the function-change exception simulates them against their pinned revision.
  • Claims convert and simulate; output uses the claim's name.
  • Removed resources appear as deletes; nothing silently disappears from the preview.
  • All formats work; JSON/YAML results are typed and stable enough for CI gating.
  • Cost scales with what is previewed: no cluster-wide work beyond the scoped discovery.
Out of scope
  • Plan servers, --provider-images, --skip-plan, --keep-plan-servers (follow-up issue: plan layer)
  • Replace detection and known-after-apply values (provider knowledge; plan layer)
Lenguaje dominante
Go
Estrellas
19
Forks
33
Merge medio
3 d 10 h
PR fusionados (30 d)
24

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de crossplane/cli

Todos los issues de crossplane/cli

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.