Skip to content

Commit

Permalink
add TODOs with issues
Browse files Browse the repository at this point in the history
  • Loading branch information
LiorLieberman committed Jan 10, 2025
1 parent 63803d9 commit d74a070
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
14 changes: 6 additions & 8 deletions conformance/tests/httproute-request-percentage-mirror.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand All @@ -82,7 +84,7 @@ var HTTPRouteRequestPercentageMirror = suite.ConformanceTest{
Name: "infra-backend-v2",
Namespace: ns,
},
Percent: ptrTo(int32(20)),
Percent: ptr.To(int32(20)),
},
},
}, {
Expand All @@ -100,7 +102,7 @@ var HTTPRouteRequestPercentageMirror = suite.ConformanceTest{
Name: "infra-backend-v2",
Namespace: ns,
},
Percent: ptrTo(int32(50)),
Percent: ptr.To(int32(50)),
},
},
}, {
Expand Down Expand Up @@ -130,7 +132,7 @@ var HTTPRouteRequestPercentageMirror = suite.ConformanceTest{
Name: "infra-backend-v2",
Namespace: ns,
},
Percent: ptrTo(int32(35)),
Percent: ptr.To(int32(35)),
},
},
},
Expand Down Expand Up @@ -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
}
3 changes: 2 additions & 1 deletion geps/gep-3171/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Enable percentage-based request mirroring with Gateway and Gateway for mesh APIs

## Scope

<!-- TODO(https://github.com/kubernetes-sigs/gateway-api/issues/3514) Add GRPCRoute supportedFeatures and coverage -->
The scope of this GEP is to add support for this feature in both HTTPRoute and GRPCRoute

## Introduction
Expand Down Expand Up @@ -211,4 +212,4 @@ spec:

A new Supported Feature with the following name SupportHTTPRouteRequestPercentageMirror is introduced along with a corresponding conformance test.

<!-- TODO(liorlieberman) Different supportedFeature for mesh> -->
<!-- TODO(https://github.com/kubernetes-sigs/gateway-api/issues/3515) Different supportedFeature for mesh> -->
2 changes: 1 addition & 1 deletion pkg/features/httproute.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down

0 comments on commit d74a070

Please sign in to comment.