fix(sandbox): default the pool size when tearing down, as startup does - #18629
fix(sandbox): default the pool size when tearing down, as startup does#18629marmar9615-cloud wants to merge 2 commits into
Conversation
start.sh defaults SANDBOX_EXECUTOR_MANAGER_POOL_SIZE to 5 whether or not .env supplies it, so it creates and cleans indices 0..4. stop.sh and the Makefile clean target source .env and then use the variable bare, so an .env that omits it leaves the range 0..-1 and the containers startup created are not removed, while both still report cleanup complete. Mirror the default start.sh already applies. An .env that sets the value is unaffected.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughSandbox cleanup now defaults ChangesSandbox cleanup
Estimated code review effort: 1 (Trivial) | ~2 minutes Merge Risk: ⚪ Minimal · up to The change aligns teardown defaults with startup so sandbox containers are cleaned up when the pool size is omitted; no actionable merge-blocking risk remains after normal checks and review. Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Startup and teardown disagree about how many sandbox containers exist.
scripts/start.sh:26applies a default whether or not.envsupplies the value, and:32applies the same one when.envis absent:scripts/stop.sh:29and thecleantarget inMakefilebothsource .envand then use the variable bare:If
.envexists but does not setSANDBOX_EXECUTOR_MANAGER_POOL_SIZE, the arithmetic evaluates to-1, so the range is0..-1and the pool containersstart.shcreated are not removed. Both paths then print their success line regardless —✅ Stopping and cleanup complete— so nothing signals that the cleanup did not happen.This mirrors the default
start.shalready applies. An.envthat sets the value is unaffected:.env-14(indices 0-4, matchingstart.sh)877Scope note: this is deliberately only the missing default.
stop.shalso skips cleanup entirely when.envis absent whilestart.shproceeds on defaults, but changing that alters behavior rather than restoring the two into agreement, so it is left alone here..env.exampledoes ship the variable at line 3, so a.envcopied from it is already fine. This is about the case where it has been trimmed or hand-written, where the current failure is silent.Verified against
upstream/mainate9cace9a.bash -n agent/sandbox/scripts/stop.shpasses andmake -n cleanexpands as intended.