Repository navigation
feat(profiles): a profile can leave out containers, whole Compose groups and services (ADR-0058) - #246
Merged
Conversation
… groups and services (Proposed) A profile's `autostart` takes `[services]` entries only, and a Compose group always starts every container it lists, so a light profile for daily work cannot leave out a heavy search engine or a virus scanner. The ADR proposes `[profiles.<name>] skip`: containers (`compose.<group>.<service>`), whole groups (`compose.<group>`) and services that do not start with the profile. Skipped containers that still run from an earlier start are stopped, stay startable on demand, and a starting service that needs a skipped container's address is an error in the profile's check. Refs #244 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ups and services (ADR-0058)
`[profiles.<name>] skip` lists what does not start with the profile:
`compose.<group>.<service>`, `compose.<group>` or a service. The tree's
start leaves skipped containers out of `docker compose up` and stops the
ones an earlier start left running; a group with nothing left is not
started. Skipped containers stay in the group, so `devstack start
compose.<group>.<service>` starts them on demand. A service that starts with
the profile and uses a skipped container's address (a `{compose.…}`
placeholder, `rewrite_hosts`) is an error in the profile's check; `after`
alone is not. A lane on a node neither checks nor creates what its profile
skips, and its daemon does not wait for a group left out completely.
`devstack check` warns about `skip` without `requires = "0.21.0"`.
Refs #244
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
Refs #244. A profile's
autostarttakes[services]only, and a Compose group always starts every container it lists, so a light profile for daily work cannot leave out a search engine (~2 GB) or a virus scanner.ADR-0058 (Accepted):
[profiles.<name>] skip = ["compose.search", "compose.app.scanner", "indexer"]: a whole group, a container, a service.Start: skipped containers are left out of
docker compose up. One that an earlier start left running is stopped, since containers outlivedevstack downand the point is to free memory. A group with nothing left is not started. Amain_portsport stays held and refuses connections while its container is down.On demand: skipped containers stay in the group, so
devstack start compose.app.scanner(dashboard, MCP) still starts them.Check: these entries are errors:
autostartandskip;{compose.…}placeholder inrun/env/workers.env/ensure_dirs, the profile'senvincluded, orrewrite_hosts), since its start would fail with "not published".afteralone is fine: the service starts without waiting. There is also arequires = "0.21.0"warning (SKIP_SINCE).Lane on a node: the agent neither checks nor creates what the profile skips, and the lane's daemon does not wait for a group that is left out completely.
Why not extend
autostartto containers: todayautostart = ["api", "web"]starts every container, so that would change existing profiles. See the ADR's alternatives.Test plan
cargo fmt --check,cargo clippy --workspace --all-targetscargo testfor devstack-config (new:tests/profiles.rs, 4 tests), devstack-compose, devstack-daemon, devstack-node, devstack-skills, devstack, devstack-hubNew Docker-only integration test
a_profile_leaves_out_containers, run locally on Windows with Docker Desktop (DEVSTACK_INTEGRATION_COMPOSE=1). It checks that:upruns everything, anddownkeeps the containers;up --profile litestops the skipped container and group and keeps the rest;devstack start compose.app.scannerstarts the skipped container again.CI runs it on Linux and skips it on Windows/macOS, like the other Compose tests.
🤖 Generated with Claude Code