Repository navigation
Preserve GCE bulk creation progress on timeout - #2194
Conversation
Expose completed node results and pending node names in a specific LibcloudError so callers can recover or clean up resources after a timeout. Pending operations may still complete; no resources are automatically deleted. Fixes apache#1589
|
Gentle follow-up on this PR from October 11. GitHub currently reports no checks and there has not been review feedback yet. Could a maintainer let me know whether CI should be run or if any changes are needed? |
micafer
left a comment
There was a problem hiding this comment.
LGTM.
This is a useful improvement to ex_create_multiple_nodes(). Preserving completed results and unresolved node names in a dedicated LibcloudError subclass gives callers the information they need to recover from partial creation failures.
The implementation is straightforward, and the regression tests cover both a mixed successful/failed/pending scenario and a timeout before creation starts.
One minor documentation suggestion: pending_node_names can also include nodes whose creation was never initiated (as demonstrated by the timeout=0 test), not only operations that may still be running. It might be worth clarifying this distinction in the exception docstring.
Otherwise, this looks good to merge.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## trunk #2194 +/- ##
==========================================
+ Coverage 83.57% 83.58% +0.01%
==========================================
Files 352 352
Lines 82082 82117 +35
Branches 8802 8808 +6
==========================================
+ Hits 68594 68634 +40
+ Misses 10612 10608 -4
+ Partials 2876 2875 -1
🚀 New features to boost your workflow:
|
|
Thanks, good point. I've updated the exception docstring to clarify that The change is in bb773ba. I checked Python compilation and whitespace; this only changes the documentation. |
Description
Fixes #1589. When
ex_create_multiple_nodestimes out after some nodes have been created, its generic exception discards all progress. Callers cannot retrieve known results to recover or clean up their cloud resources.Raise
GCEMultipleNodesTimeoutError, aLibcloudErrorsubclass, carryingnodes(known successful or failed results, in request order) andpending_node_names(results still unknown). Include the timeout value in the message. Existing successful calls still return the same list. Resources are not automatically deleted, and the documentation warns that pending operations can finish after the timeout.Validation
Status
Ready for review.
Checklist
AI assistance: This implementation, regression tests, and description were prepared with OpenAI Codex.