Repository navigation
fix(ac): finish delete when container stop errors but the container stopped anyway - #1225
Merged
Merged
Conversation
`container stop` (0.1.0) occasionally exits with "internalError: stop failed for one or more containers" for a container it did stop. Destroy treated that as fatal and never ran `container rm`, so `onctl delete` reported "Cannot destroy VM" and left the sandbox behind as stopped. Re-read the container's state after a failed stop and carry on with the delete when it is stopped; still fail when it is not. Claude-Session: https://claude.ai/code/session_01HJvsvJw8cZfuUwPFRQXV5k
cdalar
force-pushed
the
fix/ac-destroy-stop-internal-error
branch
from
October 22, 2026 22:18
5fdcd32 to
5997948
Compare
Codecov Reportβ
All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1225 +/- ##
==========================================
+ Coverage 46.72% 46.73% +0.01%
==========================================
Files 75 75
Lines 8783 8785 +2
==========================================
+ Hits 4104 4106 +2
Misses 4679 4679 β View full report in Codecov by Harness. π New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
onctl deleteon theacprovider failed with:while
onctl lsright after showed the container asstopped.container stop(0.1.0) sometimes reports an internalError for a container it did stop;Destroytook the exit code at face value and never rancontainer rm, leaving the sandbox behind.Destroynow re-reads the container's state after a failed stop and continues with the delete when it is stopped. A stop that leaves the container running still aborts the delete as before.Test plan
TestAC_Destroy_StopFailsButStopped: stop errors, container reads stopped on the next list,rmruns and the container is gone. Fails onmain, passes here.TestAC_Destroy_StopFailsstill proves a stop that leaves the container running never reachesrm.go vet ./pkg/cloud/andgo test ./pkg/cloud/pass.π€ Generated with Claude Code
https://claude.ai/code/session_01HJvsvJw8cZfuUwPFRQXV5k