Skip to content

Commit

Permalink
PR feedback 1
Browse files Browse the repository at this point in the history
  • Loading branch information
DanStough committed Jul 20, 2023
1 parent 62b1ff5 commit bda5e4c
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 23 deletions.
11 changes: 0 additions & 11 deletions agent/xds/clusters.go
Original file line number Diff line number Diff line change
Expand Up @@ -1041,17 +1041,6 @@ func (s *ResourceGenerator) configIngressUpstreamCluster(c *envoy_cluster_v3.Clu
}
outlierDetection := ToOutlierDetection(cfgSnap.IngressGateway.Defaults.PassiveHealthCheck, override, false)

// I'm fairly certain there is no way to trigger this for ingress gateways.
// Cluster `c` is created from the service `upstream`:
//https://github.com/hashicorp/consul-enterprise/blob/main/agent/xds/clusters.go#L1401-L1403
// But that upstream is never populated in proxycfg
// https://github.com/hashicorp/consul-enterprise/blob/main/agent/proxycfg/ingress_gateway.go#L207-L211
//
//// Special handling for failover peering service, which has set MaxEjectionPercent
//if c.OutlierDetection != nil && c.OutlierDetection.MaxEjectionPercent != nil {
// outlierDetection.MaxEjectionPercent = &wrapperspb.UInt32Value{Value: c.OutlierDetection.MaxEjectionPercent.Value}
//}

c.OutlierDetection = outlierDetection
}

Expand Down
4 changes: 0 additions & 4 deletions agent/xds/clusters_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ type clusterTestCase struct {
name string
create func(t testinf.T) *proxycfg.ConfigSnapshot
overrideGoldenName string
shouldRun bool
}

func uint32ptr(i uint32) *uint32 {
Expand Down Expand Up @@ -909,9 +908,6 @@ func TestClustersFromSnapshot(t *testing.T) {
require.NoError(t, err)
t.Run("envoy-"+envoyVersion, func(t *testing.T) {
for _, tt := range tests {
//if !tt.shouldRun {
// continue
//}
t.Run(tt.name, func(t *testing.T) {
// Sanity check default with no overrides first
snap := tt.create(t)
Expand Down
4 changes: 0 additions & 4 deletions agent/xds/listeners_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ type listenerTestCase struct {
// test input.
overrideGoldenName string
generatorSetup func(*ResourceGenerator)
shouldRun bool
}

func makeListenerDiscoChainTests(enterprise bool) []listenerTestCase {
Expand Down Expand Up @@ -1263,9 +1262,6 @@ func TestListenersFromSnapshot(t *testing.T) {
require.NoError(t, err)
t.Run("envoy-"+envoyVersion, func(t *testing.T) {
for _, tt := range tests {
//if !tt.shouldRun {
// continue
//}
t.Run(tt.name, func(t *testing.T) {

// Sanity check default with no overrides first
Expand Down
4 changes: 0 additions & 4 deletions agent/xds/resources_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ type goldenTestCase struct {
setup func(snap *proxycfg.ConfigSnapshot)
overrideGoldenName string
generatorSetup func(*ResourceGenerator)
shouldRun bool
}

func TestAllResourcesFromSnapshot(t *testing.T) {
Expand Down Expand Up @@ -198,9 +197,6 @@ func TestAllResourcesFromSnapshot(t *testing.T) {
require.NoError(t, err)
t.Run("envoy-"+envoyVersion, func(t *testing.T) {
for _, tt := range tests {
//if !tt.shouldRun {
// continue
//}
t.Run(tt.name, func(t *testing.T) {
run(t, sf, envoyVersion, latestEnvoyVersion, tt)
})
Expand Down

0 comments on commit bda5e4c

Please sign in to comment.