lib: Add CheckpointOptions struct and parsing for CRI options#199
Open
adrianreber wants to merge 1 commit intocheckpoint-restore:mainfrom
Open
lib: Add CheckpointOptions struct and parsing for CRI options#199adrianreber wants to merge 1 commit intocheckpoint-restore:mainfrom
adrianreber wants to merge 1 commit intocheckpoint-restore:mainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #199 +/- ##
==========================================
+ Coverage 76.00% 76.88% +0.87%
==========================================
Files 13 14 +1
Lines 1288 1337 +49
==========================================
+ Hits 979 1028 +49
Misses 232 232
Partials 77 77 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Add support for parsing checkpoint options from the Kubernetes CRI CheckpointPodRequest map[string]string options field. The new ParseCheckpointOptions function validates known options and their expected types (bool, int, string). SupportedCheckpointOptions exports the currently supported options with help text for use by tools. Currently only "leave-running" is supported. Additional options (tcp-established, ghost-limit, network-lock) are defined internally to test all option type parsers. Boolean values accept: yes, no, true, false, on, off, 0, 1 Generated with Claude Code (https://claude.ai/code) Signed-off-by: Adrian Reber <areber@redhat.com>
77163bf to
85677b0
Compare
rst0git
reviewed
Feb 13, 2026
| // LeaveRunning leaves the processes running in the container after checkpointing | ||
| LeaveRunning bool `json:"leaveRunning,omitempty"` | ||
| // TCPEstablished enables support for established TCP connections in the checkpoint | ||
| TCPEstablished bool `json:"tcpEstablished,omitempty"` |
Member
Author
There was a problem hiding this comment.
This is just as an example for now. Just for testing. I think this can be added any time later.
rst0git
reviewed
Feb 13, 2026
| wantError bool | ||
| }{ | ||
| // True values | ||
| {name: "yes lowercase", value: "yes", wantBool: true, wantError: false}, |
Member
There was a problem hiding this comment.
Why do we have so many boolean values (yes, no, true, false, on, off, 0, 1)?
This could lead to inconsistencies (e.g., leave-running=1, tcp-established=False)
Member
Author
There was a problem hiding this comment.
This is just to make sure whatever people use works.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add support for parsing checkpoint options from the Kubernetes CRI CheckpointPodRequest map[string]string options field. The new ParseCheckpointOptions function validates known options and their expected types (bool, int, string).
Known options: leave-running, tcp-established, ghost-limit, network-lock
Boolean values accept: yes, no, true, false, on, off, 0, 1
Generated with Claude Code (https://claude.ai/code)