Skip to content

Conversation

@sheidkamp
Copy link
Contributor

Description

Change Type

Changelog


Additional Notes

Copilot AI review requested due to automatic review settings October 31, 2025 15:18
@github-actions github-actions bot added do-not-merge/kind-invalid Indicates a PR lacks a `kind/foo` label and requires one. do-not-merge/release-note-invalid Indicates that a PR should not merge because it's missing one of the release note labels. labels Oct 31, 2025
Copy link
Contributor

Copilot AI left a 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 MinGwApiVersion and MaxGwApiVersion constraints for test cases and suites
  • Added SetupByVersion to 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.
Copy link

Copilot AI Oct 31, 2025

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'.

Copilot uses AI. Check for mistakes.
Comment on lines +40 to 44
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...),
}
Copy link

Copilot AI Oct 31, 2025

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.

Copilot uses AI. Check for mistakes.
This reverts commit a10b7ac.

Signed-off-by: sheidkamp <[email protected]>
Signed-off-by: sheidkamp <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge/kind-invalid Indicates a PR lacks a `kind/foo` label and requires one. do-not-merge/release-note-invalid Indicates that a PR should not merge because it's missing one of the release note labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant