Skip to content

Add tests for ROX mode during Node Stage #1215

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 6 commits into from
May 31, 2023

Conversation

judemars
Copy link
Contributor

@judemars judemars commented May 2, 2023

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespaces from that line:

/kind api-change

/kind bug

/kind cleanup
/kind design
/kind documentation
/kind failing-test
/kind feature
/kind flake

What this PR does / why we need it:

This is a follow up to #1088 which does 2 things:

  1. Adds more fine grained testing for whether or not resize is attempted under certain scenarios during node stage.
  2. Skips resize attempt if volume capability from request indicates readonly

Which issue(s) this PR fixes:
Fixes #1088

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

Skips resize attempt if volume capability from request indicates readonly.

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels May 2, 2023
@k8s-ci-robot k8s-ci-robot requested review from amacaskill and leiyiz May 2, 2023 23:51
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label May 2, 2023
@judemars
Copy link
Contributor Author

judemars commented May 2, 2023

/label tide/merge-method-squash

@k8s-ci-robot k8s-ci-robot added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label May 2, 2023
@judemars
Copy link
Contributor Author

judemars commented May 2, 2023

/assign @leiyiz
/assign @RomanBednar
/assign @mattcary

@judemars
Copy link
Contributor Author

judemars commented May 5, 2023

/retest

Copy link
Contributor

@leiyiz leiyiz left a comment

Choose a reason for hiding this comment

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

/approve

@leiyiz
Copy link
Contributor

leiyiz commented May 8, 2023

/retest

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 8, 2023
@leiyiz
Copy link
Contributor

leiyiz commented May 8, 2023

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 8, 2023
@judemars
Copy link
Contributor Author

/retest pull-gcp-compute-persistent-disk-csi-driver-kubernetes-integration

@k8s-ci-robot
Copy link
Contributor

@judemars: The /retest command does not accept any targets.
The following commands are available to trigger required jobs:

  • /test pull-gcp-compute-persistent-disk-csi-driver-e2e
  • /test pull-gcp-compute-persistent-disk-csi-driver-kubernetes-integration
  • /test pull-gcp-compute-persistent-disk-csi-driver-sanity
  • /test pull-gcp-compute-persistent-disk-csi-driver-unit
  • /test pull-gcp-compute-persistent-disk-csi-driver-verify

The following commands are available to trigger optional jobs:

  • /test pull-gcp-compute-persistent-disk-csi-driver-e2e-windows-2019

Use /test all to run the following jobs that were automatically triggered:

  • pull-gcp-compute-persistent-disk-csi-driver-e2e
  • pull-gcp-compute-persistent-disk-csi-driver-kubernetes-integration
  • pull-gcp-compute-persistent-disk-csi-driver-sanity
  • pull-gcp-compute-persistent-disk-csi-driver-unit
  • pull-gcp-compute-persistent-disk-csi-driver-verify

In response to this:

/retest pull-gcp-compute-persistent-disk-csi-driver-kubernetes-integration

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/test-infra repository.

@judemars
Copy link
Contributor Author

/test pull-gcp-compute-persistent-disk-csi-driver-kubernetes-integration

@RomanBednar
Copy link
Contributor

Not related to your PR but recent change to DeviceUtils interface that added DisableDevice method is missing implementation of that method for this struct. So running unit tests on different platform than linux or windows fails:

# sigs.k8s.io/gcp-compute-persistent-disk-csi-driver/pkg/deviceutils
pkg/deviceutils/device-utils.go:96:21: cannot use &deviceUtils{} (value of type *deviceUtils) as type DeviceUtils in variable declaration:
        *deviceUtils does not implement DeviceUtils (missing DisableDevice method)

I think there should be one more file (e.g. device-utils_unsupported.go) with "empty" interface implementation. Example: https://github.com/kubernetes-sigs/ibm-vpc-block-csi-driver/blob/564aa688c069300ef4350fa9d7ec5c841a32a257/vendor/github.com/IBM/ibm-csi-common/pkg/mountmanager/mount_unsupported.go#L52

Even when this is added same issue occurs with utils_*.go:

$ go test -v -run TestNodeStageVolume
# sigs.k8s.io/gcp-compute-persistent-disk-csi-driver/pkg/gce-pd-csi-driver [sigs.k8s.io/gcp-compute-persistent-disk-csi-driver/pkg/gce-pd-csi-driver.test]
./node.go:144:13: undefined: preparePublishPath
./node.go:156:21: undefined: getDevicePath
./node.go:282:21: undefined: getDevicePath
./node.go:296:12: undefined: prepareStagePath
./node.go:321:8: undefined: formatAndMount
./node.go:332:10: undefined: formatAndMount
./node.go:432:16: undefined: getBlockSizeBytes
./node.go:489:21: undefined: getDevicePath
./node.go:518:22: undefined: resizefs.NewResizeFs
./node.go:525:24: undefined: getBlockSizeBytes
.
.
.

Surely adding empty interfaces does not solve much but at least there are meaningful messages like "unsupported platform" instead of compile errors.

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 25, 2023
@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels May 31, 2023
@mattcary
Copy link
Contributor

/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 May 31, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: judemars, leiyiz, mattcary

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 merged commit a4d33b1 into kubernetes-sigs:master May 31, 2023
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. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

read only volumes should not be expanded and we need OSS ROX testing
5 participants