Skip to content

core/runtime/v2: Drop checkpointctl module dependency - #13839

Merged
mxpv merged 1 commit into
containerd:mainfrom
vvoland:core-checkpointctl
Jul 24, 2026
Merged

mxpv merged 1 commit into
containerd:mainfrom
vvoland:core-checkpointctl

Conversation

@vvoland

@vvoland vvoland commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

The shim imported github.com/checkpoint-restore/checkpointctl/lib for a single string constant.
Consumers that embed only the runtime v2 plugin (and never touch internal/cri) therefore had to vendor the checkpointctl package.

Declare the file name as a local constant instead. checkpointctl still remains a direct requirement here because internal/cri/server uses its types, JSON readers, and annotations, but it is no longer reachable from the runtime v2 import graph.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Reduces the runtime v2 shim’s dependency surface by removing its import of github.com/checkpoint-restore/checkpointctl/lib (previously used only for a filename constant), helping downstream consumers that vendor only the runtime v2 plugin avoid pulling checkpointctl into their import graph.

Changes:

  • Removed the checkpointctl/lib import from core/runtime/v2/shim.go.
  • Introduced a local rootFsDiffTar constant and used it when restoring from a checkpoint.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread core/runtime/v2/shim.go Resolved
The shim imported github.com/checkpoint-restore/checkpointctl/lib for a
single string constant.
Consumers that embed only the runtime v2 plugin (and never touch
internal/cri) therefore had to vendor the checkpointctl package.

Declare the file name as a local constant instead.
checkpointctl still remains a direct requirement here because
internal/cri/server uses its types, JSON readers, and annotations, but
it is no longer reachable from the runtime v2 import graph.

Signed-off-by: Paweł Gronowski <[email protected]>
@vvoland
vvoland force-pushed the core-checkpointctl branch from d43acbd to 9c6b71c Compare July 24, 2026 18:34
Copilot AI review requested due to automatic review settings July 24, 2026 18:34
@vvoland vvoland added the cherry-pick/2.3.x Change to be cherry picked to release/2.3 label Jul 24, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

core/runtime/v2/shim.go:649

  • This reference should be updated to use the renamed constant (e.g., rootfsDiffTarName) so the identifier clearly indicates it's a filename and matches the constant declaration.
		rootfsDiff := filepath.Join(opts.Checkpoint, "..", rootFsDiffTar)

Comment thread core/runtime/v2/shim.go
Comment on lines +67 to +70
// rootFsDiffTar is the name of the rootfs diff archive written next to a
// checkpoint. It is part of the checkpoint layout produced by CRIU tooling,
// so it must stay in sync with github.com/checkpoint-restore/checkpointctl/lib.RootFsDiffTar.
rootFsDiffTar = "rootfs-diff.tar"

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.

it follows the name of the upstream const (yes, my OCD also would want them to be aligned, but it makes sense to follow the original here)

@thaJeztah thaJeztah 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.

LGTM

@github-project-automation github-project-automation Bot moved this from Needs Triage to Review In Progress in Pull Request Review Jul 24, 2026
@mxpv
mxpv added this pull request to the merge queue Jul 24, 2026
@thaJeztah

Copy link
Copy Markdown
Member

/cherry-pick release/2.3

@k8s-infra-cherrypick-robot

Copy link
Copy Markdown

@thaJeztah: once the present PR merges, I will cherry-pick it on top of release/2.3 in a new PR and assign it to you.

Details

In response to this:

/cherry-pick release/2.3

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Merged via the queue into containerd:main with commit 8496e9a Jul 24, 2026
51 checks passed
@github-project-automation github-project-automation Bot moved this from Review In Progress to Done in Pull Request Review Jul 24, 2026
@k8s-infra-cherrypick-robot

Copy link
Copy Markdown

@thaJeztah: new pull request created: #13840

Details

In response to this:

/cherry-pick release/2.3

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cherry-pick/2.3.x Change to be cherry picked to release/2.3 size/XS

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants