Skip to content

fix(clone): honor request CSI mount config over checkpoint annotation#641

Merged
furykerry merged 1 commit into
openkruise:masterfrom
BH4AWS:feat/checkpoint_csi_mount_opt
Jul 13, 2026
Merged

fix(clone): honor request CSI mount config over checkpoint annotation#641
furykerry merged 1 commit into
openkruise:masterfrom
BH4AWS:feat/checkpoint_csi_mount_opt

Conversation

@BH4AWS

@BH4AWS BH4AWS commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

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

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>
@kruise-bot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign furykerry for approval by writing /assign @furykerry in a comment. For more information see:The Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@codecov

codecov Bot commented Jul 13, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 60.00000% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.02%. Comparing base (e549e5b) to head (ffad45e).

Files with missing lines Patch % Lines
pkg/servers/e2b/create.go 50.00% 3 Missing and 1 partial ⚠️
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     
Flag Coverage Δ
unittests 80.02% <60.00%> (-0.07%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@furykerry
furykerry merged commit ab4f2c6 into openkruise:master Jul 13, 2026
19 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants