-
Notifications
You must be signed in to change notification settings - Fork 1.8k
do not build/start unused services in unit test docker compose files #13220
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
do not build/start unused services in unit test docker compose files #13220
Conversation
|
Can you rebase/merge? Is this "not used" profile something built in to docker compose? Can't seem to find anything about it? Or is the idea that if you do not specify a profile, any service with a profile will not be built/started? |
87d0846 to
913e05f
Compare
This one! |
|
Actually just tried Would you prefer? Looks less hacky |
|
That looks cleaner indeed. What does this part do: Is it to get rid of the |
913e05f to
e2faab5
Compare
|
It does look much cleaner. Should've thought of it from the start when I read about it together with And yes, to remove dependency on non-existing services. Default compose override behavior is to merge dictionaires. reset removes the yaml entry, override replaces with new one (instead of merging) |
mtesauro
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved
Description
I've often used
deploy.replicas: 0in compose override files to "disable" some of the services. Yet, that just prevents them from starting, they're still built.Recently, I've seen "unused profile" being used for the same purpose, with the added benefit that this way services images are not built either.
This PR applies that to the unit test compose overrides.
Test results
docker compose build --no-cache(with unit_test override set) takes around 120/140 seconds in current file. In this branch, it takes 100/110 seconds (and doesn't start unused services either).Checklist
This checklist is for your information.
dev.dev.bugfixbranch.