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): properly shutdown subprocesses on abort #1605

Merged
merged 6 commits into from
Mar 3, 2022
Merged

Conversation

DanielMSchmidt
Copy link
Contributor

@DanielMSchmidt DanielMSchmidt commented Mar 1, 2022

This PR ensures that when we receive a termination signal we stop all corresponding node processes. I'd consider it out of scope to stop / delete terraform cloud runs. I'm not even sure if stopping requests for TFC is worth it.

Closes #771

You can see in the watch tab below how the terraform apply command is aborted
abort

Created #1607 as follow up to abort TFC runs

@DanielMSchmidt DanielMSchmidt force-pushed the add-abort-handling branch 2 times, most recently from 94b237b to c4f82f5 Compare March 2, 2022 15:51
@DanielMSchmidt DanielMSchmidt changed the base branch from main to detailed-diff-streaming-terraform-output March 2, 2022 15:52
@DanielMSchmidt DanielMSchmidt marked this pull request as ready for review March 2, 2022 15:52
@DanielMSchmidt DanielMSchmidt force-pushed the detailed-diff-streaming-terraform-output branch from c4eca9c to c74b507 Compare March 2, 2022 15:57
@DanielMSchmidt DanielMSchmidt force-pushed the add-abort-handling branch 2 times, most recently from 872545b to e58784f Compare March 2, 2022 16:16
packages/cdktf-cli/bin/cdktf Outdated Show resolved Hide resolved
packages/cdktf-cli/lib/models/terraform-cloud.ts Outdated Show resolved Hide resolved
packages/cdktf-cli/lib/server/WatchClient.ts Show resolved Hide resolved
@DanielMSchmidt DanielMSchmidt force-pushed the detailed-diff-streaming-terraform-output branch 4 times, most recently from a7e9912 to b1eec1c Compare March 3, 2022 12:04
Base automatically changed from detailed-diff-streaming-terraform-output to main March 3, 2022 12:32
@DanielMSchmidt DanielMSchmidt force-pushed the add-abort-handling branch 3 times, most recently from 273d401 to fa59466 Compare March 3, 2022 14:33
AbortController shipped in node 14.17, but only with an experimental feature flag.
This is hard to set and node 14 is LTS so we don't want to update to node 16, therefore
this polyfill will help us in the meantime.
@ansgarm ansgarm merged commit d48ab89 into main Mar 3, 2022
@ansgarm ansgarm deleted the add-abort-handling branch March 3, 2022 20:40
@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.

Aborting a hanging cdktf deploy leaves the underlying Terraform CLI process alive
2 participants