Skip to content
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

fix(cli): deprecated stack ids printed at the end of synth #19216

Merged
merged 3 commits into from
Mar 4, 2022

Conversation

madeline-k
Copy link
Contributor

Using the regular stack identifier in cli commands is deprecated in v1, and removed in v2. If you supply the .id of a stack to any cdk commands (synth, deploy), then v1 will print out a deprecation warning. And, v2 will not work at all. Because of this, it is confusing to users that cdk synth prints out the regular stack identifier. It is best to print out the hierarchical identifier in all cases.

At minimum, this partially fixes #18599. This will fix the scenario where the CLI prints out

Supply a stack id (StageOneF5E336C2, StageTwo81B557F6) to display its template.

when those ids will not actually work, and the hierarchical ids, Stage/One and Stage/Two, should be printed instead.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@madeline-k madeline-k requested a review from a team March 3, 2022 00:40
@gitpod-io
Copy link

gitpod-io bot commented Mar 3, 2022

@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Mar 3, 2022
@madeline-k
Copy link
Contributor Author

I still need to add unit tests for this

@mergify
Copy link
Contributor

mergify bot commented Mar 4, 2022

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject89A8053A-LhjRyN9kxr8o
  • Commit ID: 7cc9828
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify mergify bot merged commit 7d8a479 into aws:master Mar 4, 2022
@mergify
Copy link
Contributor

mergify bot commented Mar 4, 2022

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

TheRealAmazonKendra pushed a commit to TheRealAmazonKendra/aws-cdk that referenced this pull request Mar 11, 2022
Using the regular stack identifier in cli commands is deprecated in v1, and removed in v2. If you supply the `.id` of a stack to any cdk commands (`synth`, `deploy`), then v1 will print out a deprecation warning. And, v2 will not work at all. Because of this, it is confusing to users that `cdk synth` prints out the regular stack identifier. It is best to print out the hierarchical identifier in all cases. 

At minimum, this partially fixes aws#18599. This will fix the scenario where the CLI prints out 
```
Supply a stack id (StageOneF5E336C2, StageTwo81B557F6) to display its template.
```
when those ids will not actually work, and the hierarchical ids, `Stage/One` and `Stage/Two`, should be printed instead.


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
skinny85 added a commit that referenced this pull request Mar 11, 2022
mergify bot pushed a commit that referenced this pull request Mar 11, 2022
One of the changes in #19216 is causing 3 unit tests in the CI environment of the pipeline to fail
(for reasons not exactly clear).
This changes unblocks them.

----

*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 that referenced this pull request Mar 12, 2022
One of the changes in #19216 is causing 3 unit tests in the CI environment of the pipeline to fail
(for reasons not exactly clear).
This changes unblocks them.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*

(cherry picked from commit 4977ae5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution/core This is a PR that came from AWS.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(cli): confusing/misleading cli output when synthesizing stacks in an app with a Stage
4 participants