fix(storage-cli): avoid copying CSI publish requests - #907
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #907 +/- ##
==========================================
- Coverage 82.94% 82.93% -0.01%
==========================================
Files 259 259
Lines 22403 22403
==========================================
- Hits 18582 18580 -2
- Misses 3113 3115 +2
Partials 708 708
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Signed-off-by: Mridankan Mandal <xerontitan90@gmail.com>
15cbb0c to
6c51062
Compare
Description:
Avoid copying
csi.NodePublishVolumeRequestthrough the storage CLI mount path.Before this change,
runMount,validateGeneralParams,Provider.Validate,Provider.Mount, andRunNodePublishVolumepassedcsi.NodePublishVolumeRequestby value. Aftergithub.com/container-storage-interface/specmoved tov1.13.0, the regenerated protobuf embeddedprotoimpl.MessageState, so those copies started trippinggo vetcopylocks diagnostics and mademake vetfail onmain.This PR switches that request plumbing to
*csi.NodePublishVolumeRequestand updates the affected tests and fakes to match. Runtime behavior stays the same, but the storage CLI path no longer violates the protobuf no-copy contract. Fixes #905.Validation Tests run:
GOTOOLCHAIN=go1.25.9 go test ./pkg/agent-runtime/storage-cli/... -count=1GOTOOLCHAIN=go1.25.9 go vet ./pkg/agent-runtime/storage-cli/...GOTOOLCHAIN=go1.25.9 go vet ./...GOTOOLCHAIN=go1.25.9 make vetNotes:
go vet.