Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

stack: a database helper stays behind as a `Created` container when readiness times out mid-create

Đã đóng
#7,063 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Một pull request liên quan đã được merge.

  • #7062 của @just-some-random-pal — đã đóng, không merge
  • #7068 của @just-some-random-pal — đã merge

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
18/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
docker, typescript
Lĩnh vực
cli, devops

Hướng nghiên cứu

Start in DockerDatabaseStorage.startAttachedHelper, where the helper is launched with docker run --rm -i and removed with rm -f on timeout, then check the fake engines in DockerDatabaseStorage.integration.test.ts and the permissive fake in Container.integration.test.ts. Linked PR #7068 is already open, so confirm its status before starting. Done means the helper can be removed by name whether or not it became ready, and the fake-engine tests cover a create that outlasts the timeout.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

🐛 Bug open-for-contribution supabase/cli
Affected area

Local development

Supabase CLI version

v2.121.0-beta.11; the code path is the develop stack runtime after #7014.

Operating system

macOS 26.4, Docker Engine 25.0.3 (Docker Desktop)

Installation method

npm

Command
docker ps -a --filter label=com.supabase.stack-managed=true --filter status=created
Actual output

A supabase-db-helper-<id> container in Created state that nothing ever starts. It carries the stack labels and still references the database volume, so a following stack destroy runs destroyNamespace against a volume that this container holds.

How it happens: DockerDatabaseStorage.startAttachedHelper starts the helper with docker run --rm -i --name <name> … and waits up to 30 seconds for the ready line. On timeout it kills the run client and removes the helper with rm -f <name>. But run creates the container on the daemon side, and that create keeps going after the client dies. If the create itself outlasts the timeout, rm -f runs before the container exists and finds nothing. The daemon then finishes the create, nothing starts the container, --rm never fires, and the Created container is left behind. @jgoux reproduced it by killing a run client mid-create (https://github.com/supabase/cli/pull/7014#discussion_r4206642325); @avallete confirmed the mechanism and suggested handling it as a separate change.

Expected output

No container is left behind. Every helper the stack created can be removed by name, whether or not it became ready.

Additional context

Proposed fix, as discussed in #7014: start the helper with docker create --rm -i --name <name> … followed by docker start --attach --interactive <name>. The name then exists before any readiness timeout can fire, so rm -f always finds it. create --rm -i sets the same AutoRemove and StdinOnce as run --rm -i (checked on Docker 29 in that thread), so stdin EOF from a dead attached client still ends the helper. Scope: the helper start, the three fake engines in DockerDatabaseStorage.integration.test.ts, the permissive fake in Container.integration.test.ts, and a re-check on Podman.

I have this implemented on a branch and will open the PR once this issue is labeled open-for-contribution (the Contribution Gate closed #7062 for lacking a linked issue).

Ngôn ngữ chính
TypeScript
Star
2.4k
Fork
533
Merge trung bình
22 giờ 20 phút
Pull request đã merge (30 ngày)
370

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của supabase/cli

Tất cả issue của supabase/cli

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.