Skip to content

fix(sim-setup): report Compose db/redis state in status - #8370

Merged
waleedlatif1 merged 2 commits into
simstudioai:stagingfrom
AYANscyy2:fix/setup-status-compose-services
Sep 28, 2026
Merged

waleedlatif1 merged 2 commits into
simstudioai:stagingfrom
AYANscyy2:fix/setup-status-compose-services

Conversation

@AYANscyy2

@AYANscyy2 AYANscyy2 commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

On a Compose install, sim-setup status reports postgres and redis as absent while both are healthy. status only reads detectContainer, which matches the standalone names sim-postgres/sim-redis, but Compose names containers <project>-<service>-<n>.

For each detected Compose install, status now looks up the db and redis services by the com.docker.compose.project + com.docker.compose.service labels (same approach as configuration-sources.ts). Standalone lines still print for dev installs.

detectContainer is intentionally unchanged: dbContainer.managed / redisContainer.managed drive start/stop of standalone containers in db.ts, redis.ts and lifecycle.ts, so matching Compose containers there would make start run docker start sim-redis against a Compose stack.

Fixes #8353

Type of Change

  • Bug fix

Testing

  • Unit tests for Compose service state (running / stopped / absent, multi-replica)
  • bun run test in sim-setup passes; tsc --noEmit and Biome clean
  • Manual, Arch Linux + npx sim-setup --quick --mode compose:

Before (published sim-setup 1.0.30):


◆ Sim status

 ✓ Docker Compose (project sim-aa197283ec70 in /home/ayan/sim-test/sim)

 postgres (sim-postgres):  absent
 redis (sim-redis):     absent

 app (:3000)       ✓
 realtime (:3002)  ✓

After (this branch):


◆ Sim status

 ✓ Docker Compose (project sim-aa197283ec70 in /home/ayan/sim-test/sim)

 postgres (compose db):  running
 redis (compose redis):  running

 app (:3000)       ✓
 realtime (:3002)  ✓

After, with the db container stopped:


◆ Sim status

 ✓ Docker Compose (project sim-aa197283ec70 in /home/ayan/sim-test/sim)

 postgres (compose db):  stopped
 redis (compose redis):  running

 app (:3000)       ✓
 realtime (:3002)  ✓

The second point in the issue (stop run from another directory) is a separate change; happy to follow up.

Changes since first review

Both Greptile P2 findings are addressed in 5cc5659:

  • Failed probe no longer reads as absent. A failed docker ps -a now
    reports unknown; an empty result still means absent.
  • Status path is tested. Added coverage for the label query and the
    Compose-vs-standalone row selection.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Sep 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Sep 28, 2026 12:48pm UTC

Request Review

@greptile-apps

greptile-apps Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 4/5

[Medium risk] Adds database and cache state reporting to setup status.

The PR appears safe to merge, though status can misreport a service as absent when its Docker probe fails.

Findings

  1. P2 Failed probe appears as absent ▶
  2. P2 Status path remains untested ▶

Summary

The PR adds label-based Docker probes so status can display database and Redis container states for detected Compose installations, alongside standalone states when a dev installation is detected.

  • The probes currently conflate a failed Docker query with an absent service.
  • The added tests do not cover the Docker query or status selection.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Detected installs] --> B{Compose install?}
  B -->|Yes| C[Query Docker by project and service labels]
  B -->|No or dev also detected| D[Display standalone container states]
  C --> E[Reduce replica states]
  E --> F[Display db and redis status]
Loading

Reviews (1) · Last reviewed commit: "fix(sim-setup): report Compose db/redis ..."

Comment thread packages/sim-setup/src/lifecycle.ts Outdated
Comment thread packages/sim-setup/src/lifecycle.test.ts
@vercel

vercel Bot commented Sep 28, 2026

Copy link
Copy Markdown

@AYANscyy2 is attempting to deploy a commit to the Sim Team on Vercel.

A member of the Team first needs to authorize it.

@waleedlatif1
waleedlatif1 merged commit fc78ff0 into simstudioai:staging Sep 28, 2026
28 of 30 checks passed
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.

2 participants