-
Notifications
You must be signed in to change notification settings - Fork 162
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Fix workspace panic #162
Merged
Merged
Fix workspace panic #162
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lafentres
reviewed
Apr 23, 2020
caseylang
approved these changes
Apr 23, 2020
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.
Tested locally with success!
lafentres
approved these changes
Apr 23, 2020
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 can't reproduce the panic but this code looks good, the other steps work, and it looks like how we handle this scenario for other resource reads so 🎉
5b9609b
to
b2a4975
Compare
Example Output: 2020/04/26 15:48:27 [DEBUG] Workspace ws-CJygBQQU156fwXGF no longer exists
b2a4975
to
9aedfa7
Compare
57ad44f
to
77addab
Compare
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
As reported in #149 the provider will panic if a workspace that is managed by Terraform is deleted from the web app. This PR pulls in the fix from from @sean-nixon in #150.
I added a failing test case to confirm the behavior before cherry picking the fix so we can be sure it was addressed.
Testing plan
CircleCI ran both commits to demonstrate the failing and passing results:
TestAccTFEWorkspace_panic
in build 99Manual testing
Running tests
TESTARGS="-run TestAccTFEWorkspace_panic" make testacc |& pp
Failing Output
Passing Output:
Cleaning up the missing org
Send a
DELETE
for thetst-terraform
org which will not be cleaned up due to the panic.Output from acceptance tests