-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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] extends
with depends_on
does not appear to start dependencies with version 2.32.1
#12436
Comments
This is the expected behavior, as documented on https://github.com/compose-spec/compose-spec/blob/main/05-services.md#restrictions earlier release didn't checked this restriction |
For your information: This restriction is a legacy rule we inherit from 4c582e4 (see |
What about the case when extended service depends on condition, e.g. service_healthy? As I see, with the version 2.32.1 it doesn't work anymore even when depends_on is specified again in the extending file, e.g.:
In this case, web-service doesn't wait for rabbitmq to become healthy (which it did in previous versions). Is that also expected? |
proposed compose-spec/compose-spec#554 |
Thank you very much for the additional information. I'm not sure if it helps but I can provide a bit more detail on my use case: I have a large docker-compose file that is used to spin up an integration environment for testing in. When developing, I want to use the same structure but I need to make some modifications to the main container that is hosting the software under development for it to be usable in that manner. Extending the service allows me to easily keep the large configuration with just some smaller adjustments to it. For my use case, the previous behaviour where the depends on clause was extended is beneficial for me. As I re-read the docs after the first comment and thought about it, I was guessing that it could have issues related to transitive dependencies that were defined somewhere else. I think my desired behaviour would be to have |
compose file is way more flexible today that it used to be, and indeed relying on |
@ndeloof I fail to understand how the restrictions are relevant with this compose file:
This should be invalid, but I can start the s2 service with |
sure, this specific issue is same as #12402 already fixed by compose-spec/compose-go#721 |
I have the same issue but with If a service of the current compose |
Closing as a duplicate for #12402 |
Description
With docker compose version
2.32.1
, usingextends
withdepends_on
does not launch dependencies anymore. Downgrading to2.31.0
works as expected.If this is user error or not expected to work, please let me know. I'm happy to provide any more information or perform testing as required.
Steps To Reproduce
2.32.1
docker compose up nginx-deps-work
other-nginx
as the dependencydocker compose down -v
docker compose up nginx-extend-deps-fail
other-nginx
dependency is missing2.31.0
and repeat the above stepsother-nginx
dependency is starteddocker-compose.yml
docker-compose-extends.yml
Compose Version
Docker Environment
Anything else?
No response
The text was updated successfully, but these errors were encountered: