Skip to content

Add --dry-run flag: DryRunCloudControllerClient and predicted-changes API - #1932

Draft
vkalapov wants to merge 2 commits into
cloudfoundry:masterfrom
vkalapov:feature/LMCROSSITXSADEPLOY-3716-dry-run
Draft

vkalapov wants to merge 2 commits into
cloudfoundry:masterfrom
vkalapov:feature/LMCROSSITXSADEPLOY-3716-dry-run

Conversation

@vkalapov

Copy link
Copy Markdown
Contributor

Description:

Adds dry-run support to the deploy workflow. When --dry-run is passed, the
deployment runs through the full planning phase but all CF Cloud Controller
write calls are intercepted by DryRunCloudControllerClient, which records
intended changes without applying them.

What changes:

  • New DryRunCloudControllerClient wraps the real client and captures
    apps/services/routes that would be created, updated, or deleted.
  • DryRunChangeSet collects those records and is stored as a process variable.
  • DryRunResult model added to the API; Operation gains dryRunResult and
    outputs fields so callers can read the predicted changeset after the
    operation completes.
  • --dry-run parameter wired into DeployMetadata and the BPMN deploy flows
    (deploy-app.bpmn, xs2-deploy.bpmn, process-batches-sequentially.bpmn).

Design choices:

  • The dry-run client delegates every read call transparently and no-ops or
    records every write call, so the planning steps run unmodified.
  • The changeset is accumulated as a process variable and published to the
    operation response at the end, keeping it out of the hot path.

Issue:

LMCROSSITXSADEPLOY-3716

Adds the DryRunResult schema and wires dryRunResult/outputs onto the
Operation model and mtarest.yaml, consumed by the dry-run deploy flow.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant