-
Notifications
You must be signed in to change notification settings - Fork 698
[no-relnote] Update E2E test suite #1242
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
base: main
Are you sure you want to change the base?
Conversation
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.
Pull Request Overview
This PR modernizes the NVIDIA Kubernetes Device Plugin’s E2E test framework by upgrading to Ginkgo v2, updating CI workflows, and adjusting file structure and licensing information.
- Migrates tests from legacy framework patterns to Ginkgo v2 constructs
- Updates CI workflow to use environment variables and a dedicated Makefile target
- Removes deprecated utility files and refactors test helpers for consistency
Reviewed Changes
Copilot reviewed 405 out of 407 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
tests/e2e/utils.go | Updated license headers and refactored helper functions with adjusted timeouts |
tests/e2e/infra/aws.yaml | Modified configuration for helm chart deployments and toolkit settings |
tests/e2e/gpu-feature-discovery_test.go | Migration to Ginkgo v2 and changes to use environment variables and updated client references |
tests/e2e/e2e_test.go | Overhauled test entry point to use environment variables and new helper functions |
tests/e2e/device-plugin_test.go | Refactored test structure and naming for Helm release names and client usage |
tests/e2e/cleanup_test.go | Consolidated cleanup functions for node, resource, and CRD removal |
tests/e2e/README.md | Added comprehensive documentation for running and configuring the E2E suite |
.github/workflows/e2e.yaml | Updated workflow steps to use a Makefile in the E2E directory and improved artifact handling |
Files not reviewed (2)
- tests/e2e/Makefile: Language not supported
- tests/go.mod: Language not supported
Comments suppressed due to low confidence (3)
tests/e2e/device-plugin_test.go:80
- [nitpick] Switching to randomSuffix() for generating helmReleaseName improves uniqueness; consider updating any accompanying comments or documentation to reflect this change in naming strategy.
helmReleaseName = "nvdp-e2e-test-" + randomSuffix()
.github/workflows/e2e.yaml:66
- [nitpick] The workflow now explicitly references a Makefile in the tests/e2e directory; verify that this path remains accurate and that all necessary targets are defined in the referenced Makefile.
make -f tests/e2e/Makefile test-e2e
tests/e2e/utils.go:45
- The timeout for eventuallyNonControlPlaneNodes has been increased from 10 seconds to 1 minute; please confirm that this longer duration aligns with the overall test responsiveness and cluster performance expectations.
}).WithPolling(1 * time.Second).WithTimeout(1 * time.Minute).WithContext(ctx)
9037244
to
2c5aadd
Compare
tests/e2e/infra/aws.yaml
Outdated
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.
Is the reason for this change just consistency with the DRA driver?
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.
yes, I am now working to bring more consistency across all the repos we manage
Signed-off-by: Carlos Eduardo Arango Gutierrez <[email protected]>
Signed-off-by: Carlos Eduardo Arango Gutierrez <[email protected]>
Signed-off-by: Carlos Eduardo Arango Gutierrez <[email protected]>
Signed-off-by: Carlos Eduardo Arango Gutierrez <[email protected]>
2c5aadd
to
047d5f4
Compare
b508d98
to
4937906
Compare
Signed-off-by: Carlos Eduardo Arango Gutierrez <[email protected]>
4937906
to
60a5ecf
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.
Pull Request Overview
This pull request modernizes the E2E test framework by migrating to Ginkgo v2, reorganizing test files, updating CI workflows, and refreshing licensing and documentation. Key changes include the restructuring and renaming of test files (e.g. renaming common/kubernetes.go to cleanup_test.go), enhancement of CI configurations (e.g. new Makefile target and Slack payload update), and removal of obsolete utilities.
Reviewed Changes
Copilot reviewed 406 out of 408 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
tests/e2e/infra/aws.yaml | Adjusted configuration ordering and added new keys for CDI enablement. |
tests/e2e/gpu-feature-discovery_test.go | Migrated test syntax and variable usage to align with Ginkgo v2 conventions. |
tests/e2e/device-plugin_test.go | Updated Helm chart installation and job creation logic. |
tests/e2e/cleanup_test.go | Refactored cleanup functions; moved functions from package common to e2e. |
tests/e2e/README.md | Added comprehensive usage and troubleshooting documentation. |
.github/workflows/e2e.yaml | Updated environment variables, Makefile target, and Slack notification steps. |
Files not reviewed (2)
- tests/e2e/Makefile: Language not supported
- tests/go.mod: Language not supported
Comments suppressed due to low confidence (3)
tests/e2e/cleanup_test.go:267
- The 'ctx' variable is used in the cleanupNodeFeatureRules function without being defined. Consider passing a context parameter to this function to correctly scope API calls.
nfrs, err := cli.NfdV1alpha1().NodeFeatureRules().List(ctx, metav1.ListOptions{})
tests/e2e/cleanup_test.go:69
- The variable 'ctx' is used in the cleanupTestPods function without being defined or passed as an argument. Consider either passing a context parameter or declaring 'ctx' locally.
podList, err := clientSet.CoreV1().Pods(namespace).List(ctx, metav1.ListOptions{
tests/e2e/cleanup_test.go:114
- The variable 'ctx' is used without being defined in this cleanup helper. Ensure that a valid context is passed to this function or declared within its scope to avoid runtime errors.
err := clientSet.CoreV1().Namespaces().Delete(ctx, testNamespace.Name, metav1.DeleteOptions{})
Thanks for the review and approval @tariq1890 , any additional comments @elezar ? |
Now that we have merged the PR in CTK can we do a final round here @elezar |
This pull request introduces significant updates to the end-to-end (E2E) testing framework for the NVIDIA Kubernetes Device Plugin. The changes include enhancements to the CI workflow, a migration to the Ginkgo v2 testing framework, restructuring of test-related files, and updates to licensing information. Below is a categorized summary of the most important changes:
Workflow and CI Updates:
HELM_CHART
environment variable to the E2E CI workflow (.github/workflows/e2e.yaml
) and updated themake
command to use a specific Makefile for E2E tests. This improves configurability and aligns the workflow with the new test structure.Migration to Ginkgo v2:
Makefile
to include aginkgo
target for installing the Ginkgo v2 CLI and a newtest-e2e
target for running tests with Ginkgo. This replaces the previous custom test logic.common/kubernetes.go
tocleanup_test.go
and removing redundant utility functions. [1] [2]Documentation Enhancements:
README.md
for the E2E test suite, detailing prerequisites, environment variables, execution flow, and troubleshooting steps. This improves developer onboarding and test maintainability.Licensing and Copyright:
Codebase Simplification:
gpu_job.go
andtaints.go
, consolidating functionality into more focused test files. This reduces redundancy and simplifies the codebase. [1] [2]These changes collectively modernize the testing framework, improve CI integration, and enhance developer experience.