Skip to content

Added logic to block conformance report if support features source is manual for non-gateway features. #3927

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions conformance/utils/suite/suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,12 @@ func (suite *ConformanceTestSuite) Report() (*confv1.ConformanceReport, error) {
}
defer suite.lock.RUnlock()

if suite.supportedFeaturesSource == supportedFeaturesSourceManual &&
!hasMeshFeatures(suite.SupportedFeatures) &&
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A bit orthogonal to this, but I think it would be useful to proactively ignore mesh features published in GatewayClass status so that it's clear that those should be reported separately and aren't really tied to the GatewayClass. Since it seems like a Mesh resource is ~imminent, it seems cleaner for Mesh features to be reported there in the future instead of both resources reporting all features.

Since I think this would exclusively affect Istio, would appreciate some feedback from that side on this idea:

/cc @howardjohn @mikemorris

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes sense to me, agreed clearing this up sooner sounds good.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@robscott currently if Mesh features are read from GWC we throw an error

Are you implying to have some extra check here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That impl seems good to me (and easy to catch/fix as an implementer) @bexxmodd

!suite.conformanceProfiles.HasAny(MeshHTTPConformanceProfileName, MeshGRPCConformanceProfileName) {
return nil, fmt.Errorf("can't generate report: Gateway's supported features should be read from Status and not supplied through flags")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This means its impossible to run the report if your gateway doesn't support the SupportFeatures feature. Which is a brand new feature. This seems far to early to do, if ever

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree that we should not block in v1.4. I think the corresponding GEP said that while this would be the default/encouraged path for v1.4+, it would only become required in v1.5. Of course mesh features will also have a longer extension here because there's currently no alternative way of listing supported features.

Copy link
Contributor Author

@bexxmodd bexxmodd Jul 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that we decided to give grace period for Supported Features until v1.5 release, my intention with this PR was to merge it after Jul 22 so it falls under v1.5, when we'll start proactively blocking manually specified reports.

}

testNames := make([]string, 0, len(suite.results))
for tN := range suite.results {
testNames = append(testNames, tN)
Expand Down
40 changes: 40 additions & 0 deletions conformance/utils/suite/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,46 @@ func TestSuiteReport(t *testing.T) {
}
}

func TestSuiteReportBlocksManualSource(t *testing.T) {
testCases := []struct {
name string
supportedFeatures FeaturesSet
profiles sets.Set[ConformanceProfileName]
wantErr bool
}{
{
name: "should block with no mesh features",
supportedFeatures: namesToFeatureSet(statusFeatureNames),
profiles: sets.New(testProfileName),
wantErr: true,
},
{
name: "should not block with mesh features",
supportedFeatures: sets.New(features.SupportMeshClusterIPMatching, features.SupportMeshConsumerRoute),
},
{
name: "should not block with mesh profile",
supportedFeatures: namesToFeatureSet(statusFeatureNames),
profiles: sets.New(MeshHTTPConformanceProfileName),
},
}
for _, tc := range testCases {
t.Run(tc.name, func(t *testing.T) {
conformanceProfileMap[testProfileName] = testProfile

suite := ConformanceTestSuite{
supportedFeaturesSource: supportedFeaturesSourceManual,
conformanceProfiles: tc.profiles,
SupportedFeatures: tc.supportedFeatures,
}
_, err := suite.Report()
if tc.wantErr && err == nil {
t.Errorf("Expected an error but got nil")
}
})
}
}

var statusFeatureNames = []string{
"Gateway",
"GatewayPort8080",
Expand Down