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

toolkit: make cdk synth to stdout not automatically select dependency stacks #1783

Closed
skinny85 opened this issue Feb 18, 2019 · 0 comments · Fixed by #1807
Closed

toolkit: make cdk synth to stdout not automatically select dependency stacks #1783

skinny85 opened this issue Feb 18, 2019 · 0 comments · Fixed by #1807
Labels
bug This issue is a bug. package/tools Related to AWS CDK Tools or CLI

Comments

@skinny85
Copy link
Contributor

Right now, if you in your code, you do:

const stack1 = new Stack(app, 'Stack1');
const stack2 = new Stack(app, 'Stack2');

stack1.addDependency(stack2);

You can no longer invoke cdk synth for Stack1. Even if you call cdk synth Stack1, you will get the following error:

Multiple stacks selected (Stack1, Stack2), but output is directed to stdout. Either select one stack, or use --output to send templates to a directory.

Removing the stack1.addDependency(stack2) line makes cdk synth work again.

@rix0rrr rix0rrr changed the title cdk synth and Stack dependencies are in an unsolvable conflict toolkit: make cdk synth to stdout not automatically select dependency stacks Feb 19, 2019
@rix0rrr rix0rrr added bug This issue is a bug. package/tools Related to AWS CDK Tools or CLI labels Feb 19, 2019
rix0rrr pushed a commit that referenced this issue Feb 20, 2019
If we report synthesis errors, they should only prevent the
affected stack from deploying; right now, since they are checked
during the synthesis step, they would abort the entire toolkit
run regardless of whether they would be selected or not.

Makes it possible to do region-dependent verification.

Fixes #1784.

ALSO IN THIS COMMIT

If the 'cdk synth' output goes to the screen, don't automatically
select upstream stacks for synthesis (as that would lead to an
immediate error).

Fixes #1783.
rix0rrr added a commit that referenced this issue Feb 22, 2019
If we report synthesis errors, they should only prevent the
affected stack from deploying; right now, since they are checked
during the synthesis step, they would abort the entire toolkit
run regardless of whether they would be selected or not.

Makes it possible to do region-dependent verification.

Fixes #1784.

ALSO IN THIS COMMIT

If the 'cdk synth' output goes to the screen, don't automatically
select upstream stacks for synthesis (as that would lead to an
immediate error).

Fixes #1783.
eladb pushed a commit that referenced this issue Feb 26, 2019
If we report synthesis errors, they should only prevent the
affected stack from deploying; right now, since they are checked
during the synthesis step, they would abort the entire toolkit
run regardless of whether they would be selected or not.

Makes it possible to do region-dependent verification.

Fixes #1784.

ALSO IN THIS COMMIT

If the 'cdk synth' output goes to the screen, don't automatically
select upstream stacks for synthesis (as that would lead to an
immediate error).

Fixes #1783.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. package/tools Related to AWS CDK Tools or CLI
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants