Repository navigation
Conversation
Restore PerformDiff with its input validator, ValidatedInput, the WithInputValidatorFactory option, their mocks, test helpers and tests from the state before the XR-only path was removed. Keep the TestManagedByManagerWithNoName case that the managedBy/boundToClaim table port added and the restored tests lack. Signed-off-by: Jonathan Ogilvie <jonathan.ogilvie@sumologic.com> Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Inputs that are neither Compositions nor project files are composite resource candidates, which checkComposites confirms against the cluster's XRDs. Every rejection uses RejectInput's template, so composition and xr simulate point at each other symmetrically. The runner gains a Composites input that runs PerformDiff and renders through renderXRReport. Signed-off-by: Jonathan Ogilvie <jonathan.ogilvie@sumologic.com> Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
xr simulate previews composite resource or claim files against the cluster with its Compositions and functions, through the shared simulate runner. It takes no selection flags or --max-concurrency. Signed-off-by: Jonathan Ogilvie <jonathan.ogilvie@sumologic.com> Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Restore TestDiffIntegration, TestSimulateProviderPlan, the XR plan-output cases of TestSimulatePlanOutput and the remaining testdata. The harness now runs XRDiffTest cases as `xr simulate` with -f per file, and the TestCompDiffIntegration comments that point at TestDiffIntegration are restored. Signed-off-by: Jonathan Ogilvie <jonathan.ogilvie@sumologic.com> Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Restore simArgs.FunctionCredentials with its --function-credentials argv, which the XR cases of TestDiffIntegration use. simulateArgv maps XRDiffTest to xr simulate and still fails on any other unknown test type. The admission-policy gate uses integration.AwaitAdmissionDenial. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Jonathan Ogilvie <jonathan.ogilvie@sumologic.com>
Move the build step of Run into Flags.build and test that both Composition and composite resource inputs take imageConfigs only from --image-configs, never from ./crossplane-project.yaml. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Jonathan Ogilvie <jonathan.ogilvie@sumologic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Jonathan Ogilvie <jonathan.ogilvie@sumologic.com>
Point project, composition and xr simulate help at each other, and resource simulate help at the three. Mark xr simulate as added in the design doc and name the right commands in the integration testdata README. Signed-off-by: Jonathan Ogilvie <jonathan.ogilvie@sumologic.com> Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Jonathan Ogilvie <jonathan.ogilvie@sumologic.com> Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Jonathan Ogilvie <jonathan.ogilvie@sumologic.com> Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…Reports Signed-off-by: Jonathan Ogilvie <jonathan.ogilvie@sumologic.com> Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Jonathan Ogilvie <jonathan.ogilvie@sumologic.com> Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Jonathan Ogilvie <jonathan.ogilvie@sumologic.com> Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ments Signed-off-by: Jonathan Ogilvie <jonathan.ogilvie@sumologic.com> Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…osites Signed-off-by: Jonathan Ogilvie <jonathan.ogilvie@sumologic.com> Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…d test Signed-off-by: Jonathan Ogilvie <jonathan.ogilvie@sumologic.com> Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…rated list xr simulate owns which inputs it accepts, and -f matches resource simulate. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Jonathan Ogilvie <jonathan.ogilvie@sumologic.com>
With --skip-plan nothing fetches packages, and --cache-dir is already reported as ignored, so don't create (and fail on) the cache directory. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Jonathan Ogilvie <jonathan.ogilvie@sumologic.com>
Match composition and project simulate: the create and patch permissions come in an Important callout straight after the summary, with the reason. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Jonathan Ogilvie <jonathan.ogilvie@sumologic.com>
…nternal/testutils The simulate argv translation, case runner and fixtures shared by the composition, xr and project integration suites move to simharness and internal/testutils/integration/testdata so each command can own its suite. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Jonathan Ogilvie <jonathan.ogilvie@sumologic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Jonathan Ogilvie <jonathan.ogilvie@sumologic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Jonathan Ogilvie <jonathan.ogilvie@sumologic.com>
Each suite already runs its cases in parallel; three suites rendering through Docker at once starve each other into timeouts. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Jonathan Ogilvie <jonathan.ogilvie@sumologic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Jonathan Ogilvie <jonathan.ogilvie@sumologic.com>
jcogilvie
force-pushed
the
jco-simulate-integration-split
branch
from
November 7, 2026 01:47
c64aaa8 to
43fb7f1
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.
Description of your changes
Note
Stacked on #487, so until it merges, this PR's diff includes it. The commits for this PR are the top five.
This is the follow-up to two of @haarchri's comments on #486. All the simulate integration cases lived in
cmd/crossplane/project. Now each command owns its suite, and thesimulate.ProjectResulttype is renamed to fit what it is.Suites per command:
cmd/crossplane/composition:TestCompDiffIntegrationand the fixtures only it uses.cmd/crossplane/xr:TestDiffIntegrationand the fixtures only it uses.cmd/crossplane/project: keeps theproject simulatecases, the plan-output and provider-plan tests.internal/testutils/integration/simharness, behind theintegrationbuild tag. It holds the argv translation, the run helpers, the case types and the least-privilege RBAC rules.internal/testutils/integration/testdata.Files moved with
git mv, sogit log --followkeeps their history. No case is added, removed or changed. The test list across the three packages matches the one before the move.-p 1for the integration tests: once the cases were split into three packages,go testran them in parallel, and three suites rendering through Docker at once timed out.nix/apps.nixnow runs integration packages one at a time, and each package's cases still run in parallel. Before the move, the simulate cases were all in one package, so CI's integration job should take about as long as before.ProjectResultbecomesResult: every simulate command emits it for-o jsonand-o yaml, not onlyproject simulate.NewProjectResultbecomesNewResult. The JSON output is unchanged.Related:
xr simulate, the PR below this one.I have:
./nix.sh flake checkto ensure this PR is ready for review.Added or updated unit tests.A pure move and rename.Linked a PR or a docs tracking issue to document this change.No user-facing change.Addedbackport release-x.ylabels to auto-backport this PR.🤖 Generated with Claude Code