-
Notifications
You must be signed in to change notification settings - Fork 102
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
Update an error msg to avoid potential confusion #864
Conversation
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.
Can you please mention in the CHANGELOG that we changed the message within ErrWorkspaceStillProcessing? This might be a string that folks depend on.
tfe.go
Outdated
@@ -942,7 +942,7 @@ func checkResponseCode(r *http.Response) error { | |||
return ErrWorkspaceLockedCannotDelete | |||
} | |||
if errorPayloadContains(errs, "being processed") { | |||
return ErrWorkspaceStillProcessing | |||
return ErrWorkspaceStillProcessing // as of 2024-03-04, the error message coming from atlas is "Latest workspace state is being processed to discover resources, please try again later" |
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.
This comment would be useful to include in the godocs; you can move this comment above the definition for ErrWorkspaceStillProcessing
. I would also change atlas
to API
since that might lead to some confusion.
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.
Yes, I agree that I should say "the API" instead of Atlas. Thanks!
I am going to remove this comment though. It was meant for internal usage (for those who contribute to Atlas.) But as you mention, Atlas is irrelevant to the Public. So, for that reason, that comment also shouldn't be added to the godocs.
… Before the msg did not include the word state, so a customer, who had no resources in the workspace, misinterpret the msg and thought that it was saying that he had resources in the workspace and they were being processed
ca351fa
to
2b4fa09
Compare
Reminder to the contributor that merged this PR: if your changes have added important functionality or fixed a relevant bug, open a follow-up PR to update CHANGELOG.md with a note on your changes. |
Description
This go-tfe error
workspace is still being processed to discover resources
in combination with this provider-tfe errorTo delete this workspace without destroying the managed resources, add force_delete = true to the resource config
created confusion in a customer.He thought that the latter error msg was saying that his workspace had resources, when in reality he had no resources. And then he thought that the former error msg was confirming that he had resources associated with that workspace, and that they were being processed.
The customer had the intuition that perhaps these were errors related to having a state version that is in middle of processing changes, but because the errors were saying something different, he opened a ticket with Support.
The change that I am making here is to clarify that, yes, what is "still being processed" is the state version. I was able to verify this by looking at the context where the atlas error is created.
And then I am making this change to provider-tfe to mention that force-delete option can be used for when a state version is being process or when a workspace has resources: hashicorp/terraform-provider-tfe#1274
Testing plan
External links
Output from tests
Including output from tests may require access to a TFE instance. Ignore this section if you have no environment to test against.