aws-cdk icon indicating copy to clipboard operation
aws-cdk copied to clipboard

cli: diff --change-set flag not configurable via cdk.json

Open ben-bourdin451 opened this issue 1 year ago • 1 comments

Describe the bug

A new flag was introduced as part of #28336

This flag doesn't seem to be set to wanted default value using the cdk.json.

There's also missing documentation about this flag in the CLI reference. Arguably a different issue since it'll be a different repo? I'm not sure how to report that. Feel free to point me in the right direction.

Expected Behavior

Ability to override default value in cdk.json

Current Behavior

Anything set in in the cdk.json will be ignored

Reproduction Steps

  1. Use any stack setup
  2. Run a diff
  3. You'll see the following output on the stack:
Hold on while we create a read-only change set to get a diff with accurate replacement information (use --no-change-set to use a less accurate but faster template-only diff)
  1. Try to override the change-set flag in cdk.json to false
  2. Run diff again

expected: warning message above dissapears actual: still seeing the warning (behaviour hasn't changed)

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.128.0

Framework Version

No response

Node.js Version

v20.11.1

OS

darwin AMD64

Language

TypeScript

Language Version

No response

Other information

No response

ben-bourdin451 avatar Feb 23 '24 12:02 ben-bourdin451

Piggy backing on this issue to request that the log message be suppressed if the flag is configured explicitly in cdk.json. It just pollutes logs unnecessarily (we have many stacks).

andreialecu avatar Feb 23 '24 12:02 andreialecu

I'm happy to try and solve this myself if someone points me in the right direction. I took a quick look at the code however it's not immediately obvious how/where these flags are passed through via the cdk.json file

ben-bourdin451 avatar Feb 26 '24 15:02 ben-bourdin451

Opened #29375 with some changes for this.

andreialecu avatar Mar 06 '24 18:03 andreialecu