Healthy Swarm task shows an empty `(Error:)` suffix on the last row of the Containers tab

Đang mở Phù hợp với người mới
#6,115 1 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

@AyhamJo7 đang làm issue này rồi.

Từ ngày 25/11/2026.

  • #6118 của @AyhamJo7 — đang mở

Đánh giá

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

Hướng nghiên cứu

Bắt đầu trong packages/server/src/services/docker.ts tại getStackTaskContainers, nơi các hàng tác vụ Docker được cắt khoảng trắng, tách trên | và nhãn trường Error: bị loại bỏ. Tái hiện trường hợp trường cuối rỗng từ issue và kiểm tra vì sao hàng cuối vẫn giữ nhãn trong khi các hàng trước đó trở nên rỗng. Bản sửa nên loại bỏ nhãn độc lập với khoảng trắng cuối, và độ phủ hồi quy nên bao gồm hai lỗi rỗng cộng với một lỗi cuối không rỗng; hoàn tất nghĩa là tab Containers chỉ hiển thị Running … khi Docker không báo lỗi.

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

Mô tả

needs-triage🔍
To Reproduce
  1. In Dokploy, deploy a Docker Stack with at least two running tasks. Open the stack’s Containers tab.
  2. On the Swarm manager, run docker stack ps <stack> --no-trunc --filter desired-state=running --format '{{.ID}} | {{.CurrentState}} | {{json .Error}}'. Pick the last task and confirm its error is an empty string ("").
  3. Compare that task’s status on the Containers tab with the status of the preceding task.
Current vs. Expected behavior

The final row displayed running and Running 42 seconds ago (Error:). I matched the task ID on the manager: Docker reported running, the service was 1/1, and docker inspect --type task showed no Status.Err field. The application also started successfully.

Expected: Running 42 seconds ago. A suffix should appear only when Docker supplies an actual error message.

Provide environment information
Dokploy v0.31.4 (self-hosted)
Docker Stack on a remote Linux Swarm cluster
Affected view: Compose → Containers
Which area(s) are affected? (Select all that apply)

Docker Compose

Are you deploying the applications where Dokploy is installed or on a remote server?

Remote server

Additional context

In getStackTaskContainers in v0.31.4, tasksSection.trim() removes the space after the final Error:. The parser then strips the literal Error: , including its trailing space. For the last row the label survives as the nonempty string Error:, which is appended to the status.

Minimal parser reproduction using two empty Docker error fields:

const rows = ['web.1', 'web.2'].map(name =>
  `TASK : id | Name: ${name} | Node: worker | CurrentState: Running | Error: `
);
const errors = (rows.join('\n') + '\n').trim().split('\n').map(line =>
  line.split(' | ')[4].replace('Error: ', '').trim()
);
console.log(errors); // ['', 'Error:']

Stripping the field label independently of trailing whitespace (e.g. replace(/^Error:\s*/, '')) would handle the empty final field. A regression test could cover empty errors on both rows and a nonempty error on the final row.

Will you send a PR to fix it?

No

Ngôn ngữ chính
TypeScript
Star
38.8k
Fork
3.2k
Merge trung bình
1 ngày 10 giờ
Pull request đã merge (30 ngày)
110

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

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

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 Dokploy/dokploy

Tất cả issue của Dokploy/dokploy

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.