STOR-3004 Rebase external-snapshotter to v8.6.0#221
Conversation
WalkthroughThis PR adds VolumeGroupSnapshot v1 API definitions and generated clients, migrates controller and sidecar code from v1beta2 to v1, regenerates related beta client code, changes snapshot deletion retry behavior, adds webhook server timeouts, refreshes dependencies and manifests, and expands test coverage. ChangesVolumeGroupSnapshot v1 rollout
Estimated code review effort🎯 5 (Critical) | ⏱️ ~120 minutes Possibly related PRs
Suggested labels
Suggested reviewers
✨ Finishing Touches🧪 Generate unit tests (beta)
|
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: rvagner78 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Actionable comments posted: 5
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (7)
release-tools/.github/workflows/trivy.yaml (1)
2-7:⚠️ Potential issue | 🟠 Major | ⚡ Quick winRestore pre-merge Trivy scanning.
This workflow now scans on
pushandscheduleonly, so vulnerabilities introduced in PRs are no longer blocked before merge. Re-add apull_requesttrigger.Suggested change
on: push: branches: - master + pull_request: schedule: - cron: '0 0 * * *' # Run daily at midnight UTC🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@release-tools/.github/workflows/trivy.yaml` around lines 2 - 7, The Trivy workflow in trivy.yaml is missing the pull_request trigger in the on section, which prevents vulnerability scanning on pull requests before they are merged. Add a pull_request trigger to the on section at the same indentation level as the existing push and schedule triggers to re-enable vulnerability detection on PRs.pkg/common-controller/groupsnapshot_controller_helper.go (4)
1552-1554:⚠️ Potential issue | 🟠 MajorFix unreachable nil check; address-of operator prevents fallback condition from ever being true.
The expression
&groupSnapshot.Spec.Source.VolumeGroupSnapshotContentName == nilalways evaluates to false becauseVolumeGroupSnapshotContentNameis already a pointer field. Taking its address produces a pointer-to-pointer, which is never nil. This prevents the dynamic content-name fallback from ever executing.Proposed fix
-if groupSnapshotContentName == "" && &groupSnapshot.Spec.Source.VolumeGroupSnapshotContentName == nil { +if groupSnapshotContentName == "" && groupSnapshot.Spec.Source.VolumeGroupSnapshotContentName == nil { groupSnapshotContentName = utils.GetDynamicSnapshotContentNameForGroupSnapshot(groupSnapshot) }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@pkg/common-controller/groupsnapshot_controller_helper.go` around lines 1552 - 1554, The condition in the if statement on the line checking groupSnapshotContentName uses the address-of operator & on groupSnapshot.Spec.Source.VolumeGroupSnapshotContentName, which is already a pointer field. This creates a pointer-to-pointer that is never nil, making the second part of the condition always false and preventing the fallback call to utils.GetDynamicSnapshotContentNameForGroupSnapshot from ever executing. Remove the & operator from the condition so it directly checks whether groupSnapshot.Spec.Source.VolumeGroupSnapshotContentName itself is nil.
1406-1408:⚠️ Potential issue | 🟠 MajorDereference pointers when comparing
ReadyToUseboolean values.The comparison at line 1406 compares pointer addresses instead of the underlying boolean values. When both pointers reference the same value (e.g., both true) but are different memory allocations, the pointer comparison incorrectly returns true, triggering unnecessary status updates and requeues. Dereference the pointers to compare values.
Proposed fix
-if groupSnapshot.Status.ReadyToUse != nil && groupSnapshotContent.Status.ReadyToUse != nil && groupSnapshot.Status.ReadyToUse != groupSnapshotContent.Status.ReadyToUse { +if groupSnapshot.Status.ReadyToUse != nil && groupSnapshotContent.Status.ReadyToUse != nil && + *groupSnapshot.Status.ReadyToUse != *groupSnapshotContent.Status.ReadyToUse { return true }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@pkg/common-controller/groupsnapshot_controller_helper.go` around lines 1406 - 1408, The comparison in the conditional statement is comparing pointer addresses rather than the underlying boolean values of ReadyToUse. To fix this, dereference both pointers using the asterisk operator before the comparison. Change the condition from comparing groupSnapshot.Status.ReadyToUse != groupSnapshotContent.Status.ReadyToUse to comparing *groupSnapshot.Status.ReadyToUse != *groupSnapshotContent.Status.ReadyToUse. This ensures the actual boolean values are compared, not the memory addresses, preventing incorrect trigger of status updates when both pointers reference identical values.
98-102:⚠️ Potential issue | 🔴 CriticalCheck
UpdateStatuserror before emitting event withnewSnapshot.If
UpdateStatusfails,newSnapshotcan be nil. Passing a nil object toeventRecorder.Event()can cause a panic in the event recording path when it attempts to access object metadata.Proposed fix
- newSnapshot, err := ctrl.clientset.GroupsnapshotV1().VolumeGroupSnapshots(groupSnapshotClone.Namespace).UpdateStatus(context.TODO(), groupSnapshotClone, metav1.UpdateOptions{}) - - // Emit the event even if the status update fails so that user can see the error - ctrl.eventRecorder.Event(newSnapshot, eventtype, reason, message) - - if err != nil { + newSnapshot, err := ctrl.clientset.GroupsnapshotV1().VolumeGroupSnapshots(groupSnapshotClone.Namespace).UpdateStatus(context.TODO(), groupSnapshotClone, metav1.UpdateOptions{}) + if err != nil { + ctrl.eventRecorder.Event(groupSnapshotClone, eventtype, reason, message) klog.V(4).Infof("updating VolumeGroupSnapshot[%s] error status failed %v", utils.GroupSnapshotKey(groupSnapshot), err) return err } + ctrl.eventRecorder.Event(newSnapshot, eventtype, reason, message)🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@pkg/common-controller/groupsnapshot_controller_helper.go` around lines 98 - 102, The UpdateStatus call can fail and return a nil newSnapshot value, but the code unconditionally passes newSnapshot to ctrl.eventRecorder.Event() without checking the error, which will cause a panic when the event recorder tries to access the object's metadata. Check the err returned by UpdateStatus before emitting the event. If the error is not nil, use groupSnapshotClone instead of newSnapshot when calling ctrl.eventRecorder.Event() so the event can still be recorded with a valid object reference.
161-171:⚠️ Potential issue | 🟠 MajorReturn error when
Updatefails instead of continuing execution.The code logs the
Updatefailure but continues to execute and returnsnilerror, which hides API failures and can propagate invalid state. Addreturn nil, groupSnapshot, errafter the error check to properly surface the failure.Proposed fix
newGroupSnapshot, err := ctrl.clientset.GroupsnapshotV1().VolumeGroupSnapshots(groupSnapshotClone.Namespace).Update(context.TODO(), groupSnapshotClone, metav1.UpdateOptions{}) if err != nil { klog.V(4).Infof("updating VolumeGroupSnapshot[%s] default group snapshot class failed %v", utils.GroupSnapshotKey(groupSnapshot), err) + return nil, groupSnapshot, err }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@pkg/common-controller/groupsnapshot_controller_helper.go` around lines 161 - 171, When the VolumeGroupSnapshots Update call fails in the code block starting with ctrl.clientset.GroupsnapshotV1().VolumeGroupSnapshots(...).Update(), the error is logged but execution continues, causing the function to return nil error and hide the API failure. After logging the error in the first error check (the one that logs "updating VolumeGroupSnapshot... failed"), add a return statement that returns nil, groupSnapshot, err to properly surface the failure instead of continuing to execute the rest of the function.pkg/common-controller/snapshot_controller_base.go (1)
657-668:⚠️ Potential issue | 🔴 Critical | ⚡ Quick winCache initialization uses wrong listers for group snapshots.
The
initializeCaches()method at lines 657–680 calls snapshot and content listers instead of group snapshot listers, populating group snapshot stores with wrong object types and causing runtime type assertion failures.
pkg/common-controller/snapshot_controller_base.go#L657-L668: change line 658 fromctrl.snapshotLister.List(...)toctrl.groupSnapshotLister.List(...)pkg/common-controller/snapshot_controller_base.go#L669-L680: change line 670 fromctrl.contentLister.List(...)toctrl.groupSnapshotContentLister.List(...)🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@pkg/common-controller/snapshot_controller_base.go` around lines 657 - 668, The initializeCaches() method in pkg/common-controller/snapshot_controller_base.go is using incorrect listers to populate group snapshot stores. At lines 657-668, replace the call to ctrl.snapshotLister.List(...) with ctrl.groupSnapshotLister.List(...) to fetch the correct group snapshot objects. At lines 669-680 (in the sibling section handling content), replace the call to ctrl.contentLister.List(...) with ctrl.groupSnapshotContentLister.List(...) to fetch the correct group snapshot content objects. These changes ensure the group snapshot stores are initialized with the proper object types instead of regular snapshot/content objects, preventing runtime type assertion failures.pkg/common-controller/framework_test.go (1)
312-320:⚠️ Potential issue | 🟠 Major | ⚡ Quick winUse
r.groupContentsfor group-content existence/version checks.Line 317 and Line 384 are checking
r.contents(volume snapshot contents) insidevolumegroupsnapshotcontentshandlers. That makes the fake API server enforce conflicts/versioning against the wrong store and can produce incorrect outcomes for group snapshot content tests.Suggested fix
case action.Matches("create", "volumegroupsnapshotcontents"): obj := action.(core.CreateAction).GetObject() content := obj.(*groupsnapshotv1.VolumeGroupSnapshotContent) // check the content does not exist - _, found := r.contents[content.Name] + _, found := r.groupContents[content.Name] if found { return true, nil, fmt.Errorf("cannot create content %s: content already exists", content.Name) } @@ case action.Matches("update", "volumegroupsnapshotcontents"): obj := action.(core.UpdateAction).GetObject() content := obj.(*groupsnapshotv1.VolumeGroupSnapshotContent) // Check and bump object version - storedVolume, found := r.contents[content.Name] + storedGroupContent, found := r.groupContents[content.Name] if found { - storedVer, _ := strconv.Atoi(storedVolume.ResourceVersion) + storedVer, _ := strconv.Atoi(storedGroupContent.ResourceVersion) requestedVer, _ := strconv.Atoi(content.ResourceVersion) if storedVer != requestedVer { return true, obj, errVersionConflict }Also applies to: 379-396
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@pkg/common-controller/framework_test.go` around lines 312 - 320, The volumegroupsnapshotcontents create action handler is checking `r.contents` (the volume snapshot contents store) instead of `r.groupContents` (the group snapshot contents store) when validating whether a group snapshot content already exists. This causes the fake API server to enforce conflicts against the wrong store. Fix this by replacing the reference to `r.contents` with `r.groupContents` in the existence check within the volumegroupsnapshotcontents create handler. Apply the same fix to any other volumegroupsnapshotcontents handlers that similarly reference the wrong store for group content operations.
🧹 Nitpick comments (1)
pkg/common-controller/groupsnapshot_controller_helper.go (1)
1651-1654: Use the reconcile context for snapshot deletes.The
processGroupSnapshotWithDeletionTimestampfunction receivesctxas a parameter but usescontext.TODO()for the Delete call at line 1653. Replacecontext.TODO()withctxto properly propagate cancellation and timeout signals.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@pkg/common-controller/groupsnapshot_controller_helper.go` around lines 1651 - 1654, The VolumeSnapshots Delete operation in the processGroupSnapshotWithDeletionTimestamp function is using context.TODO() instead of the ctx parameter that was passed to the function. Replace context.TODO() with ctx in the Delete method call to ensure proper propagation of cancellation and timeout signals through the reconcile context.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@deploy/kubernetes/csi-snapshotter/setup-csi-snapshotter.yaml`:
- Line 75: Replace all mutable image tag references with immutable digest-pinned
references across the deployment manifests. In
deploy/kubernetes/csi-snapshotter/setup-csi-snapshotter.yaml at line 75, change
the csi-provisioner image from tag-based
(registry.k8s.io/sig-storage/csi-provisioner:v6.2.0) to a digest-pinned format
(registry.k8s.io/sig-storage/csi-provisioner@sha256:...). Apply the same
digest-pinning approach at line 87 for the csi-snapshotter image reference and
at line 100 for the hostpathplugin image reference. Additionally, in
deploy/kubernetes/snapshot-controller/setup-snapshot-controller.yaml at line 37,
replace the tag-only snapshot-controller reference with its corresponding
digest-pinned image. Use the exact digest values for each image version to
ensure immutability and verifiable pulls.
In `@pkg/metrics/metrics.go`:
- Around line 300-311: The periodic in-flight refresh loop is being disabled
because the cancel function is deferred in the init() method, causing ctx.Done()
to trigger immediately when init() returns, preventing the ticker from ever
executing. Instead of deferring cancel() in init(), store the cancel function as
a field in the manager and add an explicit Stop() method that calls cancel()
when the manager needs to shut down. This allows the background goroutine and
its ticker loop to continue running until Stop() is explicitly called, enabling
the leak-reconciliation path to execute periodically as intended.
In `@pkg/sidecar-controller/groupsnapshot_controller_test.go`:
- Around line 66-69: The VolumeGroupSnapshotRef.APIVersion field in the test
fixture is set to the beta2 version when it should use the v1 version to
properly validate the v1 API contract. Update the APIVersion value in the
VolumeGroupSnapshotRef initialization from
"groupsnapshot.storage.k8s.io/v1beta2" to "groupsnapshot.storage.k8s.io/v1" to
ensure the v1 test suite covers the actual v1 API version and prevents
version-specific regressions from being masked.
In `@pkg/utils/patch.go`:
- Around line 7-9: The patch helper functions PatchVolumeSnapshotContent,
PatchVolumeSnapshot, PatchVolumeGroupSnapshot, and
PatchVolumeGroupSnapshotContent are using hardcoded context.TODO() instead of
accepting context from callers, which prevents proper cancellation and timeout
propagation. Add a context.Context parameter to each of these four functions and
pass the caller-provided context to the .Patch() method calls instead of using
context.TODO(). This ensures callers can manage context lifecycle and enforce
timeouts or cancellations as needed.
- Line 73: All four patch helper functions in the file
(PatchVolumeSnapshotContent, PatchVolumeSnapshot, PatchVolumeGroupSnapshot, and
PatchVolumeGroupSnapshotContent) are hardcoding context.TODO() instead of
accepting context from their callers. Add a context.Context parameter as the
first argument to each of these four function signatures, replace all
occurrences of context.TODO() with the passed context parameter in each function
body, and then update all call sites of these four functions throughout the
codebase to pass the appropriate context from their callers instead of letting
the helpers create a new TODO context.
---
Outside diff comments:
In `@pkg/common-controller/framework_test.go`:
- Around line 312-320: The volumegroupsnapshotcontents create action handler is
checking `r.contents` (the volume snapshot contents store) instead of
`r.groupContents` (the group snapshot contents store) when validating whether a
group snapshot content already exists. This causes the fake API server to
enforce conflicts against the wrong store. Fix this by replacing the reference
to `r.contents` with `r.groupContents` in the existence check within the
volumegroupsnapshotcontents create handler. Apply the same fix to any other
volumegroupsnapshotcontents handlers that similarly reference the wrong store
for group content operations.
In `@pkg/common-controller/groupsnapshot_controller_helper.go`:
- Around line 1552-1554: The condition in the if statement on the line checking
groupSnapshotContentName uses the address-of operator & on
groupSnapshot.Spec.Source.VolumeGroupSnapshotContentName, which is already a
pointer field. This creates a pointer-to-pointer that is never nil, making the
second part of the condition always false and preventing the fallback call to
utils.GetDynamicSnapshotContentNameForGroupSnapshot from ever executing. Remove
the & operator from the condition so it directly checks whether
groupSnapshot.Spec.Source.VolumeGroupSnapshotContentName itself is nil.
- Around line 1406-1408: The comparison in the conditional statement is
comparing pointer addresses rather than the underlying boolean values of
ReadyToUse. To fix this, dereference both pointers using the asterisk operator
before the comparison. Change the condition from comparing
groupSnapshot.Status.ReadyToUse != groupSnapshotContent.Status.ReadyToUse to
comparing *groupSnapshot.Status.ReadyToUse !=
*groupSnapshotContent.Status.ReadyToUse. This ensures the actual boolean values
are compared, not the memory addresses, preventing incorrect trigger of status
updates when both pointers reference identical values.
- Around line 98-102: The UpdateStatus call can fail and return a nil
newSnapshot value, but the code unconditionally passes newSnapshot to
ctrl.eventRecorder.Event() without checking the error, which will cause a panic
when the event recorder tries to access the object's metadata. Check the err
returned by UpdateStatus before emitting the event. If the error is not nil, use
groupSnapshotClone instead of newSnapshot when calling
ctrl.eventRecorder.Event() so the event can still be recorded with a valid
object reference.
- Around line 161-171: When the VolumeGroupSnapshots Update call fails in the
code block starting with
ctrl.clientset.GroupsnapshotV1().VolumeGroupSnapshots(...).Update(), the error
is logged but execution continues, causing the function to return nil error and
hide the API failure. After logging the error in the first error check (the one
that logs "updating VolumeGroupSnapshot... failed"), add a return statement that
returns nil, groupSnapshot, err to properly surface the failure instead of
continuing to execute the rest of the function.
In `@pkg/common-controller/snapshot_controller_base.go`:
- Around line 657-668: The initializeCaches() method in
pkg/common-controller/snapshot_controller_base.go is using incorrect listers to
populate group snapshot stores. At lines 657-668, replace the call to
ctrl.snapshotLister.List(...) with ctrl.groupSnapshotLister.List(...) to fetch
the correct group snapshot objects. At lines 669-680 (in the sibling section
handling content), replace the call to ctrl.contentLister.List(...) with
ctrl.groupSnapshotContentLister.List(...) to fetch the correct group snapshot
content objects. These changes ensure the group snapshot stores are initialized
with the proper object types instead of regular snapshot/content objects,
preventing runtime type assertion failures.
In `@release-tools/.github/workflows/trivy.yaml`:
- Around line 2-7: The Trivy workflow in trivy.yaml is missing the pull_request
trigger in the on section, which prevents vulnerability scanning on pull
requests before they are merged. Add a pull_request trigger to the on section at
the same indentation level as the existing push and schedule triggers to
re-enable vulnerability detection on PRs.
---
Nitpick comments:
In `@pkg/common-controller/groupsnapshot_controller_helper.go`:
- Around line 1651-1654: The VolumeSnapshots Delete operation in the
processGroupSnapshotWithDeletionTimestamp function is using context.TODO()
instead of the ctx parameter that was passed to the function. Replace
context.TODO() with ctx in the Delete method call to ensure proper propagation
of cancellation and timeout signals through the reconcile context.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 669d0d2c-cde8-43e5-bbdf-9bc04de3dc05
⛔ Files ignored due to path filters (191)
client/apis/volumegroupsnapshot/v1/zz_generated.deepcopy.gois excluded by!**/zz_generated*client/apis/volumegroupsnapshot/v1beta1/zz_generated.deepcopy.gois excluded by!**/zz_generated*client/apis/volumegroupsnapshot/v1beta2/zz_generated.deepcopy.gois excluded by!**/zz_generated*client/go.sumis excluded by!**/*.sumgo.sumis excluded by!**/*.sumvendor/github.com/fsnotify/fsnotify/.cirrus.ymlis excluded by!**/vendor/**,!vendor/**vendor/github.com/fsnotify/fsnotify/CHANGELOG.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/fsnotify/fsnotify/CONTRIBUTING.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/fsnotify/fsnotify/README.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/fsnotify/fsnotify/backend_fen.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/fsnotify/fsnotify/backend_inotify.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/fsnotify/fsnotify/backend_kqueue.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/fsnotify/fsnotify/backend_windows.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/fsnotify/fsnotify/fsnotify.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/fsnotify/fsnotify/internal/darwin.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/fsnotify/fsnotify/internal/debug_darwin.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/fsnotify/fsnotify/internal/debug_dragonfly.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/fsnotify/fsnotify/internal/debug_freebsd.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/fsnotify/fsnotify/internal/debug_kqueue.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/fsnotify/fsnotify/internal/debug_netbsd.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/fsnotify/fsnotify/internal/debug_openbsd.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/fsnotify/fsnotify/internal/freebsd.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/fsnotify/fsnotify/internal/unix.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/fsnotify/fsnotify/internal/unix2.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/fsnotify/fsnotify/internal/windows.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/fxamacker/cbor/v2/.golangci.ymlis excluded by!**/vendor/**,!vendor/**vendor/github.com/fxamacker/cbor/v2/README.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/fxamacker/cbor/v2/cache.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/fxamacker/cbor/v2/decode.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/fxamacker/cbor/v2/decode_map_utils.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/fxamacker/cbor/v2/diagnose.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/fxamacker/cbor/v2/doc.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/fxamacker/cbor/v2/encode.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/fxamacker/cbor/v2/simplevalue.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/fxamacker/cbor/v2/stream.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/fxamacker/cbor/v2/structfields.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/fxamacker/cbor/v2/tag.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/fxamacker/cbor/v2/valid.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/go-openapi/jsonpointer/.cliff.tomlis excluded by!**/vendor/**,!vendor/**vendor/github.com/go-openapi/jsonpointer/.gitignoreis excluded by!**/vendor/**,!vendor/**vendor/github.com/go-openapi/jsonpointer/.golangci.ymlis excluded by!**/vendor/**,!vendor/**vendor/github.com/go-openapi/jsonpointer/CODE_OF_CONDUCT.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/go-openapi/jsonpointer/CONTRIBUTORS.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/go-openapi/jsonpointer/NOTICEis excluded by!**/vendor/**,!vendor/**vendor/github.com/go-openapi/jsonpointer/README.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/go-openapi/jsonpointer/SECURITY.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/go-openapi/jsonpointer/errors.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/go-openapi/jsonpointer/ifaces.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/go-openapi/jsonpointer/options.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/go-openapi/jsonpointer/pointer.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/go-openapi/jsonreference/.cliff.tomlis excluded by!**/vendor/**,!vendor/**vendor/github.com/go-openapi/jsonreference/.gitignoreis excluded by!**/vendor/**,!vendor/**vendor/github.com/go-openapi/jsonreference/.golangci.ymlis excluded by!**/vendor/**,!vendor/**vendor/github.com/go-openapi/jsonreference/CODE_OF_CONDUCT.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/go-openapi/jsonreference/CONTRIBUTORS.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/go-openapi/jsonreference/NOTICEis excluded by!**/vendor/**,!vendor/**vendor/github.com/go-openapi/jsonreference/README.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/go-openapi/jsonreference/SECURITY.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/go-openapi/jsonreference/reference.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/go-openapi/swag/.gitignoreis excluded by!**/vendor/**,!vendor/**vendor/github.com/go-openapi/swag/CODE_OF_CONDUCT.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/go-openapi/swag/CONTRIBUTORS.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/go-openapi/swag/README.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/go-openapi/swag/SECURITY.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/go-openapi/swag/go.workis excluded by!**/*.work,!**/vendor/**,!vendor/**vendor/github.com/go-openapi/swag/jsonname/go_name_provider.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/go-openapi/swag/jsonname/ifaces.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/go-openapi/swag/jsonname/name_provider.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/go-openapi/swag/jsonutils/README.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/go-openapi/swag/mangling/BENCHMARK.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/cel/BUILD.bazelis excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/cel/env.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/cel/fieldpaths.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/cel/inlining.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/cel/library.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/cel/options.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/cel/program.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/cel/prompt.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/cel/templates/authoring.tmplis excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/checker/checker.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/checker/cost.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/checker/env.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/checker/options.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/common/ast/ast.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/common/ast/conversion.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/common/decls/decls.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/common/doc.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/common/env/BUILD.bazelis excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/common/env/env.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/common/env/io.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/common/overloads/overloads.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/common/stdlib/standard.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/common/types/err.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/common/types/list.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/common/types/object.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/common/types/optional.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/common/types/pb/file.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/common/types/pb/pb.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/common/types/pb/type.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/common/types/provider.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/common/types/ref/provider.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/ext/BUILD.bazelis excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/ext/costs.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/ext/formatting.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/ext/formatting_v2.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/ext/lists.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/ext/native.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/ext/regex.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/ext/sets.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/ext/strings.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/interpreter/attributes.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/interpreter/interpretable.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/parser/parser.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus/LICENSEis excluded by!**/vendor/**,!vendor/**vendor/github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus/client_metrics.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus/client_options.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus/constants.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus/doc.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus/options.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus/reporter.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus/server_metrics.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus/server_options.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/grpc-ecosystem/go-grpc-middleware/v2/COPYRIGHTis excluded by!**/vendor/**,!vendor/**vendor/github.com/grpc-ecosystem/go-grpc-middleware/v2/LICENSEis excluded by!**/vendor/**,!vendor/**vendor/github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/callmeta.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/client.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/doc.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/reporter.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/server.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/grpc-ecosystem/go-grpc-prometheus/.gitignoreis excluded by!**/vendor/**,!vendor/**vendor/github.com/grpc-ecosystem/go-grpc-prometheus/.travis.ymlis excluded by!**/vendor/**,!vendor/**vendor/github.com/grpc-ecosystem/go-grpc-prometheus/CHANGELOG.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/grpc-ecosystem/go-grpc-prometheus/README.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/grpc-ecosystem/go-grpc-prometheus/client.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/grpc-ecosystem/go-grpc-prometheus/client_metrics.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/grpc-ecosystem/go-grpc-prometheus/client_reporter.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/grpc-ecosystem/go-grpc-prometheus/makefileis excluded by!**/vendor/**,!vendor/**vendor/github.com/grpc-ecosystem/go-grpc-prometheus/metric_options.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/grpc-ecosystem/go-grpc-prometheus/server.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/grpc-ecosystem/go-grpc-prometheus/server_metrics.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/grpc-ecosystem/go-grpc-prometheus/server_reporter.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/grpc-ecosystem/go-grpc-prometheus/util.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options/BUILD.bazelis excluded by!**/vendor/**,!vendor/**vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/handler.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/mux.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1/doc.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1/register.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1/types.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1/zz_generated.deepcopy.gois excluded by!**/vendor/**,!vendor/**,!**/zz_generated*vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta1/zz_generated.deepcopy.gois excluded by!**/vendor/**,!vendor/**,!**/zz_generated*vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta2/zz_generated.deepcopy.gois excluded by!**/vendor/**,!vendor/**,!**/zz_generated*vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/clientset.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/fake/clientset_generated.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/fake/doc.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/fake/register.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/scheme/doc.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/scheme/register.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1/doc.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1/fake/doc.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1/fake/fake_volumegroupsnapshot.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1/fake/fake_volumegroupsnapshot_client.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1/fake/fake_volumegroupsnapshotclass.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1/fake/fake_volumegroupsnapshotcontent.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1/generated_expansion.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1/volumegroupsnapshot.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1/volumegroupsnapshot_client.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1/volumegroupsnapshotclass.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1/volumegroupsnapshotcontent.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/doc.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/doc.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshot.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshot_client.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshotclass.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshotcontent.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/generated_expansion.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshot.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshot_client.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshotclass.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshotcontent.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2/doc.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2/fake/doc.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2/fake/fake_volumegroupsnapshot.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2/fake/fake_volumegroupsnapshot_client.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2/fake/fake_volumegroupsnapshotclass.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2/fake/fake_volumegroupsnapshotcontent.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2/generated_expansion.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2/volumegroupsnapshot.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2/volumegroupsnapshot_client.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2/volumegroupsnapshotclass.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2/volumegroupsnapshotcontent.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/factory.gois excluded by!**/vendor/**,!vendor/**
📒 Files selected for processing (109)
CHANGELOG/CHANGELOG-8.6.mdclient/apis/volumegroupsnapshot/v1/doc.goclient/apis/volumegroupsnapshot/v1/register.goclient/apis/volumegroupsnapshot/v1/types.goclient/clientset/versioned/clientset.goclient/clientset/versioned/fake/clientset_generated.goclient/clientset/versioned/fake/doc.goclient/clientset/versioned/fake/register.goclient/clientset/versioned/scheme/doc.goclient/clientset/versioned/scheme/register.goclient/clientset/versioned/typed/volumegroupsnapshot/v1/doc.goclient/clientset/versioned/typed/volumegroupsnapshot/v1/fake/doc.goclient/clientset/versioned/typed/volumegroupsnapshot/v1/fake/fake_volumegroupsnapshot.goclient/clientset/versioned/typed/volumegroupsnapshot/v1/fake/fake_volumegroupsnapshot_client.goclient/clientset/versioned/typed/volumegroupsnapshot/v1/fake/fake_volumegroupsnapshotclass.goclient/clientset/versioned/typed/volumegroupsnapshot/v1/fake/fake_volumegroupsnapshotcontent.goclient/clientset/versioned/typed/volumegroupsnapshot/v1/generated_expansion.goclient/clientset/versioned/typed/volumegroupsnapshot/v1/volumegroupsnapshot.goclient/clientset/versioned/typed/volumegroupsnapshot/v1/volumegroupsnapshot_client.goclient/clientset/versioned/typed/volumegroupsnapshot/v1/volumegroupsnapshotclass.goclient/clientset/versioned/typed/volumegroupsnapshot/v1/volumegroupsnapshotcontent.goclient/clientset/versioned/typed/volumegroupsnapshot/v1beta1/doc.goclient/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/doc.goclient/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshot.goclient/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshot_client.goclient/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshotclass.goclient/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshotcontent.goclient/clientset/versioned/typed/volumegroupsnapshot/v1beta1/generated_expansion.goclient/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshot.goclient/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshot_client.goclient/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshotclass.goclient/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshotcontent.goclient/clientset/versioned/typed/volumegroupsnapshot/v1beta2/doc.goclient/clientset/versioned/typed/volumegroupsnapshot/v1beta2/fake/doc.goclient/clientset/versioned/typed/volumegroupsnapshot/v1beta2/fake/fake_volumegroupsnapshot.goclient/clientset/versioned/typed/volumegroupsnapshot/v1beta2/fake/fake_volumegroupsnapshot_client.goclient/clientset/versioned/typed/volumegroupsnapshot/v1beta2/fake/fake_volumegroupsnapshotclass.goclient/clientset/versioned/typed/volumegroupsnapshot/v1beta2/fake/fake_volumegroupsnapshotcontent.goclient/clientset/versioned/typed/volumegroupsnapshot/v1beta2/generated_expansion.goclient/clientset/versioned/typed/volumegroupsnapshot/v1beta2/volumegroupsnapshot.goclient/clientset/versioned/typed/volumegroupsnapshot/v1beta2/volumegroupsnapshot_client.goclient/clientset/versioned/typed/volumegroupsnapshot/v1beta2/volumegroupsnapshotclass.goclient/clientset/versioned/typed/volumegroupsnapshot/v1beta2/volumegroupsnapshotcontent.goclient/config/crd/groupsnapshot.storage.k8s.io_volumegroupsnapshotclasses.yamlclient/config/crd/groupsnapshot.storage.k8s.io_volumegroupsnapshotcontents.yamlclient/config/crd/groupsnapshot.storage.k8s.io_volumegroupsnapshots.yamlclient/go.modclient/hack/boilerplate.go.txtclient/informers/externalversions/factory.goclient/informers/externalversions/generic.goclient/informers/externalversions/internalinterfaces/factory_interfaces.goclient/informers/externalversions/volumegroupsnapshot/interface.goclient/informers/externalversions/volumegroupsnapshot/v1/interface.goclient/informers/externalversions/volumegroupsnapshot/v1/volumegroupsnapshot.goclient/informers/externalversions/volumegroupsnapshot/v1/volumegroupsnapshotclass.goclient/informers/externalversions/volumegroupsnapshot/v1/volumegroupsnapshotcontent.goclient/informers/externalversions/volumegroupsnapshot/v1beta1/interface.goclient/informers/externalversions/volumegroupsnapshot/v1beta1/volumegroupsnapshot.goclient/informers/externalversions/volumegroupsnapshot/v1beta1/volumegroupsnapshotclass.goclient/informers/externalversions/volumegroupsnapshot/v1beta1/volumegroupsnapshotcontent.goclient/informers/externalversions/volumegroupsnapshot/v1beta2/interface.goclient/informers/externalversions/volumegroupsnapshot/v1beta2/volumegroupsnapshot.goclient/informers/externalversions/volumegroupsnapshot/v1beta2/volumegroupsnapshotclass.goclient/informers/externalversions/volumegroupsnapshot/v1beta2/volumegroupsnapshotcontent.goclient/listers/volumegroupsnapshot/v1/expansion_generated.goclient/listers/volumegroupsnapshot/v1/volumegroupsnapshot.goclient/listers/volumegroupsnapshot/v1/volumegroupsnapshotclass.goclient/listers/volumegroupsnapshot/v1/volumegroupsnapshotcontent.goclient/listers/volumegroupsnapshot/v1beta1/expansion_generated.goclient/listers/volumegroupsnapshot/v1beta1/volumegroupsnapshot.goclient/listers/volumegroupsnapshot/v1beta1/volumegroupsnapshotclass.goclient/listers/volumegroupsnapshot/v1beta1/volumegroupsnapshotcontent.goclient/listers/volumegroupsnapshot/v1beta2/expansion_generated.goclient/listers/volumegroupsnapshot/v1beta2/volumegroupsnapshot.goclient/listers/volumegroupsnapshot/v1beta2/volumegroupsnapshotclass.goclient/listers/volumegroupsnapshot/v1beta2/volumegroupsnapshotcontent.gocmd/csi-snapshotter/main.gocmd/snapshot-controller/main.godeploy/kubernetes/csi-snapshotter/setup-csi-snapshotter.yamldeploy/kubernetes/snapshot-controller/setup-snapshot-controller.yamlgo.modpkg/common-controller/framework_test.gopkg/common-controller/groupsnapshot_controller_helper.gopkg/common-controller/groupsnapshot_create_test.gopkg/common-controller/groupsnapshot_helper_test.gopkg/common-controller/groupsnapshot_sync_test.gopkg/common-controller/snapshot_controller.gopkg/common-controller/snapshot_controller_base.gopkg/common-controller/snapshot_delete_test.gopkg/group_snapshotter/group_snapshotter_test.gopkg/metrics/metrics.gopkg/metrics/metrics_test.gopkg/sidecar-controller/csi_handler.gopkg/sidecar-controller/csi_handler_test.gopkg/sidecar-controller/framework_test.gopkg/sidecar-controller/groupsnapshot_controller_test.gopkg/sidecar-controller/groupsnapshot_helper.gopkg/sidecar-controller/groupsnapshot_helper_test.gopkg/sidecar-controller/snapshot_controller_base.gopkg/utils/patch.gopkg/utils/util.gopkg/utils/vgs.gopkg/utils/vgs_test.gopkg/webhook/webhook.gorelease-tools/.github/workflows/codespell.ymlrelease-tools/.github/workflows/trivy.yamlrelease-tools/cloudbuild.yamlrelease-tools/prow.shrelease-tools/verify-vendor.sh
| containers: | ||
| - name: csi-provisioner | ||
| image: registry.k8s.io/sig-storage/csi-provisioner:v6.1.0 | ||
| image: registry.k8s.io/sig-storage/csi-provisioner:v6.2.0 |
There was a problem hiding this comment.
Mutable image tags are used across both deployment manifests; pin digests for immutable, verifiable pulls.
deploy/kubernetes/csi-snapshotter/setup-csi-snapshotter.yaml#L75-L75: replace tag-onlycsi-provisionerreference with a digest-pinned image.deploy/kubernetes/csi-snapshotter/setup-csi-snapshotter.yaml#L87-L87: replace tag-onlycsi-snapshotterreference with a digest-pinned image.deploy/kubernetes/csi-snapshotter/setup-csi-snapshotter.yaml#L100-L100: replace tag-onlyhostpathpluginreference with a digest-pinned image.deploy/kubernetes/snapshot-controller/setup-snapshot-controller.yaml#L37-L37: replace tag-onlysnapshot-controllerreference with a digest-pinned image.
📍 Affects 2 files
deploy/kubernetes/csi-snapshotter/setup-csi-snapshotter.yaml#L75-L75(this comment)deploy/kubernetes/csi-snapshotter/setup-csi-snapshotter.yaml#L87-L87deploy/kubernetes/csi-snapshotter/setup-csi-snapshotter.yaml#L100-L100deploy/kubernetes/snapshot-controller/setup-snapshot-controller.yaml#L37-L37
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@deploy/kubernetes/csi-snapshotter/setup-csi-snapshotter.yaml` at line 75,
Replace all mutable image tag references with immutable digest-pinned references
across the deployment manifests. In
deploy/kubernetes/csi-snapshotter/setup-csi-snapshotter.yaml at line 75, change
the csi-provisioner image from tag-based
(registry.k8s.io/sig-storage/csi-provisioner:v6.2.0) to a digest-pinned format
(registry.k8s.io/sig-storage/csi-provisioner@sha256:...). Apply the same
digest-pinning approach at line 87 for the csi-snapshotter image reference and
at line 100 for the hostpathplugin image reference. Additionally, in
deploy/kubernetes/snapshot-controller/setup-snapshot-controller.yaml at line 37,
replace the tag-only snapshot-controller reference with its corresponding
digest-pinned image. Use the exact digest values for each image version to
ensure immutability and verifiable pulls.
| ticker := time.NewTicker(inFlightCheckInterval) | ||
| defer ticker.Stop() | ||
| for { | ||
| select { | ||
| case <-ctx.Done(): | ||
| return | ||
| default: | ||
| for range time.NewTicker(inFlightCheckInterval).C { | ||
| func() { | ||
| opMgr.mu.Lock() | ||
| defer opMgr.mu.Unlock() | ||
| opMgr.opInFlight.Set(float64(len(opMgr.cache))) | ||
| }() | ||
| } | ||
| case <-ticker.C: | ||
| func() { | ||
| opMgr.mu.Lock() | ||
| defer opMgr.mu.Unlock() | ||
| opMgr.opInFlight.Set(float64(len(opMgr.cache))) | ||
| }() |
There was a problem hiding this comment.
Periodic in-flight refresh is effectively disabled by immediate context cancel.
Even with the ticker refactor, this loop won’t keep running because init() defers cancel() right after starting the goroutine (Line 294-Line 296), so ctx.Done() closes as soon as init() returns. That prevents the leak-reconciliation path from ever executing.
Suggested direction
- ctx, cancel := context.WithCancel(context.Background())
- defer cancel()
- go opMgr.scheduleOpsInFlightMetric(ctx)
+ go opMgr.scheduleOpsInFlightMetric(context.Background())If lifecycle-bound shutdown is required, add an explicit manager Stop() hook and store the cancel func instead of deferring it in init().
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@pkg/metrics/metrics.go` around lines 300 - 311, The periodic in-flight
refresh loop is being disabled because the cancel function is deferred in the
init() method, causing ctx.Done() to trigger immediately when init() returns,
preventing the ticker from ever executing. Instead of deferring cancel() in
init(), store the cancel function as a field in the manager and add an explicit
Stop() method that calls cancel() when the manager needs to shut down. This
allows the background goroutine and its ticker loop to continue running until
Stop() is explicitly called, enabling the leak-reconciliation path to execute
periodically as intended.
| VolumeGroupSnapshotRef: v1.ObjectReference{ | ||
| Kind: "VolumeGroupSnapshot", | ||
| APIVersion: "groupsnapshot.storage.k8s.io/v1beta2", | ||
| UID: types.UID(boundToGroupSnapshotUID), |
There was a problem hiding this comment.
Use v1 API version in the shared v1 test fixture.
Line 68 still sets VolumeGroupSnapshotRef.APIVersion to groupsnapshot.storage.k8s.io/v1beta2. Since this helper drives the v1 test suite, keeping beta2 here weakens v1 contract coverage and can mask version-specific regressions.
Suggested fix
- APIVersion: "groupsnapshot.storage.k8s.io/v1beta2",
+ APIVersion: "groupsnapshot.storage.k8s.io/v1",📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| VolumeGroupSnapshotRef: v1.ObjectReference{ | |
| Kind: "VolumeGroupSnapshot", | |
| APIVersion: "groupsnapshot.storage.k8s.io/v1beta2", | |
| UID: types.UID(boundToGroupSnapshotUID), | |
| VolumeGroupSnapshotRef: v1.ObjectReference{ | |
| Kind: "VolumeGroupSnapshot", | |
| APIVersion: "groupsnapshot.storage.k8s.io/v1", | |
| UID: types.UID(boundToGroupSnapshotUID), |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@pkg/sidecar-controller/groupsnapshot_controller_test.go` around lines 66 -
69, The VolumeGroupSnapshotRef.APIVersion field in the test fixture is set to
the beta2 version when it should use the v1 version to properly validate the v1
API contract. Update the APIVersion value in the VolumeGroupSnapshotRef
initialization from "groupsnapshot.storage.k8s.io/v1beta2" to
"groupsnapshot.storage.k8s.io/v1" to ensure the v1 test suite covers the actual
v1 API version and prevents version-specific regressions from being masked.
| groupsnapshotv1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1" | ||
| crdv1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumesnapshot/v1" | ||
| clientset "github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned" |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== Locate v1 snapshot API files =="
fd -i 'register.go|types.go|zz_generated.deepcopy.go' client/apis/volumesnapshot/v1 client/apis/volumegroupsnapshot/v1
echo
echo "== Check whether DeepCopyObject methods exist for v1 snapshot runtime objects =="
rg -n 'func \(in \*VolumeSnapshot(Class|Content|List)?\) DeepCopyObject\(' client/apis/volumesnapshot/v1 || true
rg -n 'func \(in \*VolumeGroupSnapshot(Class|Content|List)?\) DeepCopyObject\(' client/apis/volumegroupsnapshot/v1 || true
echo
echo "== Inspect AddKnownTypes registrations that require runtime.Object =="
rg -n 'AddKnownTypes|VolumeSnapshot|VolumeSnapshotClass|VolumeSnapshotContent' client/apis/volumesnapshot/v1/register.goRepository: openshift/csi-external-snapshotter
Length of output: 1799
🏁 Script executed:
cat -n pkg/utils/patch.go | head -100Repository: openshift/csi-external-snapshotter
Length of output: 4034
Replace hardcoded context.TODO() with caller-provided context in patch utility functions.
The patch helper functions use context.TODO() instead of accepting context from callers, preventing cancellation and timeout propagation. Accept context.Context as a parameter in PatchVolumeSnapshotContent (line 33), PatchVolumeSnapshot (line 53), PatchVolumeGroupSnapshot (line 73), and PatchVolumeGroupSnapshotContent (line 93), then pass it to the .Patch() calls.
🧰 Tools
🪛 golangci-lint (2.12.2)
[error] 7-7: could not import github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1 (client/apis/volumegroupsnapshot/v1/types.go:23:13: could not import github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumesnapshot/v1 (-: # github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumesnapshot/v1
client/apis/volumesnapshot/v1/register.go:49:3: cannot use &VolumeSnapshotClass{} (value of type *VolumeSnapshotClass) as "k8s.io/apimachinery/pkg/runtime".Object value in argument to scheme.AddKnownTypes: *VolumeSnapshotClass does not implement "k8s.io/apimachinery/pkg/runtime".Object (missing method DeepCopyObject)
client/apis/volumesnapshot/v1/register.go:50:3: cannot use &VolumeSnapshotClassList{} (value of type *VolumeSnapshotClassList) as "k8s.io/apimachinery/pkg/runtime".Object value in argument to scheme.AddKnownTypes: *VolumeSnapshotClassList does not implement "k8s.io/apimachinery/pkg/runtime".Object (missing method DeepCopyObject)
client/apis/volumesnapshot/v1/register.go:51:3: cannot use &VolumeSnapshot{} (value of type *VolumeSnapshot) as "k8s.io/apimachinery/pkg/runtime".Object value in argument to scheme.AddKnownTypes: *VolumeSnapshot does not implement "k8s.io/apimachinery/pkg/runtime".Object (missing method DeepCopyObject)
client/apis/volumesnapshot/v1/register.go:52:3: cannot use &VolumeSnapshotList{} (value of type *VolumeSnapshotList) as "k8s.io/apimachinery/pkg/runtime".Object value in argument to scheme.AddKnownTypes: *VolumeSnapshotList does not implement "k8s.io/apimachinery/pkg/runtime".Object (missing method DeepCopyObject)
client/apis/volumesnapshot/v1/register.go:53:3: cannot use &VolumeSnapshotContent{} (value of type *VolumeSnapshotContent) as "k8s.io/apimachinery/pkg/runtime".Object value in argument to scheme.AddKnownTypes: *VolumeSnapshotContent does not implement "k8s.io/apimachinery/pkg/runtime".Object (missing method DeepCopyObject)
client/apis/volumesnapshot/v1/register.go:54:3: cannot use &VolumeSnapshotContentList{} (value of type *VolumeSnapshotContentList) as "k8s.io/apimachinery/pkg/runtime".Object value in argument to scheme.AddKnownTypes: *VolumeSnapshotContentList does not implement "k8s.io/apimachinery/pkg/runtime".Object (missing method DeepCopyObject)))
(typecheck)
[error] 8-8: could not import github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumesnapshot/v1 (-: # github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumesnapshot/v1
client/apis/volumesnapshot/v1/register.go:49:3: cannot use &VolumeSnapshotClass{} (value of type *VolumeSnapshotClass) as "k8s.io/apimachinery/pkg/runtime".Object value in argument to scheme.AddKnownTypes: *VolumeSnapshotClass does not implement "k8s.io/apimachinery/pkg/runtime".Object (missing method DeepCopyObject)
client/apis/volumesnapshot/v1/register.go:50:3: cannot use &VolumeSnapshotClassList{} (value of type *VolumeSnapshotClassList) as "k8s.io/apimachinery/pkg/runtime".Object value in argument to scheme.AddKnownTypes: *VolumeSnapshotClassList does not implement "k8s.io/apimachinery/pkg/runtime".Object (missing method DeepCopyObject)
client/apis/volumesnapshot/v1/register.go:51:3: cannot use &VolumeSnapshot{} (value of type *VolumeSnapshot) as "k8s.io/apimachinery/pkg/runtime".Object value in argument to scheme.AddKnownTypes: *VolumeSnapshot does not implement "k8s.io/apimachinery/pkg/runtime".Object (missing method DeepCopyObject)
client/apis/volumesnapshot/v1/register.go:52:3: cannot use &VolumeSnapshotList{} (value of type *VolumeSnapshotList) as "k8s.io/apimachinery/pkg/runtime".Object value in argument to scheme.AddKnownTypes: *VolumeSnapshotList does not implement "k8s.io/apimachinery/pkg/runtime".Object (missing method DeepCopyObject)
client/apis/volumesnapshot/v1/register.go:53:3: cannot use &VolumeSnapshotContent{} (value of type *VolumeSnapshotContent) as "k8s.io/apimachinery/pkg/runtime".Object value in argument to scheme.AddKnownTypes: *VolumeSnapshotContent does not implement "k8s.io/apimachinery/pkg/runtime".Object (missing method DeepCopyObject)
client/apis/volumesnapshot/v1/register.go:54:3: cannot use &VolumeSnapshotContentList{} (value of type *VolumeSnapshotContentList) as "k8s.io/apimachinery/pkg/runtime".Object value in argument to scheme.AddKnownTypes: *VolumeSnapshotContentList does not implement "k8s.io/apimachinery/pkg/runtime".Object (missing method DeepCopyObject))
(typecheck)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@pkg/utils/patch.go` around lines 7 - 9, The patch helper functions
PatchVolumeSnapshotContent, PatchVolumeSnapshot, PatchVolumeGroupSnapshot, and
PatchVolumeGroupSnapshotContent are using hardcoded context.TODO() instead of
accepting context from callers, which prevents proper cancellation and timeout
propagation. Add a context.Context parameter to each of these four functions and
pass the caller-provided context to the .Patch() method calls instead of using
context.TODO(). This ensures callers can manage context lifecycle and enforce
timeouts or cancellations as needed.
Source: Linters/SAST tools
| } | ||
|
|
||
| newGroupSnapshot, err := client.GroupsnapshotV1beta2().VolumeGroupSnapshots(existingGroupSnapshot.Namespace).Patch(context.TODO(), existingGroupSnapshot.Name, types.JSONPatchType, data, metav1.PatchOptions{}, subresources...) | ||
| newGroupSnapshot, err := client.GroupsnapshotV1().VolumeGroupSnapshots(existingGroupSnapshot.Namespace).Patch(context.TODO(), existingGroupSnapshot.Name, types.JSONPatchType, data, metav1.PatchOptions{}, subresources...) |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
cat -n pkg/utils/patch.go | head -100Repository: openshift/csi-external-snapshotter
Length of output: 4034
🏁 Script executed:
rg "PatchVolume(GroupSnapshot|GroupSnapshotContent|Snapshot|SnapshotContent)" --type go -A 2 -B 2Repository: openshift/csi-external-snapshotter
Length of output: 10814
🏁 Script executed:
rg "func.*\(" pkg/sidecar-controller/snapshot_controller.go | head -20Repository: openshift/csi-external-snapshotter
Length of output: 2471
🏁 Script executed:
rg "func \(ctrl \*csiSnapshotSideCarController\) syncContent" -A 30 pkg/sidecar-controller/snapshot_controller.go | head -50Repository: openshift/csi-external-snapshotter
Length of output: 1577
🏁 Script executed:
rg "func \(ctrl \*csiSnapshotSideCarController\) Sync" -A 5 pkg/sidecar-controller/snapshot_controller.goRepository: openshift/csi-external-snapshotter
Length of output: 60
🏁 Script executed:
rg "work.Interface|workqueue" pkg/sidecar-controller/snapshot_controller.go | head -20Repository: openshift/csi-external-snapshotter
Length of output: 60
🏁 Script executed:
rg "type csiSnapshotSideCarController" -A 20 pkg/sidecar-controller/snapshot_controller.goRepository: openshift/csi-external-snapshotter
Length of output: 60
🏁 Script executed:
grep -n "syncContent\|deleteCSISnapshot\|checkandUpdateContentStatus" pkg/sidecar-controller/snapshot_controller.go | head -20Repository: openshift/csi-external-snapshotter
Length of output: 2201
🏁 Script executed:
rg "queue\|Run\|workers" pkg/sidecar-controller/snapshot_controller.go | head -30Repository: openshift/csi-external-snapshotter
Length of output: 60
🏁 Script executed:
head -100 pkg/sidecar-controller/snapshot_controller.goRepository: openshift/csi-external-snapshotter
Length of output: 4418
🏁 Script executed:
rg "syncContent|processNextItem|worker" pkg/sidecar-controller/snapshot_controller.go | head -40Repository: openshift/csi-external-snapshotter
Length of output: 364
🏁 Script executed:
rg "syncContent\(" pkg/sidecar-controller/snapshot_controller.go -B 5 -A 2Repository: openshift/csi-external-snapshotter
Length of output: 502
🏁 Script executed:
rg "syncContent\(|syncSnapshot\(|updateContentErrorStatus|setAnnVolumeSnapshotBeingCreated" pkg/sidecar-controller/ --type go -B 2 | head -60Repository: openshift/csi-external-snapshotter
Length of output: 4327
🏁 Script executed:
rg "syncContent\(" pkg/sidecar-controller/snapshot_controller_base.go -B 15 -A 5Repository: openshift/csi-external-snapshotter
Length of output: 787
🏁 Script executed:
rg "func.*syncContent\(" pkg/sidecar-controller/snapshot_controller_base.go -B 50 | head -80Repository: openshift/csi-external-snapshotter
Length of output: 60
🏁 Script executed:
cat -n pkg/sidecar-controller/snapshot_controller_base.go | sed -n '1,250p'Repository: openshift/csi-external-snapshotter
Length of output: 11543
Propagate caller context.Context into all patch helpers instead of using context.TODO().
All four patch helper functions in pkg/utils/patch.go hardcode context.TODO(), not just the two mentioned:
- Line 33:
PatchVolumeSnapshotContent - Line 53:
PatchVolumeSnapshot - Line 73:
PatchVolumeGroupSnapshot - Line 93:
PatchVolumeGroupSnapshotContent
This drops cancellation/timeouts from controller reconciliation flows. Thread context through helper signatures and all callers. Per Go coding guidelines, use context.Context for cancellation and timeouts.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@pkg/utils/patch.go` at line 73, All four patch helper functions in the file
(PatchVolumeSnapshotContent, PatchVolumeSnapshot, PatchVolumeGroupSnapshot, and
PatchVolumeGroupSnapshotContent) are hardcoding context.TODO() instead of
accepting context from their callers. Add a context.Context parameter as the
first argument to each of these four function signatures, replace all
occurrences of context.TODO() with the passed context parameter in each function
body, and then update all call sites of these four functions throughout the
codebase to pass the appropriate context from their callers instead of letting
the helpers create a new TODO context.
Source: Coding guidelines
This reverts commit 56ba1dc, which reverted the original v8.6.0 rebase (PR openshift#219). The original revert was caused by a VolumeGroupSnapshot CRD API version incompatibility that triggered crash-loop restarts in HyperShift hosted clusters. That incompatibility is now fixed, making it safe to re-land the v8.6.0 rebase. release-tools/ changes are excluded and handled in a separate subtree merge.
e03bbdd to
c9dcd7c
Compare
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@pkg/group_snapshotter/group_snapshotter_test.go`:
- Around line 112-135: In the startFakeCSI function, replace the deprecated
grpc.DialContext call with grpc.NewClient and update the connection
establishment logic to use explicit state management with WaitForStateChange and
connectivity.Ready instead of relying on context timeouts for blocking behavior,
since grpc.NewClient does not accept a context parameter for dial timeouts.
Additionally, replace all ignored error returns (currently marked with
underscore assignment) including the srv.Serve(lis) goroutine error, the
lis.Close() errors in both the error path and cleanup function, and conn.Close()
and srv.Stop() errors in the cleanup function by logging them at minimum in the
test context (using t.Logf or similar) to meet the coding guideline that error
returns must never be ignored.
In `@pkg/sidecar-controller/groupsnapshot_controller_test.go`:
- Around line 835-837: The if branch checking `creds == nil && tt.wantClass`
contains only a comment with no actual test logic, triggering staticcheck
warning SA9003. Remove this empty conditional block entirely, or replace it with
an explicit assertion that validates the expected behavior when no secret
annotations are present (such as asserting that the operation succeeds or a
specific condition is met), making the test intent clear and enforceable.
- Line 444: The test setup code is discarding errors from store.Add(...)
operations using blank identifier assignments, which can leave test fixtures in
invalid states. For each occurrence of `_ = store.Add(...)` used during test
fixture setup, replace the blank identifier with proper error handling that
checks the returned error and calls t.Fatalf with a descriptive message if the
Add operation fails. This ensures that any setup failures are immediately caught
and reported rather than silently creating invalid test state.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 459190b2-a240-4335-995f-a90aa61daf7e
⛔ Files ignored due to path filters (191)
client/apis/volumegroupsnapshot/v1/zz_generated.deepcopy.gois excluded by!**/zz_generated*client/apis/volumegroupsnapshot/v1beta1/zz_generated.deepcopy.gois excluded by!**/zz_generated*client/apis/volumegroupsnapshot/v1beta2/zz_generated.deepcopy.gois excluded by!**/zz_generated*client/go.sumis excluded by!**/*.sumgo.sumis excluded by!**/*.sumvendor/github.com/fsnotify/fsnotify/.cirrus.ymlis excluded by!**/vendor/**,!vendor/**vendor/github.com/fsnotify/fsnotify/CHANGELOG.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/fsnotify/fsnotify/CONTRIBUTING.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/fsnotify/fsnotify/README.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/fsnotify/fsnotify/backend_fen.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/fsnotify/fsnotify/backend_inotify.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/fsnotify/fsnotify/backend_kqueue.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/fsnotify/fsnotify/backend_windows.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/fsnotify/fsnotify/fsnotify.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/fsnotify/fsnotify/internal/darwin.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/fsnotify/fsnotify/internal/debug_darwin.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/fsnotify/fsnotify/internal/debug_dragonfly.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/fsnotify/fsnotify/internal/debug_freebsd.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/fsnotify/fsnotify/internal/debug_kqueue.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/fsnotify/fsnotify/internal/debug_netbsd.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/fsnotify/fsnotify/internal/debug_openbsd.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/fsnotify/fsnotify/internal/freebsd.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/fsnotify/fsnotify/internal/unix.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/fsnotify/fsnotify/internal/unix2.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/fsnotify/fsnotify/internal/windows.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/fxamacker/cbor/v2/.golangci.ymlis excluded by!**/vendor/**,!vendor/**vendor/github.com/fxamacker/cbor/v2/README.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/fxamacker/cbor/v2/cache.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/fxamacker/cbor/v2/decode.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/fxamacker/cbor/v2/decode_map_utils.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/fxamacker/cbor/v2/diagnose.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/fxamacker/cbor/v2/doc.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/fxamacker/cbor/v2/encode.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/fxamacker/cbor/v2/simplevalue.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/fxamacker/cbor/v2/stream.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/fxamacker/cbor/v2/structfields.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/fxamacker/cbor/v2/tag.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/fxamacker/cbor/v2/valid.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/go-openapi/jsonpointer/.cliff.tomlis excluded by!**/vendor/**,!vendor/**vendor/github.com/go-openapi/jsonpointer/.gitignoreis excluded by!**/vendor/**,!vendor/**vendor/github.com/go-openapi/jsonpointer/.golangci.ymlis excluded by!**/vendor/**,!vendor/**vendor/github.com/go-openapi/jsonpointer/CODE_OF_CONDUCT.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/go-openapi/jsonpointer/CONTRIBUTORS.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/go-openapi/jsonpointer/NOTICEis excluded by!**/vendor/**,!vendor/**vendor/github.com/go-openapi/jsonpointer/README.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/go-openapi/jsonpointer/SECURITY.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/go-openapi/jsonpointer/errors.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/go-openapi/jsonpointer/ifaces.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/go-openapi/jsonpointer/options.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/go-openapi/jsonpointer/pointer.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/go-openapi/jsonreference/.cliff.tomlis excluded by!**/vendor/**,!vendor/**vendor/github.com/go-openapi/jsonreference/.gitignoreis excluded by!**/vendor/**,!vendor/**vendor/github.com/go-openapi/jsonreference/.golangci.ymlis excluded by!**/vendor/**,!vendor/**vendor/github.com/go-openapi/jsonreference/CODE_OF_CONDUCT.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/go-openapi/jsonreference/CONTRIBUTORS.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/go-openapi/jsonreference/NOTICEis excluded by!**/vendor/**,!vendor/**vendor/github.com/go-openapi/jsonreference/README.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/go-openapi/jsonreference/SECURITY.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/go-openapi/jsonreference/reference.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/go-openapi/swag/.gitignoreis excluded by!**/vendor/**,!vendor/**vendor/github.com/go-openapi/swag/CODE_OF_CONDUCT.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/go-openapi/swag/CONTRIBUTORS.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/go-openapi/swag/README.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/go-openapi/swag/SECURITY.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/go-openapi/swag/go.workis excluded by!**/*.work,!**/vendor/**,!vendor/**vendor/github.com/go-openapi/swag/jsonname/go_name_provider.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/go-openapi/swag/jsonname/ifaces.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/go-openapi/swag/jsonname/name_provider.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/go-openapi/swag/jsonutils/README.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/go-openapi/swag/mangling/BENCHMARK.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/cel/BUILD.bazelis excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/cel/env.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/cel/fieldpaths.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/cel/inlining.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/cel/library.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/cel/options.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/cel/program.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/cel/prompt.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/cel/templates/authoring.tmplis excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/checker/checker.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/checker/cost.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/checker/env.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/checker/options.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/common/ast/ast.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/common/ast/conversion.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/common/decls/decls.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/common/doc.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/common/env/BUILD.bazelis excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/common/env/env.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/common/env/io.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/common/overloads/overloads.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/common/stdlib/standard.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/common/types/err.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/common/types/list.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/common/types/object.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/common/types/optional.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/common/types/pb/file.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/common/types/pb/pb.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/common/types/pb/type.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/common/types/provider.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/common/types/ref/provider.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/ext/BUILD.bazelis excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/ext/costs.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/ext/formatting.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/ext/formatting_v2.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/ext/lists.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/ext/native.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/ext/regex.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/ext/sets.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/ext/strings.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/interpreter/attributes.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/interpreter/interpretable.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/google/cel-go/parser/parser.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus/LICENSEis excluded by!**/vendor/**,!vendor/**vendor/github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus/client_metrics.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus/client_options.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus/constants.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus/doc.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus/options.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus/reporter.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus/server_metrics.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus/server_options.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/grpc-ecosystem/go-grpc-middleware/v2/COPYRIGHTis excluded by!**/vendor/**,!vendor/**vendor/github.com/grpc-ecosystem/go-grpc-middleware/v2/LICENSEis excluded by!**/vendor/**,!vendor/**vendor/github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/callmeta.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/client.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/doc.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/reporter.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/server.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/grpc-ecosystem/go-grpc-prometheus/.gitignoreis excluded by!**/vendor/**,!vendor/**vendor/github.com/grpc-ecosystem/go-grpc-prometheus/.travis.ymlis excluded by!**/vendor/**,!vendor/**vendor/github.com/grpc-ecosystem/go-grpc-prometheus/CHANGELOG.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/grpc-ecosystem/go-grpc-prometheus/README.mdis excluded by!**/vendor/**,!vendor/**vendor/github.com/grpc-ecosystem/go-grpc-prometheus/client.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/grpc-ecosystem/go-grpc-prometheus/client_metrics.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/grpc-ecosystem/go-grpc-prometheus/client_reporter.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/grpc-ecosystem/go-grpc-prometheus/makefileis excluded by!**/vendor/**,!vendor/**vendor/github.com/grpc-ecosystem/go-grpc-prometheus/metric_options.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/grpc-ecosystem/go-grpc-prometheus/server.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/grpc-ecosystem/go-grpc-prometheus/server_metrics.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/grpc-ecosystem/go-grpc-prometheus/server_reporter.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/grpc-ecosystem/go-grpc-prometheus/util.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options/BUILD.bazelis excluded by!**/vendor/**,!vendor/**vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/handler.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/mux.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1/doc.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1/register.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1/types.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1/zz_generated.deepcopy.gois excluded by!**/vendor/**,!vendor/**,!**/zz_generated*vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta1/zz_generated.deepcopy.gois excluded by!**/vendor/**,!vendor/**,!**/zz_generated*vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta2/zz_generated.deepcopy.gois excluded by!**/vendor/**,!vendor/**,!**/zz_generated*vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/clientset.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/fake/clientset_generated.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/fake/doc.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/fake/register.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/scheme/doc.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/scheme/register.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1/doc.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1/fake/doc.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1/fake/fake_volumegroupsnapshot.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1/fake/fake_volumegroupsnapshot_client.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1/fake/fake_volumegroupsnapshotclass.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1/fake/fake_volumegroupsnapshotcontent.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1/generated_expansion.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1/volumegroupsnapshot.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1/volumegroupsnapshot_client.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1/volumegroupsnapshotclass.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1/volumegroupsnapshotcontent.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/doc.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/doc.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshot.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshot_client.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshotclass.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshotcontent.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/generated_expansion.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshot.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshot_client.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshotclass.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshotcontent.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2/doc.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2/fake/doc.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2/fake/fake_volumegroupsnapshot.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2/fake/fake_volumegroupsnapshot_client.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2/fake/fake_volumegroupsnapshotclass.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2/fake/fake_volumegroupsnapshotcontent.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2/generated_expansion.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2/volumegroupsnapshot.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2/volumegroupsnapshot_client.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2/volumegroupsnapshotclass.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/typed/volumegroupsnapshot/v1beta2/volumegroupsnapshotcontent.gois excluded by!**/vendor/**,!vendor/**vendor/github.com/kubernetes-csi/external-snapshotter/client/v8/informers/externalversions/factory.gois excluded by!**/vendor/**,!vendor/**
📒 Files selected for processing (109)
CHANGELOG/CHANGELOG-8.6.mdclient/apis/volumegroupsnapshot/v1/doc.goclient/apis/volumegroupsnapshot/v1/register.goclient/apis/volumegroupsnapshot/v1/types.goclient/clientset/versioned/clientset.goclient/clientset/versioned/fake/clientset_generated.goclient/clientset/versioned/fake/doc.goclient/clientset/versioned/fake/register.goclient/clientset/versioned/scheme/doc.goclient/clientset/versioned/scheme/register.goclient/clientset/versioned/typed/volumegroupsnapshot/v1/doc.goclient/clientset/versioned/typed/volumegroupsnapshot/v1/fake/doc.goclient/clientset/versioned/typed/volumegroupsnapshot/v1/fake/fake_volumegroupsnapshot.goclient/clientset/versioned/typed/volumegroupsnapshot/v1/fake/fake_volumegroupsnapshot_client.goclient/clientset/versioned/typed/volumegroupsnapshot/v1/fake/fake_volumegroupsnapshotclass.goclient/clientset/versioned/typed/volumegroupsnapshot/v1/fake/fake_volumegroupsnapshotcontent.goclient/clientset/versioned/typed/volumegroupsnapshot/v1/generated_expansion.goclient/clientset/versioned/typed/volumegroupsnapshot/v1/volumegroupsnapshot.goclient/clientset/versioned/typed/volumegroupsnapshot/v1/volumegroupsnapshot_client.goclient/clientset/versioned/typed/volumegroupsnapshot/v1/volumegroupsnapshotclass.goclient/clientset/versioned/typed/volumegroupsnapshot/v1/volumegroupsnapshotcontent.goclient/clientset/versioned/typed/volumegroupsnapshot/v1beta1/doc.goclient/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/doc.goclient/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshot.goclient/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshot_client.goclient/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshotclass.goclient/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshotcontent.goclient/clientset/versioned/typed/volumegroupsnapshot/v1beta1/generated_expansion.goclient/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshot.goclient/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshot_client.goclient/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshotclass.goclient/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshotcontent.goclient/clientset/versioned/typed/volumegroupsnapshot/v1beta2/doc.goclient/clientset/versioned/typed/volumegroupsnapshot/v1beta2/fake/doc.goclient/clientset/versioned/typed/volumegroupsnapshot/v1beta2/fake/fake_volumegroupsnapshot.goclient/clientset/versioned/typed/volumegroupsnapshot/v1beta2/fake/fake_volumegroupsnapshot_client.goclient/clientset/versioned/typed/volumegroupsnapshot/v1beta2/fake/fake_volumegroupsnapshotclass.goclient/clientset/versioned/typed/volumegroupsnapshot/v1beta2/fake/fake_volumegroupsnapshotcontent.goclient/clientset/versioned/typed/volumegroupsnapshot/v1beta2/generated_expansion.goclient/clientset/versioned/typed/volumegroupsnapshot/v1beta2/volumegroupsnapshot.goclient/clientset/versioned/typed/volumegroupsnapshot/v1beta2/volumegroupsnapshot_client.goclient/clientset/versioned/typed/volumegroupsnapshot/v1beta2/volumegroupsnapshotclass.goclient/clientset/versioned/typed/volumegroupsnapshot/v1beta2/volumegroupsnapshotcontent.goclient/config/crd/groupsnapshot.storage.k8s.io_volumegroupsnapshotclasses.yamlclient/config/crd/groupsnapshot.storage.k8s.io_volumegroupsnapshotcontents.yamlclient/config/crd/groupsnapshot.storage.k8s.io_volumegroupsnapshots.yamlclient/go.modclient/hack/boilerplate.go.txtclient/informers/externalversions/factory.goclient/informers/externalversions/generic.goclient/informers/externalversions/internalinterfaces/factory_interfaces.goclient/informers/externalversions/volumegroupsnapshot/interface.goclient/informers/externalversions/volumegroupsnapshot/v1/interface.goclient/informers/externalversions/volumegroupsnapshot/v1/volumegroupsnapshot.goclient/informers/externalversions/volumegroupsnapshot/v1/volumegroupsnapshotclass.goclient/informers/externalversions/volumegroupsnapshot/v1/volumegroupsnapshotcontent.goclient/informers/externalversions/volumegroupsnapshot/v1beta1/interface.goclient/informers/externalversions/volumegroupsnapshot/v1beta1/volumegroupsnapshot.goclient/informers/externalversions/volumegroupsnapshot/v1beta1/volumegroupsnapshotclass.goclient/informers/externalversions/volumegroupsnapshot/v1beta1/volumegroupsnapshotcontent.goclient/informers/externalversions/volumegroupsnapshot/v1beta2/interface.goclient/informers/externalversions/volumegroupsnapshot/v1beta2/volumegroupsnapshot.goclient/informers/externalversions/volumegroupsnapshot/v1beta2/volumegroupsnapshotclass.goclient/informers/externalversions/volumegroupsnapshot/v1beta2/volumegroupsnapshotcontent.goclient/listers/volumegroupsnapshot/v1/expansion_generated.goclient/listers/volumegroupsnapshot/v1/volumegroupsnapshot.goclient/listers/volumegroupsnapshot/v1/volumegroupsnapshotclass.goclient/listers/volumegroupsnapshot/v1/volumegroupsnapshotcontent.goclient/listers/volumegroupsnapshot/v1beta1/expansion_generated.goclient/listers/volumegroupsnapshot/v1beta1/volumegroupsnapshot.goclient/listers/volumegroupsnapshot/v1beta1/volumegroupsnapshotclass.goclient/listers/volumegroupsnapshot/v1beta1/volumegroupsnapshotcontent.goclient/listers/volumegroupsnapshot/v1beta2/expansion_generated.goclient/listers/volumegroupsnapshot/v1beta2/volumegroupsnapshot.goclient/listers/volumegroupsnapshot/v1beta2/volumegroupsnapshotclass.goclient/listers/volumegroupsnapshot/v1beta2/volumegroupsnapshotcontent.gocmd/csi-snapshotter/main.gocmd/snapshot-controller/main.godeploy/kubernetes/csi-snapshotter/setup-csi-snapshotter.yamldeploy/kubernetes/snapshot-controller/setup-snapshot-controller.yamlgo.modpkg/common-controller/framework_test.gopkg/common-controller/groupsnapshot_controller_helper.gopkg/common-controller/groupsnapshot_create_test.gopkg/common-controller/groupsnapshot_helper_test.gopkg/common-controller/groupsnapshot_sync_test.gopkg/common-controller/snapshot_controller.gopkg/common-controller/snapshot_controller_base.gopkg/common-controller/snapshot_delete_test.gopkg/group_snapshotter/group_snapshotter_test.gopkg/metrics/metrics.gopkg/metrics/metrics_test.gopkg/sidecar-controller/csi_handler.gopkg/sidecar-controller/csi_handler_test.gopkg/sidecar-controller/framework_test.gopkg/sidecar-controller/groupsnapshot_controller_test.gopkg/sidecar-controller/groupsnapshot_helper.gopkg/sidecar-controller/groupsnapshot_helper_test.gopkg/sidecar-controller/snapshot_controller_base.gopkg/utils/patch.gopkg/utils/util.gopkg/utils/vgs.gopkg/utils/vgs_test.gopkg/webhook/webhook.gorelease-tools/.github/workflows/codespell.ymlrelease-tools/.github/workflows/trivy.yamlrelease-tools/cloudbuild.yamlrelease-tools/prow.shrelease-tools/verify-vendor.sh
✅ Files skipped from review due to trivial changes (30)
- release-tools/cloudbuild.yaml
- client/clientset/versioned/typed/volumegroupsnapshot/v1beta2/generated_expansion.go
- client/listers/volumegroupsnapshot/v1beta2/expansion_generated.go
- client/informers/externalversions/internalinterfaces/factory_interfaces.go
- client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/generated_expansion.go
- client/clientset/versioned/typed/volumegroupsnapshot/v1beta2/doc.go
- client/clientset/versioned/fake/doc.go
- client/clientset/versioned/typed/volumegroupsnapshot/v1/fake/fake_volumegroupsnapshotcontent.go
- client/hack/boilerplate.go.txt
- client/clientset/versioned/scheme/doc.go
- client/clientset/versioned/typed/volumegroupsnapshot/v1/volumegroupsnapshotclass.go
- client/clientset/versioned/typed/volumegroupsnapshot/v1/fake/doc.go
- client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/doc.go
- client/clientset/versioned/fake/register.go
- client/listers/volumegroupsnapshot/v1/expansion_generated.go
- client/informers/externalversions/volumegroupsnapshot/v1beta1/interface.go
- client/clientset/versioned/typed/volumegroupsnapshot/v1/fake/fake_volumegroupsnapshot.go
- client/listers/volumegroupsnapshot/v1/volumegroupsnapshotcontent.go
- client/listers/volumegroupsnapshot/v1beta1/expansion_generated.go
- client/clientset/versioned/typed/volumegroupsnapshot/v1beta2/fake/doc.go
- client/informers/externalversions/factory.go
- client/clientset/versioned/typed/volumegroupsnapshot/v1/volumegroupsnapshotcontent.go
- client/clientset/versioned/typed/volumegroupsnapshot/v1/fake/fake_volumegroupsnapshotclass.go
- client/listers/volumegroupsnapshot/v1beta1/volumegroupsnapshot.go
- client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/doc.go
- client/listers/volumegroupsnapshot/v1/volumegroupsnapshot.go
- client/informers/externalversions/volumegroupsnapshot/v1/interface.go
- client/informers/externalversions/volumegroupsnapshot/v1/volumegroupsnapshotcontent.go
- client/clientset/versioned/typed/volumegroupsnapshot/v1/volumegroupsnapshot.go
- client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshotcontent.go
🚧 Files skipped from review as they are similar to previous changes (69)
- client/clientset/versioned/typed/volumegroupsnapshot/v1/generated_expansion.go
- release-tools/verify-vendor.sh
- client/clientset/versioned/typed/volumegroupsnapshot/v1/doc.go
- pkg/utils/vgs_test.go
- client/listers/volumegroupsnapshot/v1/volumegroupsnapshotclass.go
- deploy/kubernetes/csi-snapshotter/setup-csi-snapshotter.yaml
- deploy/kubernetes/snapshot-controller/setup-snapshot-controller.yaml
- pkg/metrics/metrics.go
- pkg/webhook/webhook.go
- release-tools/prow.sh
- pkg/metrics/metrics_test.go
- pkg/common-controller/groupsnapshot_create_test.go
- pkg/common-controller/snapshot_controller.go
- client/informers/externalversions/volumegroupsnapshot/interface.go
- release-tools/.github/workflows/codespell.yml
- client/clientset/versioned/typed/volumegroupsnapshot/v1beta2/fake/fake_volumegroupsnapshot_client.go
- pkg/sidecar-controller/framework_test.go
- client/clientset/versioned/scheme/register.go
- client/apis/volumegroupsnapshot/v1/doc.go
- client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshot_client.go
- pkg/utils/patch.go
- cmd/snapshot-controller/main.go
- client/clientset/versioned/typed/volumegroupsnapshot/v1beta2/volumegroupsnapshot_client.go
- client/apis/volumegroupsnapshot/v1/register.go
- client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshot.go
- pkg/common-controller/snapshot_delete_test.go
- client/listers/volumegroupsnapshot/v1beta1/volumegroupsnapshotcontent.go
- pkg/sidecar-controller/csi_handler.go
- client/clientset/versioned/fake/clientset_generated.go
- client/informers/externalversions/generic.go
- client/clientset/versioned/typed/volumegroupsnapshot/v1beta2/volumegroupsnapshotclass.go
- client/clientset/versioned/typed/volumegroupsnapshot/v1beta2/fake/fake_volumegroupsnapshotcontent.go
- release-tools/.github/workflows/trivy.yaml
- pkg/sidecar-controller/snapshot_controller_base.go
- pkg/utils/vgs.go
- client/listers/volumegroupsnapshot/v1beta2/volumegroupsnapshotcontent.go
- client/informers/externalversions/volumegroupsnapshot/v1beta2/volumegroupsnapshot.go
- client/listers/volumegroupsnapshot/v1beta2/volumegroupsnapshotclass.go
- client/clientset/versioned/typed/volumegroupsnapshot/v1beta2/fake/fake_volumegroupsnapshotclass.go
- client/go.mod
- client/clientset/versioned/typed/volumegroupsnapshot/v1beta2/fake/fake_volumegroupsnapshot.go
- client/informers/externalversions/volumegroupsnapshot/v1beta2/volumegroupsnapshotcontent.go
- client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshot.go
- client/config/crd/groupsnapshot.storage.k8s.io_volumegroupsnapshotclasses.yaml
- client/informers/externalversions/volumegroupsnapshot/v1beta1/volumegroupsnapshotclass.go
- client/clientset/versioned/typed/volumegroupsnapshot/v1beta2/volumegroupsnapshot.go
- client/informers/externalversions/volumegroupsnapshot/v1beta2/volumegroupsnapshotclass.go
- client/informers/externalversions/volumegroupsnapshot/v1/volumegroupsnapshot.go
- client/config/crd/groupsnapshot.storage.k8s.io_volumegroupsnapshotcontents.yaml
- client/config/crd/groupsnapshot.storage.k8s.io_volumegroupsnapshots.yaml
- pkg/sidecar-controller/csi_handler_test.go
- client/informers/externalversions/volumegroupsnapshot/v1beta1/volumegroupsnapshot.go
- pkg/sidecar-controller/groupsnapshot_helper_test.go
- client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshotclass.go
- go.mod
- client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshotcontent.go
- client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/fake/fake_volumegroupsnapshotclass.go
- client/listers/volumegroupsnapshot/v1beta2/volumegroupsnapshot.go
- pkg/common-controller/snapshot_controller_base.go
- client/clientset/versioned/typed/volumegroupsnapshot/v1/volumegroupsnapshot_client.go
- pkg/common-controller/groupsnapshot_sync_test.go
- client/apis/volumegroupsnapshot/v1/types.go
- pkg/common-controller/groupsnapshot_helper_test.go
- client/clientset/versioned/typed/volumegroupsnapshot/v1beta2/volumegroupsnapshotcontent.go
- pkg/utils/util.go
- pkg/sidecar-controller/groupsnapshot_helper.go
- pkg/common-controller/framework_test.go
- pkg/common-controller/groupsnapshot_controller_helper.go
- client/clientset/versioned/typed/volumegroupsnapshot/v1beta1/volumegroupsnapshot_client.go
| lis, err := net.Listen("tcp", "127.0.0.1:0") | ||
| if err != nil { | ||
| t.Fatalf("failed to listen: %v", err) | ||
| } | ||
| srv := grpc.NewServer() | ||
| csi.RegisterIdentityServer(srv, fake) | ||
| csi.RegisterGroupControllerServer(srv, fake) | ||
| go func() { | ||
| _ = srv.Serve(lis) | ||
| }() | ||
| addr := lis.Addr().String() | ||
| ctx, cancel := context.WithTimeout(context.Background(), 2*time.Second) | ||
| defer cancel() | ||
| conn, err = grpc.DialContext(ctx, addr, grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithBlock()) | ||
| if err != nil { | ||
| srv.Stop() | ||
| _ = lis.Close() | ||
| t.Fatalf("failed to dial: %v", err) | ||
| } | ||
| cleanup = func() { | ||
| _ = conn.Close() | ||
| srv.Stop() | ||
| _ = lis.Close() | ||
| } |
There was a problem hiding this comment.
🧩 Analysis chain
🌐 Web query:
For grpc-go v1.81.x, what is the recommended replacement for grpc.DialContext (including blocking connect behavior) in unit tests?
💡 Result:
For grpc-go v1.81.x, the recommended replacement for grpc.DialContext is grpc.NewClient [1][2][3]. While grpc.DialContext is deprecated, it remains supported throughout the 1.x release cycle, and you are not required to remove it immediately [1][2][4]. For unit tests that rely on the previous blocking behavior of grpc.DialContext (often used with WithBlock), you should use grpc.NewClient in conjunction with the connection state management APIs [2][4]. Recommended approach for blocking behavior: 1. Create the client using grpc.NewClient [4][5]: conn, err:= grpc.NewClient("passthrough:///your-target", opts...) if err!= nil { // handle error } 2. Ensure the connection reaches the desired state (e.g., Ready) using the connection's state management methods [4]: // Example of waiting for the connection to be ready for { state:= conn.GetState if state == connectivity.Ready { break } if!conn.WaitForStateChange(context.Background, state) { // Handle timeout or context cancellation break } } Key considerations: - Resolver Scheme: grpc.NewClient defaults to the "dns" resolver, whereas grpc.DialContext defaulted to "passthrough" [6][7]. When using custom dialers (like bufconn) in tests, you should explicitly set the target to use the "passthrough" scheme (e.g., "passthrough:///bufnet") to ensure compatibility [8][6][5]. - No Timeouts in NewClient: Unlike grpc.DialContext, grpc.NewClient does not accept a context for dialing timeouts [1]. If you must enforce a timeout on the connection process, you should wrap the connection state waiting logic (like WaitForStateChange) with a context that has a timeout [4]. - Maintenance: The gRPC team officially discourages using the old blocking options (WithBlock, WithTimeout) because they reinforce anti-patterns, which is the primary reason for the deprecation [1][4]. Implementing the explicit wait as shown above is the intended replacement pattern [2][4].
Citations:
- 1: Update docs and examples and tests to use
NewClientinstead ofDialgrpc/grpc-go#7049 - 2: Deprecation of
DialContextandDialis not mentioned in 1.63.0 release notes grpc/grpc-go#7090 - 3: cleanup: replace grpc.Dial with grpc.NewClient in tests grpc/grpc-go#7640
- 4: https://github.com/grpc/grpc-go/blob/master/Documentation/anti-patterns.md
- 5: https://rednafi.com/go/testing-unary-grpc-services/
- 6: bufnet not supported by NewClient() ? grpc/grpc-go#7091
- 7: chore: expose
NewClientmethod to end users grpc/grpc-go#7010 - 8: Consider deprecating Dial and DialContext and replacing with a NewClient grpc/grpc-go#1786
🏁 Script executed:
# First, find and read the test file
fd -t f "group_snapshotter_test.go" | head -5Repository: openshift/csi-external-snapshotter
Length of output: 126
🏁 Script executed:
# Find go.mod to check grpc-go version
fd -t f "go.mod" | head -5Repository: openshift/csi-external-snapshotter
Length of output: 178
🏁 Script executed:
# Read the test file to verify the actual code at lines 112-135
cat -n pkg/group_snapshotter/group_snapshotter_test.go | sed -n '100,140p'Repository: openshift/csi-external-snapshotter
Length of output: 1553
🏁 Script executed:
# Read go.mod to find grpc-go version
cat go.mod | grep -E "google.golang.org/grpc|github.com/grpc" | head -10Repository: openshift/csi-external-snapshotter
Length of output: 424
Replace deprecated grpc.DialContext and handle ignored errors in test bootstrap.
The startFakeCSI function uses the deprecated grpc.DialContext API (line 125, flagged as SA1019 in grpc-go v1.81.1) and ignores error returns at lines 120, 128, 132, and 134. Per coding guidelines, **/*.go must never ignore error returns. While this is test code, swallowing serve and close errors can hide bootstrap failures and cause test flakiness.
Use grpc.NewClient as the replacement (available in v1.81.1 without deprecation warnings). Note: unlike grpc.DialContext, grpc.NewClient does not accept a context for dial timeouts and requires explicit state management for blocking behavior using WaitForStateChange and connectivity.Ready.
Handle the ignored errors explicitly, at minimum logging them in test context for debugging.
🧰 Tools
🪛 golangci-lint (2.12.2)
[error] 112-112: net.Listen must not be called. use (*net.ListenConfig).Listen
(noctx)
[error] 125-125: SA1019: grpc.DialContext is deprecated: use NewClient instead. Will be supported throughout 1.x.
(staticcheck)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@pkg/group_snapshotter/group_snapshotter_test.go` around lines 112 - 135, In
the startFakeCSI function, replace the deprecated grpc.DialContext call with
grpc.NewClient and update the connection establishment logic to use explicit
state management with WaitForStateChange and connectivity.Ready instead of
relying on context timeouts for blocking behavior, since grpc.NewClient does not
accept a context parameter for dial timeouts. Additionally, replace all ignored
error returns (currently marked with underscore assignment) including the
srv.Serve(lis) goroutine error, the lis.Close() errors in both the error path
and cleanup function, and conn.Close() and srv.Stop() errors in the cleanup
function by logging them at minimum in the test context (using t.Logf or
similar) to meet the coding guideline that error returns must never be ignored.
Sources: Coding guidelines, Linters/SAST tools
| contentCopy := test.content.DeepCopy() | ||
| client := fake.NewSimpleClientset(contentCopy) | ||
| store := cache.NewStore(cache.DeletionHandlingMetaNamespaceKeyFunc) | ||
| _ = store.Add(contentCopy) |
There was a problem hiding this comment.
Do not discard test setup errors from Add(...) operations.
Several setup calls ignore returned errors via _ = ...Add(...), which can silently leave fixtures in an invalid state. Please assert these errors with t.Fatalf in setup paths.
As per coding guidelines, **/*.go requires never ignoring error returns.
Also applies to: 743-743, 766-766, 867-867, 1120-1120, 1414-1417
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@pkg/sidecar-controller/groupsnapshot_controller_test.go` at line 444, The
test setup code is discarding errors from store.Add(...) operations using blank
identifier assignments, which can leave test fixtures in invalid states. For
each occurrence of `_ = store.Add(...)` used during test fixture setup, replace
the blank identifier with proper error handling that checks the returned error
and calls t.Fatalf with a descriptive message if the Add operation fails. This
ensures that any setup failures are immediately caught and reported rather than
silently creating invalid test state.
Source: Coding guidelines
| if creds == nil && tt.wantClass { | ||
| // no secret annotations is valid | ||
| } |
There was a problem hiding this comment.
Remove the empty branch flagged by staticcheck (SA9003).
Line 835 currently has a no-op branch. Remove it or replace it with an explicit assertion so the test intent is enforced.
🧰 Tools
🪛 golangci-lint (2.12.2)
[error] 835-835: SA9003: empty branch
(staticcheck)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@pkg/sidecar-controller/groupsnapshot_controller_test.go` around lines 835 -
837, The if branch checking `creds == nil && tt.wantClass` contains only a
comment with no actual test logic, triggering staticcheck warning SA9003. Remove
this empty conditional block entirely, or replace it with an explicit assertion
that validates the expected behavior when no secret annotations are present
(such as asserting that the operation succeeds or a specific condition is met),
making the test intent clear and enforceable.
Source: Linters/SAST tools
The revert commit 56ba1dc breaks the verify-subtree check because it is a non-merge commit touching release-tools/. Disable verify-subtree until fixed in csi-release-tools (kubernetes-csi/csi-release-tools#305).
2e8d108 to
4426930
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@Makefile`:
- Around line 21-24: The test-subtree target is currently disabled and only
echoes "skipped", which removes all subtree integrity enforcement for the
release-tools directory. Replace the echo command in the test-subtree target
with the actual subtree check command that validates the release-tools subtree
has not been modified with non-upstream edits. This will restore the guard that
detects unintended subtree drift.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 11067dfa-b2d2-4aee-ba09-ae4a35aea2fb
📒 Files selected for processing (1)
Makefile
| # UPSTREAM: <carry>: disable test-subtree | ||
| .PHONY: test-subtree | ||
| test-subtree: | ||
| @ echo "### $@: skipped" |
There was a problem hiding this comment.
test-subtree is fully disabled, removing subtree-integrity enforcement.
On Line 24, the target now only prints “skipped”, so the release-tools subtree check never runs. That drops the guard that detects non-upstream edits in release-tools, which can let unintended subtree drift merge unnoticed.
Suggested fix
# UPSTREAM: <carry>: disable test-subtree
.PHONY: test-subtree
test-subtree:
- @ echo "### $@: skipped"
+ @ echo; echo "### $@:"
+ ./release-tools/verify-subtree.sh release-tools🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@Makefile` around lines 21 - 24, The test-subtree target is currently disabled
and only echoes "skipped", which removes all subtree integrity enforcement for
the release-tools directory. Replace the echo command in the test-subtree target
with the actual subtree check command that validates the release-tools subtree
has not been modified with non-upstream edits. This will restore the guard that
detects unintended subtree drift.
|
/test e2e-vsphere |
|
@rvagner78: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions 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. I understand the commands that are listed here. |
|
/retitle STOR-3004 Rebase external-snapshotter to v8.6.0 |
|
this must follow our rebase process, esp. merge the upstream v8.6.0 tag with |
|
The revert of revert doesn't seem to be a good strategy. |
This reverts commit 56ba1dc, which reverted the original v8.6.0 rebase (PR #219).
The original revert was caused by a VolumeGroupSnapshot CRD API version incompatibility that triggered crash-loop restarts in HyperShift hosted clusters.
That incompatibility is now fixed, making it safe to re-land the v8.6.0 rebase.
Summary by CodeRabbit
New Features
Bug Fixes
Documentation