Skip to content

Conversation

@thaJeztah
Copy link
Member

@thaJeztah thaJeztah commented Feb 10, 2026

pkg/compose: defaultNetworkSettings: return early for unsupported features

pkg/compose: defaultNetworkSettings: slight refactor

  • use an intermediate serviceNetworks slice so that we don't have to call service.NetworksByPriority multiple times.
  • shift the primary network from the slice (if any), so that we can drop some checks for "additional networks"
  • group code related to setting up the primary network as first step, then append remaining networks.

What I did

Related issue

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

@codecov
Copy link

codecov bot commented Feb 10, 2026

Codecov Report

❌ Patch coverage is 80.95238% with 4 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
pkg/compose/create.go 80.95% 2 Missing and 2 partials ⚠️

📢 Thoughts on this report? Let us know!

- use an intermediate serviceNetworks slice so that we don't have
  to call service.NetworksByPriority multiple times.
- shift the primary network from the slice (if any), so that
  we can drop some checks for "additional networks"
- group code related to setting up the primary network as first
  step, then append remaining networks.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah thaJeztah force-pushed the cleanup_defaultNetworkSettings branch from 19edbd9 to 28a46aa Compare February 11, 2026 11:42
@thaJeztah thaJeztah marked this pull request as ready for review February 11, 2026 11:43
@thaJeztah thaJeztah requested a review from a team as a code owner February 11, 2026 11:43
@thaJeztah thaJeztah requested review from glours and ndeloof February 11, 2026 11:43
@thaJeztah thaJeztah mentioned this pull request Feb 11, 2026
1 task
@glours glours merged commit fefdc95 into docker:main Feb 11, 2026
40 checks passed
@thaJeztah thaJeztah deleted the cleanup_defaultNetworkSettings branch February 11, 2026 15:06
@thaJeztah
Copy link
Member Author

Thx! I rebased #13584 and moved it out of draft

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.

2 participants