Skip to content

test: add ModifyVolume sanity test with storage account type change#3587

Open
andyzhangx wants to merge 1 commit intokubernetes-sigs:masterfrom
andyzhangx:test/add-modify-volume-sanity-test
Open

test: add ModifyVolume sanity test with storage account type change#3587
andyzhangx wants to merge 1 commit intokubernetes-sigs:masterfrom
andyzhangx:test/add-modify-volume-sanity-test

Conversation

@andyzhangx
Copy link
Copy Markdown
Member

@andyzhangx andyzhangx commented Apr 12, 2026

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

The existing csi-sanity ModifyVolume test runs with empty mutable parameters, making ControllerModifyVolume effectively a no-op. This PR adds a modify-volume-params.yaml with skuName: Premium_LRS and passes --csi.testvolumemutableparameters to csi-sanity, so the ModifyVolume tests exercise the real SKU change code path (ParseDiskParametersNormalizeStorageAccountTypeModifyDiskdiskClient.Patch).

Uses Premium_LRS instead of StandardSSD_LRS since StandardSSD_LRS is the default SKU for CreateVolume, which would result in a no-op.

Which issue(s) this PR fixes:

None

Special notes for your reviewer:

Two files changed:

  • test/sanity/modify-volume-params.yaml — new file with skuName: Premium_LRS
  • test/sanity/run-test.sh — added --csi.testvolumemutableparameters flag

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

@andyzhangx: The label(s) kind/improvement cannot be applied, because the repository doesn't have them.

Details

In response to this:

What type of PR is this?

/kind improvement

What this PR does / why we need it:

Previously the csi-sanity ModifyVolume test ran with empty mutable parameters, making it effectively a no-op. This PR adds a modify-volume-params.yaml with cachingmode: ReadOnly and passes --csi.testvolumemutableparameters to csi-sanity so the ModifyVolume tests exercise the real ControllerModifyVolume code path.

Which issue(s) this PR fixes:

None

How does this PR make you mass produced Tesla mass mass?

It makes me mass mass because sanity tests actually test something now.

Instructions 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.

@k8s-ci-robot k8s-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Apr 12, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andyzhangx

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

The pull request process is described 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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 12, 2026
@andyzhangx andyzhangx force-pushed the test/add-modify-volume-sanity-test branch from a5777d4 to acaa447 Compare April 12, 2026 03:17
@andyzhangx andyzhangx requested a review from Copilot April 12, 2026 03:19
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds CSI sanity coverage for ControllerModifyVolume by supplying non-empty mutable parameters to csi-sanity, aiming to exercise the Azure Disk ModifyVolume code path during sanity runs.

Changes:

  • Add a mutable-parameters YAML file for ModifyVolume sanity tests.
  • Pass --csi.testvolumemutableparameters to csi-sanity in the sanity runner script.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
test/sanity/run-test.sh Adds --csi.testvolumemutableparameters argument when invoking csi-sanity.
test/sanity/modify-volume-params.yaml Introduces mutable parameters (currently skuName: StandardSSD_LRS) for ModifyVolume tests.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread test/sanity/modify-volume-params.yaml Outdated
@@ -0,0 +1 @@
skuName: StandardSSD_LRS
Copy link

Copilot AI Apr 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The chosen mutable parameter skuName: StandardSSD_LRS is the driver’s default SKU when no account type is specified (NormalizeStorageAccountType defaults to StandardSSDLRS). Since csi-sanity CreateVolume in this script does not pass any volume parameters, the test volume will likely already be StandardSSD_LRS, and ModifyDisk will log “no modification needed” without calling diskClient.Patch. To actually exercise the ModifyVolume SKU-change path, use a different target SKU than the CreateVolume default (or also pass a --csi.testvolumeparameters file to create with one SKU and modify to another).

Suggested change
skuName: StandardSSD_LRS
skuName: Premium_LRS

Copilot uses AI. Check for mistakes.
Comment thread test/sanity/modify-volume-params.yaml Outdated
Comment thread test/sanity/run-test.sh
echo 'Begin to run sanity test...'
readonly CSI_SANITY_BIN='csi-sanity'
"$CSI_SANITY_BIN" --ginkgo.v --csi.endpoint="$endpoint" --ginkgo.skip='should work|should fail when volume does not exist on the specified path|should be idempotent|pagination should detect volumes added between pages and accept tokens when the last volume from a page is deleted|should remove target path|should return appropriate capabilities'
"$CSI_SANITY_BIN" --ginkgo.v --csi.endpoint="$endpoint" --csi.testvolumemutableparameters="test/sanity/modify-volume-params.yaml" --ginkgo.skip='should work|should fail when volume does not exist on the specified path|should be idempotent|pagination should detect volumes added between pages and accept tokens when the last volume from a page is deleted|should remove target path|should return appropriate capabilities'
Copy link

Copilot AI Apr 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR title/description mention exercising ModifyVolume with a cachingMode parameter, but the added mutable-parameters file only sets skuName. Either update the mutable-parameters file to include the intended parameter(s) or adjust the PR title/description to match what’s actually being passed to csi-sanity.

Copilot uses AI. Check for mistakes.
Previously the csi-sanity ModifyVolume test ran with empty mutable
parameters, making ControllerModifyVolume effectively a no-op. Add
modify-volume-params.yaml with skuName: Premium_LRS and pass
--csi.testvolumemutableparameters to csi-sanity so ModifyVolume tests
exercise the real SKU change code path (ParseDiskParameters ->
NormalizeStorageAccountType -> ModifyDisk -> diskClient.Patch).

Use Premium_LRS instead of StandardSSD_LRS since StandardSSD_LRS is
the default SKU for CreateVolume, which would result in no-op.
@andyzhangx andyzhangx force-pushed the test/add-modify-volume-sanity-test branch from acaa447 to c21dc98 Compare April 12, 2026 03:25
@andyzhangx andyzhangx changed the title test: add ModifyVolume sanity test with cachingMode parameter test: add ModifyVolume sanity test with storage account type change Apr 12, 2026
@andyzhangx andyzhangx requested a review from Copilot April 12, 2026 03:25
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

@andyzhangx: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-azuredisk-csi-driver-external-e2e-single-az c21dc98 link true /test pull-azuredisk-csi-driver-external-e2e-single-az

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Details

Instructions 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants