provider/scaleway: retry volume attachment #9972
Merged
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.
this PR fixes a flakyness in the
scaleway_volume_attachment
resource, asdescribed below:
when attaching/ detaching a volume from a
scaleway_server
, the server nebe stopped. even though the code already waits for the server to be stoppe
PatchServer
calls gets a400 server is being stopped or rebooted
errorresponse.
If the API returns the
400
we bail, leaving terraform in a broken state.Assuming this is the only error that the API might return to us, as the payload
itself is correct, this retry behaviour should fix the issue.
Tests are green, and I could not reproduce the flakyness in multiple test runs:
\cc @stack72 please take a look