Repository navigation
core/runtime/v2: Drop checkpointctl module dependency - #13839
Conversation
There was a problem hiding this comment.
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/libimport fromcore/runtime/v2/shim.go. - Introduced a local
rootFsDiffTarconstant and used it when restoring from a checkpoint.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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]>
d43acbd to
9c6b71c
Compare
There was a problem hiding this comment.
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)
| // 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" |
There was a problem hiding this comment.
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)
|
/cherry-pick release/2.3 |
|
@thaJeztah: once the present PR merges, I will cherry-pick it on top of DetailsIn response to this:
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. |
|
@thaJeztah: new pull request created: #13840 DetailsIn response to this:
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. |
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.