fix(clone): honor request CSI mount config over checkpoint annotation#641
Conversation
During clone, the csi-volume-config annotation restored from the checkpoint could shadow a request-supplied CSI mount config. For agent-identity OSS mounts this dropped the credentialProviderName attribute, so sandboxCredProviderName was never injected and ossfs rejected the mount. Persist the request-supplied config as raw JSON in createSandboxWithClone and override the checkpoint-restored csi-volume-config annotation with it in prepareSandboxFromCheckpoint when present. Behavior is unchanged when the request carries no CSI mount config. Add table-driven coverage in TestPrepareSandboxFromCheckpoint_CSIMountConfigPrecedence. Signed-off-by: 基成 <jicheng.sk@alibaba-inc.com>
|
[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❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #641 +/- ##
==========================================
- Coverage 80.08% 80.02% -0.07%
==========================================
Files 229 229
Lines 17831 17839 +8
==========================================
- Hits 14280 14275 -5
- Misses 2969 2978 +9
- Partials 582 586 +4
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:
|
During clone, the csi-volume-config annotation restored from the checkpoint could shadow a request-supplied CSI mount config. For agent-identity OSS mounts this dropped the credentialProviderName attribute, so sandboxCredProviderName was never injected and ossfs rejected the mount.
Persist the request-supplied config as raw JSON in createSandboxWithClone and override the checkpoint-restored csi-volume-config annotation with it in prepareSandboxFromCheckpoint when present. Behavior is unchanged when the request carries no CSI mount config.
Add table-driven coverage in TestPrepareSandboxFromCheckpoint_CSIMountConfigPrecedence.
Ⅰ. Describe what this PR does
Ⅱ. Does this pull request fix one issue?
Ⅲ. Describe how to verify it
Ⅳ. Special notes for reviews