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

Use godo action status for handling resize operation #522

Merged
merged 2 commits into from
Aug 1, 2023

Conversation

timoreimann
Copy link
Contributor

The documented state is now consistently used by the API.

The documented state is now consistently used by the API.
@timoreimann timoreimann requested a review from llDrLove August 1, 2023 06:22
@@ -210,7 +207,7 @@ func (d *Driver) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest)
"resized_from": int(snapshot.SizeGigaBytes),
"resized_to": int(volumeReq.SizeGigaBytes),
})
if action != nil && action.Status != doneActionStatus {
if action != nil && action.Status != godo.ActionCompleted {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@timoreimann , is this action != nil necessary since we didn't get an error from the .Resize() call ?

Also, here we check for action != nil when we don't do the same check on line 1052.

It's not really related to your PR but if we could make it consistent it would be better IMO.

@timoreimann timoreimann merged commit 4594d8f into master Aug 1, 2023
@timoreimann timoreimann deleted the update-resize-action-status-handling branch August 1, 2023 23:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants