-
Notifications
You must be signed in to change notification settings - Fork 596
[wip] Using in downstream, want to validate #12795
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?
[wip] Using in downstream, want to validate #12795
Conversation
Signed-off-by: sheidkamp <[email protected]>
Signed-off-by: sheidkamp <[email protected]>
Signed-off-by: sheidkamp <[email protected]>
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 implements support for running E2E tests against different versions and channels of the Gateway API. The implementation allows tests to specify minimum and maximum version requirements per channel (standard/experimental), enabling conditional test execution based on the installed Gateway API version. Tests that require features unavailable in certain versions are automatically skipped.
Key changes:
- Added version detection mechanism using CRD annotations to identify Gateway API version and channel
- Introduced
MinGwApiVersionandMaxGwApiVersionconstraints for test cases and suites - Added
SetupByVersionto allow different suite setups based on Gateway API version/channel - Updated multiple test suites to properly handle version-specific features (ListenerSets, BackendTLSPolicy, TCPRoute, etc.)
Reviewed Changes
Copilot reviewed 50 out of 50 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| test/e2e/tests/base/base_suite.go | Core infrastructure for version detection, version checking logic, and conditional test execution |
| test/testutils/file_loader.go | Added defaultNamespace parameter to support namespace detection from kubectl context |
| test/e2e/features/*/types.go | Updated test case definitions with version requirements |
| test/e2e/features/*/suite.go | Migrated suites to use BaseTestingSuite with version constraints |
| .github/workflows/nightly-tests.yaml | Added nightly test matrix for different Gateway API versions |
| go.mod | Changed semver dependency from indirect to direct |
| pkg/utils/kubeutils/kubectl/cli.go | Added GetDefaultNamespace method |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| kubeGatewaySuiteRunner.Register("HTTPRouteServices", httproute.NewTestingSuite) | ||
| kubeGatewaySuiteRunner.Register("HttpListenerPolicy", http_listener_policy.NewTestingSuite) | ||
| kubeGatewaySuiteRunner.Register("Lambda", lambda.NewTestingSuite) | ||
| // TODO: Uncomment before merging. THis test always fails loacally/in the fork. |
Copilot
AI
Oct 31, 2025
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.
Corrected spelling of 'loacally' to 'locally' and 'THis' to 'This'.
| commonSetupManifests = []string{defaults.HttpbinManifest, defaults.CurlPodManifest} | ||
| // Base test setup - common infrastructure for all tests | ||
| setup = base.TestCase{ | ||
| Manifests: []string{setupManifest, defaults.HttpbinManifest, defaults.CurlPodManifest}, | ||
| Manifests: append([]string{setupManifest}, commonSetupManifests...), | ||
| } |
Copilot
AI
Oct 31, 2025
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.
[nitpick] The variable commonSetupManifests is defined but only used once in the setup TestCase initialization. Consider either inlining it or using it in the other test case at line 48 where rbacManifestWithSections is specified to maintain consistency.
This reverts commit a10b7ac. Signed-off-by: sheidkamp <[email protected]>
Signed-off-by: sheidkamp <[email protected]>
Description
Change Type
Changelog
Additional Notes