-
Couldn't load subscription status.
- Fork 580
e2e: test for PVC with volumeBindingMode on helm installation #5243
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
Conversation
|
/test ci/centos/mini-e2e-operator/k8s-1.31 |
|
/test ci/centos/mini-e2e-helm/k8s-1.31 |
f578c07 to
cfd8f7b
Compare
|
/test ci/centos/mini-e2e-helm/k8s-1.31 |
|
/test ci/centos/mini-e2e-helm/k8s-1.30 |
cfd8f7b to
b777b4c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks quite complete, just added some general notes and suggestions for improving.
e2e/cephfs.go
Outdated
| } | ||
| }) | ||
|
|
||
| By("verify PVC with volumeBindingMode on helm installation", func() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What makes this special or unique for a Helm installation? This probably runs on non-Helm installations too? And, it should work on non-Helm installations as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test was added as a follow-up to PR #5126, which introduced changes to the CephFS charts. However, since the functionality should also be compatible with non-Helm installations, the test has been moved out of helmTest.
e2e/cephfs_helper.go
Outdated
| return createStorageClass(c, sc) | ||
| } | ||
|
|
||
| func updateStorageClassParameters(sc *scv1.StorageClass, params map[string]string, enablePool bool, f *framework.Framework) (*scv1.StorageClass, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why return the StorageClass? The passed sc is updated, just as the function name indicates. The returned sc is not new (or a copy). Just return an error only to prevent any confusion.
| if isRetryableAPIError(err) { | ||
| return false, nil | ||
| } | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here, an in other places, you removed an empty line before return. The coding style in Ceph-CSI (and golangci-lint?) expects these. Please add them back.
e2e/utils.go
Outdated
| return err | ||
| } | ||
|
|
||
| //verifies that the pvc is in pending state |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comments are mostly written with a space after //.
This comment here does not add much value, the function is pretty much self explaining. It would be better to add a comment above the function itself, which explains that validatePVCAndAppWaitForFirstConsumer 1st waits for pending, then starts an app and then makes sure the claim is bound.
e2e/utils.go
Outdated
| return wait.PollUntilContextTimeout(context.TODO(), poll, timeout, true, func(ctx context.Context) (bool, error) { | ||
| pvc, err := c.CoreV1().PersistentVolumeClaims(namespace).Get(context.TODO(), name, metav1.GetOptions{}) | ||
| if err != nil { | ||
| return false, fmt.Errorf("error fetching PVC %s: %w", name, err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I have a preference to use %q for names of objects, instead of %s. It reads nicer when variables in error and log messages are quoted.
b777b4c to
2662ef9
Compare
|
/test ci/centos/mini-e2e/k8s-1.30 |
2662ef9 to
4eb795e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we add the same for RBD as well (a follow up).
4eb795e to
771b690
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. can you please add the same for RBD and NFS if its not present in follow up PR.
771b690 to
3823b42
Compare
|
@Mergifyio queue |
🛑 The pull request has been removed from the queue
|
|
This pull request has been removed from the queue for the following reason: The pull request can't be updated. You should update or rebase your pull request manually. If you do, this pull request will automatically be requeued once the queue conditions match again. |
Test PVC binding with WaitForFirstConsumer in Helm installation. Signed-off-by: ShravaniVangur <[email protected]>
3823b42 to
00505e4
Compare
Pull request has been modified.
|
@Mergifyio queue |
1 similar comment
|
@Mergifyio queue |
✅ The pull request has been merged automaticallyThe pull request has been merged automatically at c19f472 |
|
/test ci/centos/k8s-e2e-external-storage/1.30 |
|
/test ci/centos/mini-e2e-helm/k8s-1.30 |
|
/test ci/centos/upgrade-tests-cephfs |
|
/test ci/centos/mini-e2e/k8s-1.30 |
|
/test ci/centos/upgrade-tests-rbd |
|
/test ci/centos/k8s-e2e-external-storage/1.31 |
|
/test ci/centos/k8s-e2e-external-storage/1.32 |
|
/test ci/centos/mini-e2e-helm/k8s-1.31 |
|
/test ci/centos/mini-e2e/k8s-1.31 |
|
/test ci/centos/mini-e2e-helm/k8s-1.32 |
|
/test ci/centos/mini-e2e/k8s-1.32 |
|
This pull request has been removed from the queue for the following reason: The pull request can't be updated. You should update or rebase your pull request manually. If you do, this pull request will automatically be requeued once the queue conditions match again. |
Describe what this PR does
Test PVC binding with WaitForFirstConsumer in Helm installation.
Is there anything that requires special attention
Do you have any questions?
Is the change backward compatible?
Are there concerns around backward compatibility?
Provide any external context for the change, if any.
For example:
Related issues
Mention any github issues relevant to this PR. Adding below line
will help to auto close the issue once the PR is merged.
Fixes: #5127
Future concerns
List items that are not part of the PR and do not impact it's
functionality, but are work items that can be taken up subsequently.
Checklist:
guidelines in the developer
guide.
Request
notes
updated with breaking and/or notable changes for the next major release.
Show available bot commands
These commands are normally not required, but in case of issues, leave any of
the following bot commands in an otherwise empty comment in this PR:
/retest ci/centos/<job-name>: retest the<job-name>after unrelatedfailure (please report the failure too!)