Skip to content
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

[YUNIKORN-3016] Cleanup cluster resources after persistent_volume e2e test failed #947

Closed
wants to merge 3 commits into from

Conversation

kaichiachen
Copy link
Contributor

What is this PR for?

In the e2e test persistent_volume_test.go, the test case Verify_dynamic_binding_with_nfs_server may leave behind cluster resources (e.g., StorageClasses, ClusterRoles, Deployments, etc.) when the test fails. These resources could cause subsequent tests using the same namespace to encounter unexpected errors.

What type of PR is it?

  • - Bug Fix
  • - Improvement
  • - Feature
  • - Documentation
  • - Hot Fix
  • - Refactoring

Todos

  • - Task

What is the Jira issue?

https://issues.apache.org/jira/browse/YUNIKORN-3016

How should this be tested?

  1. Inject an error to the end of testcase "Verify_dynamic_binding_with_nfs_server" in persistent_volume_test
  2. Run e2e test, verify resources are all cleaned up
#> kubectl get clusterrolebindings nfs-cluster-role-binding -n dev-hkp8i
Error from server (NotFound): clusterrolebindings.rbac.authorization.k8s.io "nfs-cluster-role-binding" not found
#> kubectl get ClusterRole nfs-cluster-role -n dev-hkp8i          
Error from server (NotFound): clusterroles.rbac.authorization.k8s.io "nfs-cluster-role" not found
#> kubectl get storageclasses nfs-sc -n dev-hkp8i                  
Error from server (NotFound): storageclasses.storage.k8s.io "nfs-sc" not found
#> kubectl get serviceaccount nfs-service-account -n dev-hkp8i          
Error from server (NotFound): serviceaccounts "nfs-service-account" not found
#> kubectl get deployment nfs-provisioner -n dev-hkp8i             
Error from server (NotFound): deployments.apps "nfs-provisioner" not found

Screenshots (if appropriate)

Questions:

  • - The licenses files need update.
  • - There is breaking changes for older versions.
  • - It needs documentation.

Copy link
Contributor

@ryankert01 ryankert01 left a comment

Choose a reason for hiding this comment

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

Thank you for you patch! Having a simple question.

Copy link
Contributor

@ryankert01 ryankert01 left a comment

Choose a reason for hiding this comment

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

Thanks for your prompt reply.
Overall LGTM to me, only a small thing left.

Copy link

codecov bot commented Jan 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 68.04%. Comparing base (a53123f) to head (761b905).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #947      +/-   ##
==========================================
+ Coverage   67.99%   68.04%   +0.05%     
==========================================
  Files          70       70              
  Lines        9195     9195              
==========================================
+ Hits         6252     6257       +5     
+ Misses       2735     2731       -4     
+ Partials      208      207       -1     

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

@chenyulin0719
Copy link
Contributor

+1 LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants