Skip to content

runc-shim: replace container/factory abstractions with a concrete Container - #494

Open
mxpv wants to merge 1 commit into
mainfrom
shim-runtime
Open

mxpv wants to merge 1 commit into
mainfrom
shim-runtime

Conversation

@mxpv

@mxpv mxpv commented Sep 24, 2026

Copy link
Copy Markdown
Member

Simplify runc shim internals:

Container, ContainerFactory, ProcessFactory and ContainerTemplate each had a single implementation. In this PR they collapse into one concrete Container and makes TaskService non-generic.

  • Container::create/exec replace RuncFactory/RuncExecFactory.
  • TaskService owns the injectable Spawner directly.
  • Drops the no-op cleanup hook and unused CreateConfig.

…tainer

Container, ContainerFactory, ProcessFactory and ContainerTemplate each had a
single implementation in a private binary crate. Collapse them into one
concrete Container struct and make TaskService non-generic.

- Container owns InitProcess and a map of ExecProcess, with create() and
  exec() replacing RuncFactory and RuncExecFactory.
- Exec processes derive runtime, bundle and IO ownership from the init
  lifecycle instead of a factory holding copies.
- TaskService owns the injectable Spawner directly (ShimExecutor by default).
- Split bundle preparation from init process creation; derive container
  id/bundle from the init process.
- Drop the no-op factory cleanup hook and the unused CreateConfig.

No behavior change intended.
@mxpv
mxpv requested a review from a team September 24, 2026 19:21
@github-actions github-actions Bot added the C-runc-shim Runc shim label Sep 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-runc-shim Runc shim

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant