containers / containers/podman-compose
Podman Compose rerolls all containers instead of just the altered ones
- Dominant language
- Python
- Stars
- 6.2k
- Forks
- 622
- PR merge metrics
- No merged PRs in 30d
Description
When using Podman Compose, the expected behavior is that only the containers that have been altered in the compose YAML file will be rerolled or spun up. However, currently, Podman Compose rerolls all containers regardless of whether or not they have been changed in the compose YAML file.
Upon running the compose command (``podman-compose -f .\docker-compose.yaml up -d``), all containers in the compose project are rerolled or spun up, even if they have not been changed in the compose YAML file.
It appears that the problem may be related to the following command: ``['podman', 'ps', '--filter', 'label=io.podman.compose.project=docker', '-a', '--format', '{{ index .Labels "io.podman.compose.config-hash"}}']``
This command may not be accurately detecting which containers have been altered in the compose YAML file, causing Podman Compose to reroll all containers instead of just the altered ones.
**Expected behavior:**
Only containers that have been altered in the compose YAML file should be rerolled or spun up when running the `podman-compose up` command.
**Steps to reproduce:**
1. Create a compose YAML file with multiple services and containers.
2. Run `podman-compose up --detach` command to spin up the containers.
3. Make changes to one of the containers in the compose YAML file.
4. Run `podman-compose up --detach` command again.
**Actual behavior:**
All containers in the compose project are rerolled or spun up, regardless of whether or not they have been changed in the compose YAML file.
**Environment:**
- Podman version: 4.5.0
- Podman Compose version: 1.0.6
- Operating system: Windows 11 :( (podman is using WSL2)
Contributor guide
Assessment
This issue has not been assessed yet.