Skip to content

(deploy): every change-set deployment prints "Changeset ... created and waiting in review for manual execution (--no-execute)" although the change set is executed #1815

Description

@go-to-k

Describe the bug

Since #1273, every cdk deploy that uses the default change-set method and has actual changes prints:

MyStack: creating CloudFormation changeset...
Changeset arn:aws:cloudformation:...:changeSet/cdk-deploy-change-set/... created and waiting in review for manual execution (--no-execute)
...
✅  MyStack

The message claims the change set is waiting for manual execution, but the change set is executed right after (the deployment completes and describe-change-set shows ExecutionStatus: EXECUTE_COMPLETE). --no-execute was never requested. Display-only issue; the deployment itself works.

Cause:

This also surfaces in flows that deploy internally, e.g. the finalizing deployment after cdk import ("Finish with a cdk deploy now?"), which is how I originally noticed it.

#1273 first shipped in aws-cdk 2.1118.1. I reproduced the message with a plain cdk deploy (a simple stack update, no flags besides --require-approval never) on 2.1135.0.

Regression Issue

  • Select this option if this issue appears to be a regression.

Last Known Working CDK Version

2.1118.0

Expected Behavior

The "waiting in review for manual execution (--no-execute)" message is only printed when the created change set is actually left unexecuted, i.e. when the user asked for it (--method=prepare-change-set / --no-execute variants, including cdk import --no-execute).

Current Behavior

The message is printed on every change-set deployment that has changes, and then the change set is executed anyway.

Reproduction Steps

  1. Deploy any stack.
  2. Change something in the stack and run cdk deploy again (default change-set method).
  3. Observe the Changeset ... created and waiting in review for manual execution (--no-execute) line, followed by the deployment executing and succeeding.

Possible Solution

Only the caller knows whether execute: false is user-requested or the internal first phase of an executing deployment. Move the announcement out of deploy-stack.ts to the places where that intent is known: Deployments.prepareStack() (which already receives this distinction via cleanupOnNoOp) and the resource importer (for cdk import --no-execute).

I will submit a PR for this.

Additional Information/Context

No response

CDK CLI Version

2.1135.0

Framework Version

2.261.0

Node.js Version

24.19.0

OS

macOS 15

Language

TypeScript

Language Version

No response

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions