Skip to content

[FIX] devel-setup: drop networks, it conflicts with network_mode - #666

Merged
david-banon-tecnativa merged 1 commit into
Tecnativa:mainfrom
rrebollo:fix/devel-setup-network-mode-conflict
Oct 2, 2026
Merged

david-banon-tecnativa merged 1 commit into
Tecnativa:mainfrom
rrebollo:fix/devel-setup-network-mode-conflict

Conversation

@rrebollo

@rrebollo rrebollo commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Correction

My first report said this breaks invoke git-aggregate. That was wrong.

docker compose run <service> does not validate the project the way docker compose config does, so the workflow is unaffected — which is what you found, and what
tests/test_downstream_tasks.py already keeps covered. I had run docker compose config without --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:

$ docker compose config                          # exit 0, devel-setup excluded
$ docker compose --profile devel-setup config     # exit 1
service devel-setup declares mutually exclusive `network_mode` and `networks`

devel-setup extends odoo, which carries network_mode: service:gatekeeper since
6bfc5b6, and declares network_mode: host. A service may not also declare networks,
and with network_mode: host no compose network applies, so the line was inert.

Fix

Drop the two lines. No test — you're right that test_downstream_tasks.py covers it.

@rrebollo
rrebollo marked this pull request as draft October 1, 2026 04:14
@rrebollo
rrebollo force-pushed the fix/devel-setup-network-mode-conflict branch from 1fbafc3 to 49efe68 Compare October 1, 2026 04:27
@david-banon-tecnativa

Copy link
Copy Markdown
Contributor

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.
What docker and docker compose versions are you running?

Comment thread tests/test_nitpicking.py Outdated
`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.
@rrebollo
rrebollo force-pushed the fix/devel-setup-network-mode-conflict branch from 49efe68 to 191d71a Compare October 1, 2026 16:33
@rrebollo

rrebollo commented Oct 1, 2026

Copy link
Copy Markdown
Contributor Author

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: docker compose run <service> doesn't validate the project the way docker compose config does. invoke git-aggregate works here too, and test_downstream_tasks.py covers it as you said. Only docker compose --profile devel-setup config fails.

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.

@rrebollo
rrebollo marked this pull request as ready for review October 1, 2026 16:35
@david-banon-tecnativa
david-banon-tecnativa merged commit 52eb480 into Tecnativa:main Oct 2, 2026
2 of 13 checks passed
@pedrobaeza

Copy link
Copy Markdown
Member

Wasn't it red?

@david-banon-tecnativa

Copy link
Copy Markdown
Contributor

Test failure was unrelated, Tecnativa/doodba#737

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.

3 participants