refactor(operator): drop CheckpointJob naming from the snapshot protocol - #134
refactor(operator): drop CheckpointJob naming from the snapshot protocol#134oleg-kushniriov wants to merge 1 commit into
Conversation
SnapshotJob creates a plain batch/v1 Job whose pod is the capture source; the CheckpointJob identifiers are Dynamo-era naming left in the snapshot protocol. Rename them to match the source-Job vocabulary: - NewCheckpointJob -> NewSourceJob - CheckpointJobOptions -> SourceJobOptions - DisableCheckpointJobSidecarInjection -> DisableSidecarInjection protocol/checkpoint.go and its tests move to source_job*.go, and the "checkpoint job" prose in errors and comments now says "source job" where it names the Job (the CRIU capture itself is still a checkpoint). The dead-code half of the planned cleanup (GetCheckpointJobName, DefaultCheckpointJobTTLSeconds, ApplyCheckpointStorageMetadata, DiscoverAndResolveStorage, PrepareRestorePodSpecForCheckpoint, CheckpointStatus*) was already removed by earlier PRs, so this is renames only. No behavior change: the snapshotctl CLI surface (checkpoint subcommand, flags, output keys) is untouched, and no api/v1alpha1 type, constant, or CRD schema changes. Signed-off-by: Oleg Kushniriov <okushniriov@nvidia.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Enterprise Run ID: 📒 Files selected for processing (8)
Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review. WalkthroughThe protocol renames checkpoint-job APIs to source-job APIs. The command and controller adopt the new constructors. Documentation and tests update the terminology and validate source-job construction, wrapping, validation, and CUDA wrapper file handling. ChangesSource Job API Rename
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to This PR only updates internal snapshot source-job naming while preserving the CLI and API behavior; no actionable merge-blocking risk remains after normal checks and review. 🚥 Pre-merge checks | ✅ 6 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (6 passed)
Full details: Breaking Api ChangesExplanation PASS: The PR changes only one line in api/v1alpha1/constants.go, and the change is a comment from “checkpoint job” to “source job.” No API fields, Go types, JSON tags, optional markers, defaults, or XValidation immutability markers changed. PodSnapshotSpec and PodSnapshotContentSpec are identical to the parent revision. Full details: Rbac Least PrivilegeExplanation No RBAC wildcard grant was introduced. The PR diff changes no kubebuilder RBAC marker or Helm RBAC manifest, and the added-line scan found no wildcard in RBAC syntax. Current markers and Helm RBAC templates use explicit verbs and resources; repository-wide scans found no wildcard
Warning Some tools did not complete. Review the errors below. 🔧 golangci-lint (2.12.2)Error: can't load config: unsupported version of the configuration: "" See https://golangci-lint.run/docs/product/migration-guide for migration instructions Comment |
Jira: RUN-39806
What
Final cleanup PR of the SnapshotJob series. SnapshotJob creates a plain
batch/v1Job whose pod is the capture source — theCheckpointJobidentifiers in the snapshot protocol are Dynamo-era naming. This renames them to the source-Job vocabulary:NewCheckpointJob→NewSourceJobCheckpointJobOptions→SourceJobOptionsDisableCheckpointJobSidecarInjection→DisableSidecarInjectionprotocol/checkpoint.goand its tests move tosource_job*.go, and "checkpoint job" prose in errors and comments now says "source job" where it names the Job. The word "checkpoint" for the CRIU capture itself is unchanged.What this PR does not do
GetCheckpointJobName,DefaultCheckpointJobTTLSeconds,ApplyCheckpointStorageMetadata,DiscoverAndResolveStorage,PrepareRestorePodSpecForCheckpoint,CheckpointStatus*) was already removed by earlier PRs, so this is renames only.snapshotctlCLI surface (checkpointsubcommand, flags,checkpoint_job=output) is deliberately untouched — that is user-facing behavior, not internal naming.api/v1alpha1surface change: the one touched file there is a single doc-comment line; no types, constants, labels, or CRD schema change, so nothing regenerates.Verification
go build ./...andgo test ./...pass in theoperatorandapimodules;gofmtclean.GOOS=linux go build+go vetpass as well (covers the linux-onlysnapshotctl/checkpoint_test.go).CheckpointJobidentifier remains.🤖 Generated with Claude Code
Summary by CodeRabbit
Improvements
Tests