Skip to content

status and the compose-project migration check make dozens of engine calls #4458

Backlog

Description

@pithead-developer

What's the problem

stack_status (lib/pithead/04-status.sh:164,169) runs docker compose ps -aq <service> and docker inspect <id> per service, plus a fixed 3 second sleep for the restart snapshot (lib/pithead/04a-container-restarts.sh:21).
migrate_compose_project (lib/pithead/01-lifecycle.sh:11-47) runs on every up and apply. In any install directory not named pithead it runs compose config, one docker ps -aq per container, and one inspect per hit.

What it impacts

Anyone running status, up, apply or upgrade, especially in the versioned install layout.
On a DIY test server status took 5.1 s, 3 s of it the fixed sleep.

How I found it

Counted with a stub engine. status with 11 expected services made 28 calls. The migration check made 23 calls with a running stack and 12 with none (1 plus N, plus N inspects only when containers exist); in a directory named pithead it made one.
The 23 figure holds only when the stack is running.

Code references are from develop at 32d9834a. Checked for an existing issue: none found.

How important is it

Low: a fixed cost per command, not a failure, so it fits the next feature release.

Acceptance criteria

  • A stub-engine test asserts status and the migration check make at most a small fixed number of engine calls (for example 3) regardless of service count. It fails today.
  • Output of status is unchanged.

Possible solutions

  • Smallest: one docker ps -aq --filter label=com.docker.compose.project=<dir> first in the migration check, returning at once when empty.
  • For status, one docker compose ps -a --format json read once, and fetch the dashboard state once and pass it down.

Activity

  1. added this to the v2.1.0 milestone on Nov 24, 2026
  2. added
    performance
    on Nov 24, 2026
  3. added
    operator-hold
    and removed
    operator-hold
    on Nov 24, 2026
  4. pithead-developer commented on Nov 26, 2026

    @pithead-developer
    ContributorAuthor

    Waiting on a transient bench_outage condition, not on another issue. the runner could not read the bench to confirm that no job still runs on the PR head (<urlopen error [Errno 61] Connection refused>). The runner re-checks it (first at 2026-11-26T17:10Z, at most 5 times).

  5. pithead-architect commented on Nov 27, 2026

    @pithead-architect

    Release regroom (owner request, 2026-11-27): moved from v2.1.0 to v2.1.1. CLI performance fix fits the CLI port milestone; its PR stays on the same base group.

  6. pithead-developer commented on Nov 28, 2026

    @pithead-developer
    ContributorAuthor

    Blocked on #4644. The required check Build image (dashboard) fails at head 962d972 in the Trivy CVE scan: libzstd1 CVE-2026-124851, HIGH, with a fix available in 1.5.7+dfsg-1+deb13u1. It sits in the Debian 13.7 base layer. This PR changes neither the dashboard image nor its dependencies. I confirmed the failing step and the CVE row in the job log. Issue pithead#4644 already tracks it, and it is open. I posted this explanation on PR #4490. The base needs to take the base-image fix. After it lands, bring the head up to date with develop-v2.1.0. Then submit the tier4-e2e targeted job on the new head; that submit is held until tiers 1 to 3 are green. The pending bench proof is the one that settles the carry-cleanup rows (F4490-3), once its two new artifacts (dashboard-carry.cleanup.log, lifecycle-restore.log) are read. The other required checks I read were green; 4 were still pending. No bench job exists on this head yet.

    The runner resumes this issue when that one closes.

  7. added
    blocked
    on Nov 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    blockedperformance

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions