fix(integration): scope preclean to galaxy.stack=integration #14
Reference in New Issue
Block a user
Delete Branch "feature/preclean-stack-scope"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Root cause for the long-standing "Dev Sandbox flips to
cancelledafter dev-deploy" symptom in push-triggered cycles:integration/scripts/preclean.shwas unscoped — itdocker rm -f'd every container withgalaxy.backend=1, including the dev-deploy engines living on the same Docker daemon. Each post-merge auto-deploy hadintegration.yamlanddev-deploy.yamlrunning in parallel, and the integration preclean wiped the dev sandbox engine. The new backend's reconciler then observedcontainer disappearedand caskaded the sandbox tocancelled.Reproduction was captured live during the previous PR's merge:
Changes
integration/testenv/backend.go— passBACKEND_STACK_LABEL=integrationto every backend-under-test, so its engines carrygalaxy.stack=integrationin addition togalaxy.backend=1.integration/scripts/preclean.sh—remove_containers_with_labelnow accepts multiple labels (AND-combined). The engine cleanup is scoped togalaxy.backend=1 AND galaxy.stack=integration. dev-deploy and local-dev engines stamped with differentgalaxy.stackvalues are no longer collateral.docs/ARCHITECTURE.md— Container labels section refreshed to call out the AND-scoping rule.tools/dev-deploy/KNOWN-ISSUES.md— sandbox-cancel entry downgraded fromparkedtopartially fixed(push-triggered cycles); separate new entry for thedocker restart galaxy-dev-backendfailure caused by the runner-workspace bind-mount that surfaced while diagnosing this issue.Test plan
go build ./backend/... ./integration/...— clean.bash -n integration/scripts/preclean.sh— syntax OK.galaxy-game-80f3ce86-...keeps running.go-unit+integrationgreen.running.