-
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
feat(cli): directly deploy stacks in nested assemblies #14379
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like it!
Two questions:
- What will the old vs new behavior be of something like:
const app = new App();
const parent = new Construct(app, 'Parent');
const stack = new Stack(parent, 'Stack');
I.e, what if a stack is not at the top-level? Are identifiers people used to use going to have changed? Is it worth pattern matching on either the hierarchical ID or the artifact ID to maintain old behavior there?
And will:
$ cdk deploy --all
Select only top-level stacks, or also stacks from the nested cloud assemblies? If it's the latter, I'm wondering if that behavior change is going to be be dangerous. I will 100% guarantee you that someone, somewhere, has written scripts that rely on the old behavior :(.
EDIT: I guess you answered that already in the README. I just don't see how it works, but maybe it just didn't need a change at all...
Addressed in the latest commit.
|
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). |
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 CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
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). |
This change allows users to address stacks located in nested assemblies, which is the common use case when dealing with pipelines. For example, suppose we have only two stacks, `stack1` and `stack1/foo/bar`, and the second one is in a sub-assembly. The table below shows the behavior of the CLI before and after: | **Subcommand** | **Pattern** | **Matched stacks (before)** | **Matched stacks (after)** | |------------------------------|----------------|-----------------------------|----------------------------| | deploy, destroy, diff, synth | ε | stack1 | stack1 | | list | ε | stack1 | stack1, stack1/foo/bar | | metadata | ε | ∅ | ∅ | | _any_ | *, --all | stack1 | stack1 | | _any_ | ** | stack1 | stack1, stack1/foo/bar | | _any_ | stack1/** | ∅ | stack1/foo/bar | | _any_ | stack1 | stack1 | stack1 | | _any_ | stack1/foo/bar | ∅ | stack1/foo/bar | where: ε = empty string (no parameters) ∅ = empty results/error ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
This change allows users to address stacks located in nested assemblies, which is the common use case when dealing with pipelines. For example, suppose we have only two stacks, `stack1` and `stack1/foo/bar`, and the second one is in a sub-assembly. The table below shows the behavior of the CLI before and after: | **Subcommand** | **Pattern** | **Matched stacks (before)** | **Matched stacks (after)** | |------------------------------|----------------|-----------------------------|----------------------------| | deploy, destroy, diff, synth | ε | stack1 | stack1 | | list | ε | stack1 | stack1, stack1/foo/bar | | metadata | ε | ∅ | ∅ | | _any_ | *, --all | stack1 | stack1 | | _any_ | ** | stack1 | stack1, stack1/foo/bar | | _any_ | stack1/** | ∅ | stack1/foo/bar | | _any_ | stack1 | stack1 | stack1 | | _any_ | stack1/foo/bar | ∅ | stack1/foo/bar | where: ε = empty string (no parameters) ∅ = empty results/error ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
…semblies Since #14379, `cdk ls` has outputted friendlier stack names for nested assemblies (e.g., with pipelines). However, `cdk ls --long` still outputs the less-friendly stack IDs.
…semblies (#17263) Since #14379, `cdk ls` has outputted friendlier stack names for nested assemblies (e.g., with pipelines). However, `cdk ls --long` still outputs the less-friendly stack IDs. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
…semblies (aws#17263) Since aws#14379, `cdk ls` has outputted friendlier stack names for nested assemblies (e.g., with pipelines). However, `cdk ls --long` still outputs the less-friendly stack IDs. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
This change allows users to address stacks located in nested assemblies, which is the common use case when dealing with pipelines. For example, suppose we have only two stacks,
stack1
andstack1/foo/bar
, and the second one is in a sub-assembly. The table below shows the behavior of the CLI before and after:where:
ε = empty string (no parameters)
∅ = empty results/error
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license