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

feat(cli): serial multi-stack deploys #1609

Merged
merged 14 commits into from
Mar 14, 2022

Conversation

DanielMSchmidt
Copy link
Contributor

The goal of this PR is to make a first step towards multi-stack deployments by running each deployment after another (with no parallelism). This ships a lot of the important infrastructure (running in the correct order, handling aborts, etc) while leaving the management of multiple deployments at the same time open for a follow up PR.

@vercel
Copy link

vercel bot commented Mar 4, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/hashicorp/terraform-cdk/FvbaiDzwQ5Ma5MYCBBVezBFEw18v
✅ Preview: https://terraform-cdk-git-multi-stack-deployment-auto-bd0b32-hashicorp.vercel.app

[Deployment for c10eeaf canceled]

@DanielMSchmidt DanielMSchmidt force-pushed the multi-stack-deployment-auto-approve-only branch from 6153a9a to 206b042 Compare March 4, 2022 12:22
@DanielMSchmidt DanielMSchmidt force-pushed the multi-stack-deployment-auto-approve-only branch from 206b042 to 14af2e7 Compare March 4, 2022 12:22
@DanielMSchmidt DanielMSchmidt force-pushed the multi-stack-deployment-auto-approve-only branch from 14af2e7 to 6702f42 Compare March 4, 2022 12:55
@DanielMSchmidt DanielMSchmidt force-pushed the multi-stack-deployment-auto-approve-only branch from 6702f42 to 23d27cb Compare March 4, 2022 13:42
@DanielMSchmidt DanielMSchmidt force-pushed the multi-stack-deployment-auto-approve-only branch from 23d27cb to fa3b679 Compare March 4, 2022 14:27
@DanielMSchmidt DanielMSchmidt force-pushed the multi-stack-deployment-auto-approve-only branch from fa3b679 to 9e5fd54 Compare March 4, 2022 14:35
@DanielMSchmidt DanielMSchmidt added the ci/update-snapshots When set on a PR a GH Action will update and push all snapshot tests label Mar 4, 2022
@github-actions github-actions bot added ci/updating-snapshots CI is currently updating this PR with new snapshot tests and removed ci/update-snapshots When set on a PR a GH Action will update and push all snapshot tests labels Mar 4, 2022
@github-actions github-actions bot removed the ci/updating-snapshots CI is currently updating this PR with new snapshot tests label Mar 4, 2022
@DanielMSchmidt DanielMSchmidt force-pushed the multi-stack-deployment-auto-approve-only branch from c10eeaf to c1bf94e Compare March 7, 2022 11:35
@DanielMSchmidt DanielMSchmidt force-pushed the multi-stack-deployment-auto-approve-only branch from c1bf94e to 9ef91e6 Compare March 7, 2022 15:39
@DanielMSchmidt DanielMSchmidt force-pushed the multi-stack-deployment-auto-approve-only branch from 9b7de8f to 209e948 Compare March 7, 2022 16:26
@jsteinich
Copy link
Collaborator

Synth, output, and maybe diff should support multiple stacks.

We should aim for parity with the AWS CDK with how multiple stacks are specified (https://docs.aws.amazon.com/cdk/v2/guide/cli.html#cli-stacks)

@DanielMSchmidt
Copy link
Contributor Author

Synth, output, and maybe diff should support multiple stacks.

Yeah, we are going to do this in separate PRs for synth and output 👍 Not sure how diff should be working, if there is a dependency there might be no way to diff (if the provider requires a previously provisioned endpoint to be there for example). How do you think this should look like?

We should aim for parity with the AWS CDK with how multiple stacks are specified

Yeah agreed, will be done in a later PR :)

@jsteinich
Copy link
Collaborator

Not sure how diff should be working, if there is a dependency there might be no way to diff (if the provider requires a previously provisioned endpoint to be there for example). How do you think this should look like?

I would expect it to try and diff the stacks using the same dependency ordering as other places. Yes, sometimes the diff would fail, but that's not really any different than how it works in HCL.

@DanielMSchmidt DanielMSchmidt force-pushed the multi-stack-deployment-auto-approve-only branch from 079555e to 257d9ed Compare March 10, 2022 15:15
@hashicorp-cla
Copy link

hashicorp-cla commented Mar 12, 2022

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@ansgarm ansgarm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work, @DanielMSchmidt 🎉

packages/cdktf-cli/lib/stack-execution.ts Outdated Show resolved Hide resolved
@DanielMSchmidt DanielMSchmidt merged commit 529488f into main Mar 14, 2022
@DanielMSchmidt DanielMSchmidt deleted the multi-stack-deployment-auto-approve-only branch March 14, 2022 12:34
This was referenced Mar 24, 2022
@github-actions
Copy link
Contributor

I'm going to lock this pull request because it has been closed for 30 days. This helps our maintainers find and focus on the active issues. If you've found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants