Skip to content

fix(compose): support explicit network names - #223

Merged
k9withabone merged 3 commits into
containers:mainfrom
x3ccd4828:fix/compose-network-name
Sep 9, 2026
Merged

k9withabone merged 3 commits into
containers:mainfrom
x3ccd4828:fix/compose-network-name

Conversation

@x3ccd4828

Copy link
Copy Markdown
Contributor

Summary

  • accept the Compose name field on top-level network definitions
  • emit the explicit name as NetworkName= in the generated Quadlet network unit
  • add regression coverage for the conversion

Why

Compose allows a network resource key and the created network's name to differ:

networks:
  backend:
    name: explicit-network-name

Podlet 0.3.2 currently rejects this input because the Quadlet network conversion classifies name as unsupported. Mapping it to NetworkName= preserves the resource key for the generated backend.network file and its container references while creating the Podman network with the requested explicit name.

This implements the behavior described in #21.

Validation

  • cargo fmt --verbose --check
  • cargo clippy -- -Dwarnings
  • cargo test --verbose (78 passed)
  • end-to-end Compose conversion confirmed Network=backend.network and NetworkName=explicit-network-name

@x3ccd4828
x3ccd4828 force-pushed the fix/compose-network-name branch 2 times, most recently from 1d1df01 to ea2a9f9 Compare July 28, 2026 19:56
@x3ccd4828
x3ccd4828 marked this pull request as ready for review July 28, 2026 19:57
@x3ccd4828
x3ccd4828 force-pushed the fix/compose-network-name branch from ea2a9f9 to a621d55 Compare July 28, 2026 19:59
@k9withabone

Copy link
Copy Markdown
Member

Thanks for submitting a PR! Sorry for not getting to this sooner.

@k9withabone k9withabone left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Other than a couple nitpicks, this looks good!

Comment thread src/quadlet/network.rs Outdated
Comment thread src/quadlet/network.rs
@x3ccd4828

Copy link
Copy Markdown
Contributor Author

@k9withabone i want to add more PRs what is the best way to get these reviewed and merged quickly?

@k9withabone k9withabone left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good!

@k9withabone

Copy link
Copy Markdown
Member

@k9withabone i want to add more PRs what is the best way to get these reviewed and merged quickly?

@x3ccd4828 Keeping them small helps.

Signed-off-by: Cristian Filipescu <filipescu.cristian@gmail.com>
@k9withabone
k9withabone force-pushed the fix/compose-network-name branch from 8c17eee to 78b1c1b Compare September 5, 2026 16:09
@k9withabone

Copy link
Copy Markdown
Member

@cfilipescu Looks like you need to sign your commits.

Signed-off-by: Cristian Filipescu <filipescu.cristian@gmail.com>
Signed-off-by: Cristian Filipescu <filipescu.cristian@gmail.com>
@x3ccd4828
x3ccd4828 force-pushed the fix/compose-network-name branch from 78b1c1b to 568b641 Compare September 5, 2026 19:46
@x3ccd4828

Copy link
Copy Markdown
Contributor Author

@cfilipescu Looks like you need to sign your commits.

I fixed them and now are signed-off correctly

@k9withabone
k9withabone merged commit faf7c0d into containers:main Sep 9, 2026
15 checks passed
@k9withabone k9withabone added this to the v0.3.3 milestone Sep 9, 2026
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