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

Aperta Adatta ai principianti
#6,115 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@AyhamJo7 ci sta già lavorando.

Dal 25/11/2026.

  • #6118 di @AyhamJo7 — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
85/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
docker, typescript
Ambito
backend

Direzione di ricerca

Inizia in packages/server/src/services/docker.ts da getStackTaskContainers, dove le righe delle attività Docker vengono tagliate, divise su | e l’etichetta del campo Error: viene rimossa. Riproduci il caso del campo finale vuoto dall’issue e ispeziona perché la riga finale mantiene l’etichetta mentre le righe precedenti diventano vuote. La correzione dovrebbe rimuovere l’etichetta indipendentemente dallo spazio finale, e la copertura di regressione dovrebbe coprire due errori vuoti più un errore finale non vuoto; fatto significa che la scheda Containers mostra solo Running … quando Docker non segnala alcun errore.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Lingua principale
TypeScript
Stelle
38.8k
Fork
3.2k
Merge medio
1g 10h
PR unite (30g)
110

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Dokploy/dokploy

Tutte le issue di Dokploy/dokploy

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.