diff --git a/conformance/tests/httproute-request-percentage-mirror.go b/conformance/tests/httproute-request-percentage-mirror.go index f557b61924..22b49d5a49 100644 --- a/conformance/tests/httproute-request-percentage-mirror.go +++ b/conformance/tests/httproute-request-percentage-mirror.go @@ -27,6 +27,7 @@ import ( "github.com/stretchr/testify/require" "k8s.io/apimachinery/pkg/types" + "k8s.io/utils/ptr" "sigs.k8s.io/gateway-api/conformance/utils/config" "sigs.k8s.io/gateway-api/conformance/utils/http" "sigs.k8s.io/gateway-api/conformance/utils/kubernetes" @@ -54,8 +55,9 @@ var HTTPRouteRequestPercentageMirror = suite.ConformanceTest{ Features: []features.FeatureName{ features.SupportGateway, features.SupportHTTPRoute, - // features.SupportHTTPRouteRequestPercentageMirror, + features.SupportHTTPRouteRequestPercentageMirror, }, + Provisional: true, Test: func(t *testing.T, suite *suite.ConformanceTestSuite) { var ( ns = "gateway-conformance-infra" @@ -82,7 +84,7 @@ var HTTPRouteRequestPercentageMirror = suite.ConformanceTest{ Name: "infra-backend-v2", Namespace: ns, }, - Percent: ptrTo(int32(20)), + Percent: ptr.To(int32(20)), }, }, }, { @@ -100,7 +102,7 @@ var HTTPRouteRequestPercentageMirror = suite.ConformanceTest{ Name: "infra-backend-v2", Namespace: ns, }, - Percent: ptrTo(int32(50)), + Percent: ptr.To(int32(50)), }, }, }, { @@ -130,7 +132,7 @@ var HTTPRouteRequestPercentageMirror = suite.ConformanceTest{ Name: "infra-backend-v2", Namespace: ns, }, - Percent: ptrTo(int32(35)), + Percent: ptr.To(int32(35)), }, }, }, @@ -230,7 +232,3 @@ func testMirroredRequestsDistribution(t *testing.T, suite *suite.ConformanceTest tlog.Log(t, "Validated mirrored request logs across all desired backends within the given tolerance") return nil } - -func ptrTo[T any](a T) *T { - return &a -} diff --git a/geps/gep-3171/index.md b/geps/gep-3171/index.md index fcfd8bafb4..fbf21c4c3c 100644 --- a/geps/gep-3171/index.md +++ b/geps/gep-3171/index.md @@ -15,6 +15,7 @@ Enable percentage-based request mirroring with Gateway and Gateway for mesh APIs ## Scope + The scope of this GEP is to add support for this feature in both HTTPRoute and GRPCRoute ## Introduction @@ -211,4 +212,4 @@ spec: A new Supported Feature with the following name SupportHTTPRouteRequestPercentageMirror is introduced along with a corresponding conformance test. - + diff --git a/pkg/features/httproute.go b/pkg/features/httproute.go index ad79d04616..cd7d90ec5b 100644 --- a/pkg/features/httproute.go +++ b/pkg/features/httproute.go @@ -163,7 +163,7 @@ var ( // HTTPRouteRequestPercentageMirrorFeature contains metadata for the HTTPRouteRequestMultipleMirrors feature. HTTPRouteRequestPercentageMirrorFeature = Feature{ Name: SupportHTTPRouteRequestPercentageMirror, - Channel: FeatureChannelStandard, + Channel: FeatureChannelExperimental, } // HTTPRouteRequestTimeoutFeature contains metadata for the HTTPRouteRequestTimeout feature. HTTPRouteRequestTimeoutFeature = Feature{