Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] depends_on attributes are lost from services using the extends attribute #12426

Open
phantomwhale opened this issue Jan 1, 2025 · 3 comments

Comments

@phantomwhale
Copy link

Description

Introduced in version 2.32.1, when a service is defined with the extends attribute, the depends_on attribute data is lost.

There may be a more generalised problem at play, of course, but for the templates we have defined, this is the issue we are setting

Steps To Reproduce

Using the following docker-compose.yml file:

services:
  template:
    image: tiny

  container_one:
    extends: template
    depends_on:
      - container_two

  container_two:
    image: tiny

Running using docker compose v2.29.7:

❯ docker compose version                           
Docker Compose version v2.29.7

❯ docker compose config
name: test
services:
  container_one:
    depends_on:
      container_two:
        condition: service_started
        required: true
    image: tiny
    networks:
      default: null
  container_two:
    image: tiny
    networks:
      default: null
  template:
    image: tiny
    networks:
      default: null
networks:
  default:
    name: test_default

Running under docker compose v2.32.1:

❯ docker compose version                          
Docker Compose version 2.32.1

❯ docker compose config
name: test
services:
  container_one:
    image: tiny
    networks:
      default: null
  container_two:
    image: tiny
    networks:
      default: null
  template:
    image: tiny
    networks:
      default: null
networks:
  default:
    name: test_default

Compose Version

Noted in the examples above

Docker Environment

Client:
 Version:    27.3.1
 Context:    orbstack
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.18.0
    Path:     /Users/ben/.docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.29.7
    Path:     /Users/ben/.docker/cli-plugins/docker-compose

Server:
 Containers: 22
  Running: 2
  Paused: 0
  Stopped: 20
 Images: 10
 Server Version: 27.3.1
 Storage Driver: overlay2
  Backing Filesystem: btrfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 207ad711eabd375a01713109a8a197d197ff6542
 runc version: 7cb363254b69e10320360b63fb73e0ffb5da7bf2
 init version: de40ad0
 Security Options:
  seccomp
   Profile: builtin
  cgroupns
 Kernel Version: 6.12.5-orbstack-00287-gf8da5d508983
 Operating System: OrbStack
 OSType: linux
 Architecture: aarch64
 CPUs: 11
 Total Memory: 11.73GiB
 Name: orbstack
 ID: dcec5066-c077-4338-ad37-4a03c3049871
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false
 Product License: Community Engine
 Default Address Pools:
   Base: 192.168.97.0/24, Size: 24
   Base: 192.168.107.0/24, Size: 24
   Base: 192.168.117.0/24, Size: 24
   Base: 192.168.147.0/24, Size: 24
   Base: 192.168.148.0/24, Size: 24
   Base: 192.168.155.0/24, Size: 24
   Base: 192.168.156.0/24, Size: 24
   Base: 192.168.158.0/24, Size: 24
   Base: 192.168.163.0/24, Size: 24
   Base: 192.168.164.0/24, Size: 24
   Base: 192.168.165.0/24, Size: 24
   Base: 192.168.166.0/24, Size: 24
   Base: 192.168.167.0/24, Size: 24
   Base: 192.168.171.0/24, Size: 24
   Base: 192.168.172.0/24, Size: 24
   Base: 192.168.181.0/24, Size: 24
   Base: 192.168.183.0/24, Size: 24
   Base: 192.168.186.0/24, Size: 24
   Base: 192.168.207.0/24, Size: 24
   Base: 192.168.214.0/24, Size: 24
   Base: 192.168.215.0/24, Size: 24
   Base: 192.168.216.0/24, Size: 24
   Base: 192.168.223.0/24, Size: 24
   Base: 192.168.227.0/24, Size: 24
   Base: 192.168.228.0/24, Size: 24
   Base: 192.168.229.0/24, Size: 24
   Base: 192.168.237.0/24, Size: 24
   Base: 192.168.239.0/24, Size: 24
   Base: 192.168.242.0/24, Size: 24
   Base: 192.168.247.0/24, Size: 24

Anything else?

No response

@phantomwhale
Copy link
Author

Looks like this is a duplicate of #12425

@phantomwhale
Copy link
Author

Issue also present in 2.32.0

@thaJeztah
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants