-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
β NOTICE: List stack output change issue. #29420
Closed
byF opened this issue
Mar 9, 2024
· 2 comments
Β· Fixed by #29447 Β· May be fixed by NOUIY/aws-solutions-constructs#98 or NOUIY/aws-solutions-constructs#99
Closed
β NOTICE: List stack output change issue. #29420
byF opened this issue
Mar 9, 2024
· 2 comments
Β· Fixed by #29447 Β· May be fixed by NOUIY/aws-solutions-constructs#98 or NOUIY/aws-solutions-constructs#99
Labels
@aws-cdk/core
Related to core CDK functionality
bug
This issue is a bug.
cli
Issues related to the CDK CLI
investigating
This issue is being investigated and/or work is in progress to resolve the issue.
management/tracking
Issues that track a subject or multiple issues
p0
package/tools
Related to AWS CDK Tools or CLI
Comments
byF
added
bug
This issue is a bug.
needs-triage
This issue or PR still needs to be triaged.
labels
Mar 9, 2024
pahud
added
p1
investigating
This issue is being investigated and/or work is in progress to resolve the issue.
and removed
needs-triage
This issue or PR still needs to be triaged.
labels
Mar 11, 2024
pahud
added
@aws-cdk/core
Related to core CDK functionality
cli
Issues related to the CDK CLI
labels
Mar 11, 2024
Hey, thank you for letting us know. We are taking a look into this. |
1 task
SankyRed
changed the title
cdk list: Output has changed with the latest release
β NOTICE: List stack output change issue.
Mar 11, 2024
SankyRed
added
the
management/tracking
Issues that track a subject or multiple issues
label
Mar 11, 2024
mergify bot
pushed a commit
that referenced
this issue
Mar 12, 2024
β¦9447) ### Issue # (if applicable) Closes #29420 ### Reason for this change The `cdk list` functionality displays the stacks . For instance ``` > cdk ls producer consumer ``` With the latest changes for list stack dependencies we did add a new flag `-d` to show the dependencies. The dependencies between stacks can be established in 2 ways: 1. Using the resource defined from one stack in another. 2. Using `addDependency()` to add dependency among stacks. Current we are fetching the dependency details through the `CloudStackArtifact`. * Establishing the dependency between stacks through the first method would have the same `displayName` and `id` for the stacks. Using the `-d` flag to display dependencies - ``` β― cdk list --show-dependencies - id: producer dependencies: [] - id: consumer dependencies: - id: producer dependencies: [] ``` * Establishing the dependency through `addDependency()` will create a different `displayName` and `id`. In such a case when a user runs `cdk ls` we would want to show the `displayName` and if not present then use the `id` For instance: ``` > cdk ls producer producer/consumer ``` With the `-d` flag we would want to display something like: ``` > cdk ls -d - id: producer dependencies: [] - id: producer/consumer dependencies: - id: producer dependencies: [] ``` With our previous change we didn't consider `displayName` and just fetched `id`s which changes the previous functionality and caused a regression. ### Description of changes With the new changes we are looking out for `displayName` first and if it does not exist we fetch the `id`. ### Description of how you validated changes Added a new unit test and updated integ tests. ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
mergify bot
pushed a commit
to cdklabs/aws-cdk-notices
that referenced
this issue
Mar 12, 2024
Fixes #[29420](aws/aws-cdk#29420)
SankyRed
added a commit
that referenced
this issue
Mar 12, 2024
β¦9447) ### Issue # (if applicable) Closes #29420 ### Reason for this change The `cdk list` functionality displays the stacks . For instance ``` > cdk ls producer consumer ``` With the latest changes for list stack dependencies we did add a new flag `-d` to show the dependencies. The dependencies between stacks can be established in 2 ways: 1. Using the resource defined from one stack in another. 2. Using `addDependency()` to add dependency among stacks. Current we are fetching the dependency details through the `CloudStackArtifact`. * Establishing the dependency between stacks through the first method would have the same `displayName` and `id` for the stacks. Using the `-d` flag to display dependencies - ``` β― cdk list --show-dependencies - id: producer dependencies: [] - id: consumer dependencies: - id: producer dependencies: [] ``` * Establishing the dependency through `addDependency()` will create a different `displayName` and `id`. In such a case when a user runs `cdk ls` we would want to show the `displayName` and if not present then use the `id` For instance: ``` > cdk ls producer producer/consumer ``` With the `-d` flag we would want to display something like: ``` > cdk ls -d - id: producer dependencies: [] - id: producer/consumer dependencies: - id: producer dependencies: [] ``` With our previous change we didn't consider `displayName` and just fetched `id`s which changes the previous functionality and caused a regression. ### Description of changes With the new changes we are looking out for `displayName` first and if it does not exist we fetch the `id`. ### Description of how you validated changes Added a new unit test and updated integ tests. ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
mergify bot
added a commit
that referenced
this issue
Mar 12, 2024
### Issue # (if applicable) Closes #[29420](#29420). ### Reason for this change The latest release has changed the output of the `list` command, removing the path hierarchy. ### Description of changes With the new changes we are looking out for `displayName` first and if it does not exist we fetch the `id`. ### Description of how you validated changes Added unit tests and updated integ tests. ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
This was referenced May 23, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
@aws-cdk/core
Related to core CDK functionality
bug
This issue is a bug.
cli
Issues related to the CDK CLI
investigating
This issue is being investigated and/or work is in progress to resolve the issue.
management/tracking
Issues that track a subject or multiple issues
p0
package/tools
Related to AWS CDK Tools or CLI
Please add your +1 π to let us know you have encountered this
Status: RESOLVED
Overview
The latest release has changed the output of the
list
command, removing the path hierarchy.Expected Behavior
Until now, the output of the
cdk list
was:Current Behavior
In 2.132.0, the output of the
cdk list
produces:Reproduction Steps
Run
cdk list
with 2.131.0 and 2.132.0 and compare the resultsWorkaround
This is not a bug but, the existing functionality was altered and an edge case has been missed. Workaround to get the expected behavior would be to downgrade to 2.131.0 version of
aws-cdk
.Possible Solution
Adding a check to fetch the
displayName
and if not available then fetch theid
.#29447
Additional Information/Context
No response
CDK CLI Version
2.132.0
Framework Version
No response
Node.js Version
20
OS
macOS 14.4, Ubuntu 22
Language
TypeScript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: