Hacktoberfest 2026 : les issues que les mainteneurs ont marquées pour octobre, ouvertes et accessibles aux débutants. Parcourir les issues Hacktoberfest

[BUG] A start failure in one service aborts the start of unrelated services (unreleased regression)

Ouverte
#14,372 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
57/100
Type d'issue
Bug
Clarté
Clairement spécifiée
Activité
Active
Stack technique
docker-compose, go
Domaine
backend, devops

Piste de recherche

Start by tracing the Compose start phase and the shared context cancellation described in the issue, then compare that flow with v5.6.0. Reproduce with the provided compose.yaml and commands; inspect why a failing web start aborts work for unrelated services such as api and db. Done means the command still reports the web failure while unrelated starts and pre_start work already in progress can finish.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

kind/bug
Description

On main, when one node in the start phase fails (port conflict, failing hook, unhealthy required dependency, --wait-timeout), the failure cancels the context shared by the whole start phase. Start, health wait and pre_start work still in flight for unrelated services is aborted too.

Current behavior (main, 20ca59586): a service whose configuration changed is recreated (old container removed) but never started. It is left in created state, so a service that was running before the command ends up stopped. No message is printed for it, and its Waiting progress line never completes. A pre_start hook container that is still running is killed.

Expected behavior (as in v5.6.0): the command still fails because of the failing service, but a start already in progress for an unrelated service runs to completion.

This does not happen with v5.6.0, so it looks like an unreleased regression.

Steps To Reproduce
  1. With this compose.yaml:
    name: n1repro
    services:
      db:
        image: alpine:3.20
        command: sleep infinity
        healthcheck: { test: ["CMD", "true"], interval: 2s }
      api:
        image: alpine:3.20
        command: sleep infinity
        environment: { VERSION: "${VERSION:-1}" }
        depends_on: { db: { condition: service_healthy } }
      web:
        image: nginx:alpine
        ports: ["18089:80"]
    
  2. Start everything: VERSION=1 docker compose up -d --wait
  3. Stop web and take its port: docker compose stop web && docker run -d --name blocker -p 18089:80 nginx:alpine
  4. Change api's configuration and run up again: VERSION=2 docker compose up -d (fails on web, as expected)
  5. Check api: docker inspect -f '{{.State.Status}}' n1repro-api-1
    • v5.6.0: running, recreated with VERSION=2 (2/2 runs)
    • main 20ca59586: created (2/2 runs). The output ends with Container n1repro-db-1 Waiting, and nothing follows for db or api.
Compose Version
Docker Compose version dev   # built from main at 20ca59586 (bad)
Docker Compose version dev   # built from v5.6.0 (good)
Docker Environment
Server Version: 29.1.3
Operating System: Docker Desktop
OSType: linux
Architecture: arch64
Kernel Version: 6.12.54-linuxkit
Storage Driver: overlayfs
Anything else?

No response

Langage dominant
Go
Étoiles
38.4k
Forks
5.9k
Merge moyen
1 j 19 h
PR mergées (30 j)
66

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de docker/compose

Toutes les issues de docker/compose

Issues similaires

Plus d'issues Go

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.