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

Docker compose profiles set to * doesn't work #6345

Closed
kinland opened this issue Mar 21, 2024 · 5 comments
Closed

Docker compose profiles set to * doesn't work #6345

kinland opened this issue Mar 21, 2024 · 5 comments
Labels
bug Something isn't working needs repro case

Comments

@kinland
Copy link
Contributor

kinland commented Mar 21, 2024

Expected Behavior

As per the docs:

If you want to enable all profiles at the same time, you can run docker compose --profile "*".

Current Behavior

docker_compose('./docker-compose.yml', profiles=["*"] produces errors about "no Docker Compose service found with name"

Steps to Reproduce

  1. Create a docker-compose.yml with profiles
  2. Create a tiltfile that has the line from the Current Behavior section
  3. Run tilt up and see error
  4. Stop tilt, then replace the wildcard profiles with the explicit list of profiles
  5. Run tilt up and see that everything works

Context

tilt doctor Output

$ tilt doctor
Tilt: vv0.33.11-next, built 2024-03-14
System: linux-amd64
---
Docker
- Host: unix:///var/run/docker.sock
- Server Version: 25.0.3
- API Version: 1.44
- Builder: 2
- Compose Version: v2.24.6-desktop.1
---
Kubernetes
- Env: eks
- Context: arn:aws:eks:us-west-2:****:cluster/****
- Cluster Name: arn:aws:eks:us-west-2:****:cluster/****
- Namespace: default
@kinland kinland added the bug Something isn't working label Mar 21, 2024
@nicks
Copy link
Member

nicks commented Mar 23, 2024

Hmmm... i was not able to reproduce this report.

from your tilt doctor output, it looks like you've got a custom tilt build, is it possible this is a bug specific to your branch?

@nicks
Copy link
Member

nicks commented Mar 23, 2024

see the circleci run on tilt-dev/tilt-example-docker-compose#7 to see an example of this working

@kinland
Copy link
Contributor Author

kinland commented Mar 23, 2024

I'll try to make a reproducible example I can share next week.

@kinland
Copy link
Contributor Author

kinland commented Mar 25, 2024

I was on a build of your master branch from about a week ago. I tried switching to the latest release, and something similar happens there. In the linked run, you're using a newer docker compose version, but I looked at their changelog since my version (Docker Compose version v2.24.6-desktop.1) and they make no mention of profiles.

Repro:

  1. git clone git@github.com:tilt-dev/tilt-example-docker-compose.git
  2. add profiles line to Redis:
    image: redis
    profiles: ['a']
  1. add profiles to the Tiltfile: docker_compose('docker-compose.yml', profiles=["*"])
  2. run tilt up

Result:
image

Tilt Doctor:

Tilt: v0.33.11, built 2024-02-15
System: linux-amd64
---
Docker
- Host: unix:///var/run/docker.sock
- Server Version: 25.0.3
- API Version: 1.44
- Builder: 2
- Compose Version: v2.24.6-desktop.1
---
Kubernetes
- Env: eks
- Context: arn:aws:eks:us-west-2:****:cluster/****
- Cluster Name: arn:aws:eks:us-west-2:****:cluster/****
- Namespace: default

nicks added a commit to tilt-dev/tilt-example-docker-compose that referenced this issue May 15, 2024
nicks added a commit to tilt-dev/tilt-example-docker-compose that referenced this issue May 15, 2024
Signed-off-by: Nick Santos <nick.santos@docker.com>
nicks added a commit to tilt-dev/tilt-example-docker-compose that referenced this issue May 15, 2024
Signed-off-by: Nick Santos <nick.santos@docker.com>
nicks added a commit to tilt-dev/tilt-example-docker-compose that referenced this issue May 15, 2024
Signed-off-by: Nick Santos <nick.santos@docker.com>
@nicks
Copy link
Member

nicks commented May 15, 2024

i confirmed that the issue repro'd in Docker Compose v2.25, but is fixed in Docker Compose v2.27
https://app.circleci.com/pipelines/github/tilt-dev/tilt-example-docker-compose/28/workflows/c2962f01-23eb-4df3-ab90-78c99c346ccb/jobs/29
https://app.circleci.com/pipelines/github/tilt-dev/tilt-example-docker-compose/27/workflows/9e0b914f-5411-4e60-baec-83ee0a07276c/jobs/28

so i'm going to close this as a Docker Compose bug that's resolved now

@nicks nicks closed this as completed May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs repro case
Projects
None yet
Development

No branches or pull requests

2 participants