Skip to content

Implement CSI e2e test for MutableCSINodeAllocatableCount #130942

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 12, 2025

Conversation

torredil
Copy link
Member

@torredil torredil commented Mar 20, 2025

What type of PR is this?

/kind feature

Test

What this PR does / why we need it:

This PR implements an e2e test for a new alpha storage feature MutableCSINodeAllocatableCount.

Special notes for your reviewer:

Does this PR introduce a user-facing change?

NONE

Ran test locally:

make WHAT=test/e2e/e2e.test && _output/bin/e2e.test --ginkgo.focus="MutableCSINodeAllocatableCount.*should.observe.dynamic.changes" --provider=local --kubeconfig=$HOME/.kube/config --ginkgo.v -v=4
  I0320 00:30:25.998557 10826 mutable_csinode_allocatable.go:71] Initial allocatable count: 5
  STEP: Polling until value changes @ 03/20/25 00:30:25.998
  I0320 00:30:26.065996 10826 mutable_csinode_allocatable.go:80] Current allocatable count: 5
  I0320 00:30:36.070110 10826 mutable_csinode_allocatable.go:80] Current allocatable count: 8
  I0320 00:30:36.070155 10826 mutable_csinode_allocatable.go:82] Detected change in allocatable count from 5 to 8
  I0320 00:30:36.070179 10826 mutable_csinode_allocatable.go:88] Successfully verified that CSINode allocatable count was updated
Ran 1 of 6708 Specs in 31.919 seconds
SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 6707 Skipped
PASS

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Mar 20, 2025
@k8s-ci-robot
Copy link
Contributor

This issue is currently awaiting triage.

If a SIG or subproject determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

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 the needs-priority Indicates a PR lacks a `priority/foo` label and requires one. label Mar 20, 2025
@k8s-ci-robot k8s-ci-robot added area/test sig/storage Categorizes an issue or PR as relevant to SIG Storage. sig/testing Categorizes an issue or PR as relevant to SIG Testing. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Mar 20, 2025
@torredil torredil force-pushed the storage-e2e-51231 branch from 860b87c to 88a3c00 Compare March 20, 2025 14:33
@torredil
Copy link
Member Author

/test pull-kubernetes-e2e-kind-alpha-beta-features

@torredil
Copy link
Member Author

Exercised new test in pull-kubernetes-e2e-kind-alpha-beta-features:

Kubernetes e2e suite: [It] [sig-storage] MutableCSINodeAllocatableCount [FeatureGate:MutableCSINodeAllocatableCount] [Alpha] [Feature:OffByDefault] should observe dynamic changes in CSINode allocatable count | 25s

cc: @gnufied

@dims
Copy link
Member

dims commented Apr 30, 2025

/kind feature

@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. and removed do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. labels Apr 30, 2025
@dims
Copy link
Member

dims commented Apr 30, 2025

/assign @msau42 @xing-yang

@gnufied
Copy link
Member

gnufied commented May 1, 2025

/assign

@gnufied
Copy link
Member

gnufied commented May 2, 2025

So, now that I think of - this should be implemented in mock driver testsuite - https://github.com/kubernetes/kubernetes/tree/master/test/e2e/storage/csimock and you don't probably have to make any changes in hostpath driver code at all, because you can implement hooks in https://github.com/kubernetes/kubernetes/blob/master/test/e2e/storage/csimock/csi_volume_expansion.go#L655 which will intercept NodeGetInfo RPC call and return response you expect.

The reason, we don't want this testsuite at top level is because, tbh - this will not work for any other provider other than hostpath.

@torredil
Copy link
Member Author

torredil commented May 2, 2025

Thank you @gnufied, that makes sense. I'll take a closer look at the mock driver test suite and do the needful, that approach sounds more ideal.

@gnufied
Copy link
Member

gnufied commented Jun 12, 2025

Lets merge this for now, we will have to refactor this with rest of the mock tests though.

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 12, 2025
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 0a780607b01797586e91936fbc3cbd77c7398886

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gnufied, torredil

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

The pull request process is described here

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 Jun 12, 2025
@k8s-ci-robot k8s-ci-robot merged commit d50a187 into kubernetes:master Jun 12, 2025
19 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.34 milestone Jun 12, 2025
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. area/test cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. release-note-none Denotes a PR that doesn't merit a release note. sig/storage Categorizes an issue or PR as relevant to SIG Storage. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants