Open
Conversation
Signed-off-by: Peter Jausovec <peter.jausovec@solo.io>
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes local platform undeploy behavior when removing the final service would leave a Compose project with no services (avoiding docker compose up failures that prevent deletion of failed/zombie deployments).
Changes:
- Add
docker compose downsupport for the local platform runtime. - Switch local undeploy/apply flows to call compose down when the composed services set becomes empty.
- Add a regression test covering the “no services remain” undeploy path.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| internal/registry/platforms/local/deployment_adapter_local_platform.go | Adds ComposeDownLocalPlatform() helper to stop/remove the local compose runtime. |
| internal/registry/platforms/local/deployment_adapter_local.go | Calls compose down instead of up when the resulting compose service set is empty. |
| internal/registry/platforms/local/deployment_adapter_local_test.go | Adds test to ensure undeploy triggers compose down (and not compose up) when no services remain. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Peter Jausovec <peter.jausovec@solo.io>
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.
Description
UndeployDeployment calls adapter.Undeploy() first, and only deletes the DB record if that succeeds. The adapter's undeploy strategy is to remove the deployment's services from the compose file, then run docker compose up -d --remove-orphans to reconcile the running state. When the deleted deployment was the last (or only) service, the compose file ends up with zero services, and docker compose up fails with "no service selected". This error propagates all the way up, so the DB record is never deleted — leaving a zombie deployment that can never be removed.
fixes #371
Change Type
Changelog