-
Notifications
You must be signed in to change notification settings - Fork 59
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
Clean up volumes if workspace preparation fails #1021
Clean up volumes if workspace preparation fails #1021
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.
Left one comment about preserving error reporting from the Close
method. Thanks for the fix!
_ = deleteVolume(ctx, w.volume) | ||
return nil |
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.
_ = deleteVolume(ctx, w.volume) | |
return nil | |
return deleteVolume(ctx, w.volume) |
To keep the error reporting
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.
D'oh, not sure how I misread the code. I'll fix.
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.
Fixed, thanks for pointing out!
24890ef
to
0172845
Compare
0172845
to
970f0d3
Compare
I also fixed the tests this round. Let me know what you think. |
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.
LGTM.
Thanks for the fix.
If workspace preparation fails, the temporary Docker volume is not cleaned up.
Test plan
I'll need help filling in this bit. Apart from manually inducing an error with the workspace process, how else? I could possibly build locally a broken batch-change container image that doesn't have Git nor unzip?