Skip to content

feat(hub): stop a stack's containers with it; a daemon's last telemetry is sent - #178

Merged
7schmiede merged 1 commit into
mainfrom
feat/stop-with-containers
Oct 21, 2026
Merged

7schmiede merged 1 commit into
mainfrom
feat/stop-with-containers

Conversation

@7schmiede

Copy link
Copy Markdown
Member

Why

From the pool's telemetry: a stack that runs only Compose containers was stopped from the dashboard three times; each time the daemon exited and every container kept running. The dashboard always stops with infra=false (ADR-0004: infrastructure is long-lived), and only devstack down --infra took the containers down. None of the three stops showed the daemon's own daemon_stopping/daemon_stop lines: telemetry is sent every 60 s and nothing was sent on exit.

Change

  • Stop dialog (header and sidebar): an option "Stop its containers too" (/hub/stacks/{id}/down?infra=true); volumes stay. Checked when the stack runs no service of its own, unchecked otherwise; not offered while lanes run (they keep the containers they share, ADR-0030). The confirm dialog gets an optional checkbox (ConfirmOption).
  • Telemetry: telemetry::flush sends what was kept since the last round to the pools of that round, at most 2 s, without gauges; the daemon calls it after daemon_stop.

Tests

  • stores.test.ts: containers-only stack → option checked, infra=true; unchecked → infra=false; with services → offered unchecked.
  • telemetry.rs: flush keeps lines when not sending, takes and sends them when on, within its bound; the tests that touch the module's globals now hold a lock.
  • cargo clippy --workspace --all-targets clean, cargo test -p devstack-daemon, npm run typecheck, vitest run.

🤖 Generated with Claude Code

…ry is sent

- The dashboard's stop dialog (header and sidebar) offers "Stop its
  containers too" (`down?infra=true`, as `devstack down --infra`). It is
  checked when the stack runs nothing but containers: there a stop without
  them left everything running and only ended the daemon. Not offered
  while lanes run, which keep the containers they share (ADR-0030).
- The daemon sends what it kept since the last telemetry round as it
  exits, 2 s at most, to the pools of that round: its stop and whatever
  went wrong while stopping were dropped before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@7schmiede
7schmiede force-pushed the feat/stop-with-containers branch from 9d1a99a to 4997b33 Compare October 21, 2026 13:35
@7schmiede
7schmiede merged commit c5b45e5 into main Oct 21, 2026
@7schmiede 7schmiede mentioned this pull request Oct 21, 2026
@7schmiede
7schmiede deleted the feat/stop-with-containers 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