Skip to content
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

mesh conformance: add extended level features #3035

Merged
merged 3 commits into from
Apr 30, 2024

Conversation

howardjohn
Copy link
Contributor

What type of PR is this?
/area conformance

What this PR does / why we need it:
This PR moves a few mesh tests to "extended" level because they do not have widespread support

Which issue(s) this PR fixes:

Fixes #

Does this PR introduce a user-facing change?:

NONE

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. area/conformance labels Apr 29, 2024
@howardjohn
Copy link
Contributor Author

/assign @robscott

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Apr 29, 2024
Comment on lines 37 to 38
features.SupportHTTPRoute,
features.SupportHTTPRouteResponseHeaderModification,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These cannot be part of the feature set. IMO this is due to a limitation of the framework. What we want is

ProvesFeatures: [features.SupportMeshConsumerRoute]
DependsOnFeatures: [features.SupportHTTPRoute, features.SupportHTTPRouteResponseHeaderModification]

That is, you cannot be SupportMeshConsumerRoute without this test, but you can be SupportHTTPRoute without this test. However, you need SupportHTTPRoute to be SupportMeshConsumerRoute due to testing implications

Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure why we need to remove these features? The test will not run if you don't claim support for any of the features in the list, so simply adding SupportMeshConsumerRoute should be sufficient here. We shouldn't assume that SupportMeshConsumerRoute implies SupportHTTPRouteResponseHeaderModification right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

IIUC, without this an implementation cannot claim SupportHTTPRouteResponseHeaderModification without passing this test.

This test does not test header modification. It depends on header modification as a mechanism to make assertions, but doesn't prove nor deny support for response header modifications.

Copy link
Member

Choose a reason for hiding this comment

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

IMO this would be testing the intersection between two extended features, and no implementation should be required to pass tests that cover features they're not claiming to support (x-ref #3025 (comment)). I realize that likely requires a docs update, but would rather do that than unnecessarily remove features from the list here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, but that really doesn't make sense to me. Let me draw an analogy outside of these tests...

Consider two features, SupportsJSON and SupportsObscureFeature.

In order to test ObscureFeature, we happen to send JSON requests. But JSON and ObscureFeature are not correlated in any way other than implementation details of the test, which happen to use JSON for convience.

IIUC, you are saying "An implementation cannot claim JSON support without supporting ObscureFeature". Is that accurate?

(JSON=RouteResponseHeaderModification,ObscureFeature=MeshConsumerRoute)

Copy link
Member

Choose a reason for hiding this comment

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

I think we're agreeing with each other and I'm just not communicating well. I'm saying that any test that covers the intersection of two extended features should only be required if an implementation claims support for both extended features. By extension, that also means that we should always try to have at least some isolated test coverage for every extended feature that does not rely on other extended features.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Got it. So that implies splitting Features into 2 fields?

Copy link
Member

Choose a reason for hiding this comment

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

I think features already has the functionality you want? We only run a test if the implementation is claiming support for all features associated with the test. I don't really think we need any distinction here since the test is providing coverage for all features listed, the biggest thing we need to work on is ensuring that we actually have isolated test coverage for every extended feature that doesn't rely on other extended features. Open to suggestions for how to improve this further though.

@robscott
Copy link
Member

Thanks @howardjohn! This change makes sense to me, but would be good to get some feedback from other mesh implementations as well.

/cc @kflynn @michaelbeaumont

Copy link
Member

@mlavacca mlavacca left a comment

Choose a reason for hiding this comment

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

Since we are introducing Mesh Extended features, we need to include them in the Mesh conformance profiles as well, here:

// MeshHTTPConformanceProfile is a ConformanceProfile that covers testing HTTP
// service mesh related functionality.
MeshHTTPConformanceProfile = ConformanceProfile{
Name: MeshHTTPConformanceProfileName,
CoreFeatures: sets.New(
features.SupportMesh,
features.SupportHTTPRoute,
),
ExtendedFeatures: features.HTTPRouteExtendedFeatures,
}
// MeshGRPCConformanceProfile is a ConformanceProfile that covers testing GRPC
// service mesh related functionality.
MeshGRPCConformanceProfile = ConformanceProfile{
Name: MeshHTTPConformanceProfileName,
CoreFeatures: sets.New(
features.SupportMesh,
features.SupportGRPCRoute,
),
}
)

pkg/features/features.go Outdated Show resolved Hide resolved
@howardjohn
Copy link
Contributor Author

@mlavacca thanks, done

@kflynn
Copy link
Contributor

kflynn commented Apr 30, 2024

/lgtm

I completely agree with @howardjohn that separating things we're testing from things we depend on would be really nice, but I think that clarifying that consumer routes and IP matching are extended is worth doing.

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 30, 2024
@robscott
Copy link
Member

Thanks @howardjohn!

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: howardjohn, robscott

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 30, 2024
@k8s-ci-robot k8s-ci-robot merged commit e1b774d into kubernetes-sigs:main Apr 30, 2024
8 checks passed
howardjohn added a commit to howardjohn/istio that referenced this pull request Apr 30, 2024
howardjohn added a commit to howardjohn/istio that referenced this pull request Apr 30, 2024
howardjohn added a commit to howardjohn/istio that referenced this pull request Apr 30, 2024
howardjohn added a commit to howardjohn/istio that referenced this pull request May 1, 2024
istio-testing pushed a commit to istio/istio that referenced this pull request May 2, 2024
* Update gateway-api version for conformance (#50771)

See kubernetes-sigs/gateway-api#3035

(cherry picked from commit 769cfeb)

* lint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/conformance cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants