Skip to content

introduce --all-resources to _not_ exclude resources not used by services#11702

Merged
ndeloof merged 2 commits intodocker:mainfrom
ndeloof:all-resources
Apr 9, 2024
Merged

introduce --all-resources to _not_ exclude resources not used by services#11702
ndeloof merged 2 commits intodocker:mainfrom
ndeloof:all-resources

Conversation

@ndeloof
Copy link
Contributor

@ndeloof ndeloof commented Apr 9, 2024

What I did
introduce --all-resources so that compose model don't get resources not used by services excluded
This allows to use docker compose create to manage non-services resources, when such a resource is shared by multiple compose application.

Related issue
closes #10930

(not mandatory) A picture of a cute animal, if possible in relation to what you did
image

@ndeloof ndeloof requested review from a team, glours, jhrotko and milas and removed request for a team April 9, 2024 09:37
…ices

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
Copy link
Contributor

@glours glours left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good to me

Copy link
Contributor

@milas milas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking: Can we get some sort of test coverage please? 🙏🏻


Non-blocking / my opinion: Compose Up is pretty service-oriented, and this feels like a band-aid for a niche use case. If declaratively managing volumes/networks/secrets/configs independent of containers is something we really want to support, I feel like it's something that'd be better to approach more generically/as a feature.

@ndeloof
Copy link
Contributor Author

ndeloof commented Apr 9, 2024

@milas exclusion for resources not being used by a service was introduced by profile, before compose (v1) used to just create resources as declared in a compose file

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
@ndeloof ndeloof requested a review from milas April 9, 2024 13:04
@ndeloof
Copy link
Contributor Author

ndeloof commented Apr 9, 2024

added e2e test for this new flag

@ndeloof ndeloof merged commit b4280fb into docker:main Apr 9, 2024
@ndeloof ndeloof deleted the all-resources branch April 9, 2024 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Query About Creating Volumes Without Services in Docker Compose v2

3 participants