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

testing framework: refactor interrupt logic for immediate exits #33532

Merged
merged 3 commits into from
Jul 19, 2023

Conversation

liamcervante
Copy link
Member

This PR refactors the interrupt logic within the Terraform test framework.

Previously, it always finished the current execution so that it could print out the existing infrastructure so that this data wasn't lost. This meant that a stuck operation would never finish, but it was safe from the perspective of data loss being captured.

This PR modifies the interrupt logic so that it skips all cleanup, and prints out the relevant information immediately. It also introduces a 5 second timeout after a fatal interrupt so that users can always exit a test operation. This is safe now that Terraform will print out the relevant information immediately, instead of waiting for the current operation to finish.

@liamcervante liamcervante requested a review from a team July 17, 2023 11:00
@liamcervante liamcervante merged commit 6c7db16 into main Jul 19, 2023
4 checks passed
@liamcervante liamcervante deleted the liamcervante/tests/interrupts branch July 19, 2023 08:31
@github-actions
Copy link

Reminder for the merging maintainer: if this is a user-visible change, please update the changelog on the appropriate release branch.

Copy link

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 contributions.
If you have 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 Dec 13, 2023
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.

2 participants