Skip to content

feat(profiles): a profile can leave out containers, whole Compose groups and services (ADR-0058) - #246

Merged
7schmiede merged 3 commits into
mainfrom
feat/profile-skip
Oct 23, 2026
Merged

7schmiede merged 3 commits into
mainfrom
feat/profile-skip

Conversation

@7schmiede

@7schmiede 7schmiede commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Summary

Refs #244. A profile's autostart takes [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 outlive devstack down and the point is to free memory. A group with nothing left is not started. A main_ports port 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:

    • an entry that names no group, container or service;
    • a name in both autostart and skip;
    • a service that starts with the profile and uses a skipped container's address (a {compose.…} placeholder in run/env/workers.env/ensure_dirs, the profile's env included, or rewrite_hosts), since its start would fail with "not published".

    after alone is fine: the service starts without waiting. There is also a requires = "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 autostart to containers: today autostart = ["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-targets

  • cargo test for devstack-config (new: tests/profiles.rs, 4 tests), devstack-compose, devstack-daemon, devstack-node, devstack-skills, devstack, devstack-hub

  • New Docker-only integration test a_profile_leaves_out_containers, run locally on Windows with Docker Desktop (DEVSTACK_INTEGRATION_COMPOSE=1). It checks that:

    • a plain up runs everything, and down keeps the containers;
    • up --profile lite stops the skipped container and group and keeps the rest;
    • devstack start compose.app.scanner starts the skipped container again.

    CI runs it on Linux and skips it on Windows/macOS, like the other Compose tests.

🤖 Generated with Claude Code

7schmiede and others added 2 commits October 23, 2026 17:02
… 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>
@7schmiede
7schmiede merged commit 71a7d74 into main Oct 23, 2026
13 checks passed
@7schmiede
7schmiede deleted the feat/profile-skip branch October 23, 2026 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant