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

オープン 初心者向け
#6,115 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@AyhamJo7 がすでに取り組んでいます。

2026年11月25日 から。

  • #6118 @AyhamJo7 による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
85/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
docker, typescript
領域
backend

調査の方向性

packages/server/src/services/docker.ts の getStackTaskContainers から始めてください。ここでは Docker のタスク行がトリムされ、| で分割され、Error: フィールドラベルが削除されます。issue の末尾が空のフィールドのケースを再現し、最後の行ではラベルが残る一方で以前の行が空になる理由を調べてください。修正では末尾のスペースとは独立してラベルを除去し、リグレッションカバレッジでは空のエラー2件と最後の非空エラー1件をカバーする必要があります。完了とは、Docker がエラーを報告しないときに Containers タブが Running … のみを表示することです。

索引モデルが issue の本文から書いたものです。

説明

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

主要言語
TypeScript
スター
38.8k
フォーク
3.2k
平均マージ
1日 10時間
マージ済み PR(30日)
110

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Dokploy/dokploy のほかの issue

Dokploy/dokploy の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。