Skip to content

Reorganize Swift package targets for network plugin.#1615

Merged
jglogan merged 2 commits into
apple:mainfrom
jglogan:networkplugin-reorg
May 28, 2026
Merged

Reorganize Swift package targets for network plugin.#1615
jglogan merged 2 commits into
apple:mainfrom
jglogan:networkplugin-reorg

Conversation

@jglogan

@jglogan jglogan commented May 28, 2026

Copy link
Copy Markdown
Contributor
  • Part of [Request]: TECH DEBT: Refactor network resource management for 1.0. #1404.
  • Updates containerization to 0.33.2.
  • Reorganizes network plugin targets into:
    • ContainerNetworkClient - network plugin client and default types
    • ContainerNetworkServer - separate protocols for Network which manages the underlying virtual network, NetworkService, which takes a network and implements the API, and an actor NetworkHarness that marshals between the API and the XPC protocol. The service-harness separation will help us ensure XPC protocol compatibility in both directions as we evolve the plugin APIs.
  • Removes disableAllocator() which is no longer used since Remove IP allocation from API server. #1545 switched over to using XPC connections between runtime and network plugin instances to track whether a network has attached containers.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Motivation and Context

Revised organization is easier to reason about, helps ensure compatibility as the API evolves, and facilitates other network plugin implementations in the future.

Testing

  • Tested locally
  • Added/updated tests
  • Added/updated docs

- Part of apple#1404.
- Updates containerization to 0.33.2.
- Reorganizes network plugin targets into:
  - `ContainerNetworkClient` - network plugin client
    and default types
  - `ContainerNetworkServer` - separate protocols
    for `Network` which manages the underlying
    virtual network, `NetworkService`, which takes
    a network and implements the API, and an actor
    `NetworkHarness` that marshals between the API
    and the XPC protocol. The service-harness
    separation will help us ensure XPC protocol
    compatibility in both directions as we evolve
    the plugin APIs.
- Removes `disableAllocator()` which is no longer
  used since apple#1545 switched over to using XPC
  connections between runtime and network plugin
  instances to track whether a network has attached
  containers.
@jglogan jglogan force-pushed the networkplugin-reorg branch from 7b9915d to 223bb7e Compare May 28, 2026 20:34
@github-actions

Copy link
Copy Markdown

Code Coverage

Tier Line Coverage
Unit 34.01%
Integration 19.64%
Combined 53.06%

@jglogan jglogan merged commit c5a8d7a into apple:main May 28, 2026
3 checks passed
@jglogan jglogan deleted the networkplugin-reorg branch May 28, 2026 22:26
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