-
Notifications
You must be signed in to change notification settings - Fork 485
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
podman-compose incorrectly solving service dependencies #462
Comments
extends does not imply https://github.com/compose-spec/compose-spec/blob/master/spec.md#extends currently |
I was able to reproduce the bug using this minimal yaml (busybox no ubuntu please)
the expected is only two |
please test latest devel |
Hello @muayyad-alsadi
Thank you for quick fix. |
welcome. |
Describe the bug
At the beginning I would thank you for developing podman-compose.
podman-compose does not correctly resolve extended services dependency from extends tag.
I have in example docker-compose.yml file below dependencies (see Reproduce steps):
ci-dev-bash2 (depends from) <- ci-dev-bash <- bash
and in the same file:
other-bash (depends from) <- bash.
I've added to every compose service unique mount to /tmp and check what podman command generated by podman-compose. I checked what mounts were added to every service from file.
To Reproduce
Steps to reproduce the behavior:
podman-compose run --rm --no-deps other-bash bash
Expected behavior
I expected for podman-compose service "other-bash" to have mounts only from "bash" and "other-bash" (result of correct solving services dependency):
_/tmp/service_bash:/tmp/service_bash_ (bash)
_/tmp/service_other-bash:/tmp/service_other-bash_ (other-bash)
Actual behavior
podman-compose added to service "other-bash" incorrectly mounts from services what are not in dependency chain:
_/tmp/service_ci-dev-bash:/tmp/service_ci-dev-bash_ (**incorrect** - from **ci-dev-bash**)
_/tmp/service_ci-dev-bash2:/tmp/service_ci-dev-bash2_ (**incorrect** - from **ci-dev-bash2**).
& correct content from dependency:
_/tmp/service_bash:/tmp/service_bash_ (**bash**)
_/tmp/service_other-bash:/tmp/service_other-bash_ (**other-bash**)
It looks that podman-compose read all services information from docker-compose.yml and during run service with dependency adding information from all services inside docker-compose.yml even that what is not in dependency chain.
Output
$ podman-compose up
I do not use "up" parameter. Only "run".
Environment:
Additional context
Similar problem is visible for run below command:
podman-compose run --rm --no-deps bash bash
Podman does not depends from anything but mount from other services is added - but shouldn't:
The text was updated successfully, but these errors were encountered: