Repository navigation
[FIX] devel-setup: drop networks, it conflicts with network_mode - #666
Conversation
1fbafc3 to
49efe68
Compare
|
Hi, i can't replicate the issue on Doodba copier template. While the original issue of networks and network mode not coexisting on a container is indeed real, and the isolated example raises an issue, I can run invoke git-aggregate just fine on any template v10+ project. |
`devel-setup` extends `odoo`, which carries `network_mode:
service:gatekeeper` since the proxy v3 migration, and declares its own
`network_mode: host`. A service may not declare both that and `networks`, so
the project is invalid for anything that validates it with the profile on:
service devel-setup declares mutually exclusive `network_mode` and
`networks`: invalid compose project
`docker compose run devel-setup` does not validate the project the way
`docker compose config` does, so `invoke git-aggregate` is unaffected and
`tests/test_downstream_tasks.py` keeps covering it. `docker compose
--profile devel-setup config` is what fails.
The inherited `networks: !override [public]` was already inert: with
`network_mode: host` the container uses the host's network stack and no
compose network is applied.
49efe68 to
191d71a
Compare
|
Thanks — both points applied: description corrected, test removed. Engine 29.8.1, Compose 5.5.1, Linux Mint 22.3, kernel 6.8.0-142. On why you couldn't reproduce it: You're also right that the service is genuinely invalid — that part of the original report stands. Happy to close this instead if you'd rather not carry a 2-line cleanup with no symptom behind it. |
|
Wasn't it red? |
|
Test failure was unrelated, Tecnativa/doodba#737 |
Correction
My first report said this breaks
invoke git-aggregate. That was wrong.docker compose run <service>does not validate the project the waydocker compose configdoes, so the workflow is unaffected — which is what you found, and whattests/test_downstream_tasks.pyalready keeps covered. I had rundocker compose configwithout--profile, seen exit 0, and concluded the service was valid.What does hold is that the service is invalid for anything that validates the project
with the profile on. On Engine 29.8.1 / Compose 5.5.1:
devel-setupextendsodoo, which carriesnetwork_mode: service:gatekeepersince6bfc5b6, and declaresnetwork_mode: host. A service may not also declarenetworks,and with
network_mode: hostno compose network applies, so the line was inert.Fix
Drop the two lines. No test — you're right that
test_downstream_tasks.pycovers it.