Skip to content

[GEP-2162] Updated a new field on report for supported features inference from boolean to enum. #3885

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 10 commits into
base: main
Choose a base branch
from

Conversation

bexxmodd
Copy link
Contributor

What type of PR is this?
/kind feature
/kind gep
/area conformance-test

What this PR does / why we need it:
This is an update from boolean flag to enum for the report that should capture case when Conformance profile is Mesh without GWC and we can't infer supported features.

Does this PR introduce a user-facing change?:
None

bexxmodd added 4 commits June 24, 2025 16:22
…t for exceptional case when only Mesh profile is being tested and no GWC available to determine supported features.
@k8s-ci-robot
Copy link
Contributor

Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. kind/gep PRs related to Gateway Enhancement Proposal(GEP) area/conformance-test Issues or PRs related to Conformance tests. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jun 27, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: bexxmodd
Once this PR has been reviewed and has the lgtm label, please assign arkodg for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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 size/M Denotes a PR that changes 30-99 lines, ignoring generated files. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jun 27, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @bexxmodd. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@youngnick
Copy link
Contributor

Change overall looks good with some minor changes to make things more readable.

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jun 30, 2025
@LiorLieberman
Copy link
Member

/cc

Copy link
Member

@LiorLieberman LiorLieberman left a comment

Choose a reason for hiding this comment

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

Thanks @bexxmodd overall looks good. left some comments

/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 30, 2025
@youngnick
Copy link
Contributor

This LGTM but I'll defer to @mlavacca for a final approval.

@youngnick youngnick requested a review from mlavacca July 1, 2025 05:03
@youngnick youngnick added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Jul 1, 2025
@k8s-ci-robot k8s-ci-robot removed the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Jul 1, 2025
@mlavacca mlavacca added area/conformance-machinery Issues or PRs related to the machinery and the suite used to run conformance tests. and removed area/conformance-test Issues or PRs related to Conformance tests. labels Jul 1, 2025
// automatically detected by the conformance suite.
InferredSupportedFeatures bool `json:"inferredSupportedFeatures"`
SupportedFeaturesSource SupportedFeaturesSource `json:"supportedFeaturesSource"`
Copy link
Member

Choose a reason for hiding this comment

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

I have a broader question around this field (that here we are changing from bool to enum): what's the value of including this data in the report? From my point of view, this is something meaningful when running the suite, but I don't see much value in including it in the final report. Why is this information important to users who are looking at conformance reports?
Am I missing something?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In order for to verify that the list of features reported are actually supported by GatewayClass we want to run the tests based on the features the implementation claim to support (through publishing it on GatewayClass' Status). This field communicates to the users if reported features are actually supported (thus inferred), they were manually hand-picked or there is no GWC at all.

Copy link
Member

@LiorLieberman LiorLieberman Jul 1, 2025

Choose a reason for hiding this comment

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

+1 to @bexxmodd point

And the plan is to follow up realtively quickly (we'll continue to communicate in slack and the community meetings), and block reports (by changing the csuite.Report function) to not report things that are manually stamped

Copy link
Member

Choose a reason for hiding this comment

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

To summarize, we can have the following cases:

  • Features manually picked (as it is today) - I guess this is the case @LiorLieberman is talking about when saying "block reports (by changing the csuite.Report function) to not report things that are manually stamped"
  • Inferred features - the suite gets them from the provided GWC status
  • undefined - only mesh features (I guess they are manually provided?)

However, there is a fourth case that I'd like to figure out, which is Gateway profiles and Mesh profiles together: I don't think mesh features should be set in the GWC status, so how do we proceed in this case?

Copy link
Member

Choose a reason for hiding this comment

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

However, there is a fourth case that I'd like to figure out, which is Gateway profiles and Mesh profiles together: I don't think mesh features should be set in the GWC status, so how do we proceed in this case?

Right now, implementations that are both a Gateway and a Mesh implementation, do have gateway class, and the current state is that they report (or will report) their supportedFeatures (mesh features included) on GWC. From here we can go to either direction:

  1. Change the guidance to not report Mesh related features on GatewayClass. When a Mesh resource is introduced (if it is introduced cc: @kflynn) or when we figure out a different way for inferring mesh features, we are updating the GEP to guide implementations to report there.

  2. We let this dual implementations (mesh and gateway) publish Mesh features on GWC. And later if there is additional Mesh resource introduced, they can migrate there.

I think 1) is cleaner. However it would require those implementations to provide Mesh Features manually, and more complex code in the suite.

I think 2) is more straightforward.

If we go with 1) the way to handle this is provide inferred stamp in case no non-mesh features were provided. (potentially we introduce a new flag for "mesh-features" to enforce it more cleanly, or we just check based on Mesh prefix)

/cc @mikemorris @kflynn @howardjohn for addtl feedback

Copy link
Contributor

@mikemorris mikemorris Jul 2, 2025

Choose a reason for hiding this comment

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

My initial take is that 1️⃣ is preferable - dual GatewayClass/Mesh impls should not report mesh features on GatewayClass.

At best it would be inconsistent (mesh-only implementations would have a different reporting path), and at worst could lead to confusion like #3581, where N/S or mesh functionality might inaccurately imply conformance for the same feature on the other architecture (whether by coding error or just misinterpretation by users).

Copy link
Contributor

Choose a reason for hiding this comment

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

I would also vote for option 1. I think reporting mesh features on the GatewayClass is a bad idea.

(I also anticipate having a Mesh resource in Gateway API 1.4.0, but even if that misses, I think option 1 is the way to go.)

Copy link
Contributor

Choose a reason for hiding this comment

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

That said, I don't entirely follow @bexxmodd's comment here:

This field communicates to the users if reported features are actually supported (thus inferred), they were manually hand-picked or there is no GWC at all.

If the point is to figure out whether a given feature was actually tested vs just inserted by a human, I don't know that this gains us much, but if the point is different, I don't think I'm following the point. 🙂

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Why do you think we don't gain much? Also, how much gain should be this change?

  • The fundamental purpose is to "verify that the list of features reported are actually supported by GatewayClass". When features are inferred from the GatewayClass status field, it creates an unbreakable, programmatic link between the implementation's public claims and the conformance tests being run. This is not just about whether a feature was tested, but whether a feature claimed by the implementation was tested and passed. A manually supplied list offers no such guarantee.
  • It terms of gain, it provides crucial context to anyone reading a conformance report.
  • This is step in that direction of creating the necessary distinction between trusted and untrusted feature sources.

@k8s-ci-robot
Copy link
Contributor

@LiorLieberman: GitHub didn't allow me to request PR reviews from the following users: for.

Note that only kubernetes-sigs members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

However, there is a fourth case that I'd like to figure out, which is Gateway profiles and Mesh profiles together: I don't think mesh features should be set in the GWC status, so how do we proceed in this case?

Right now, implementations that are both a Gateway and a Mesh implementation, do have gateway class, and the current state is that they report (or will report) their supportedFeatures (mesh features included) on GWC. From here we can go to either direction:

  1. Change the guidance to not report Mesh related features on GatewayClass. When a Mesh resource is introduced (if it is introduced cc: @kflynn) or when we figure out a different way for inferring mesh features, we are updating the GEP to guide implementations to report there.

  2. We let this dual implementations (mesh and gateway) publish Mesh features on GWC. And later if there is additional Mesh resource introduced, they can migrate there.

I think 1) is cleaner. However it would require those implementations to provide Mesh Features manually, and more complex code in the suite.

I think 2) is more straightforward.

If we go with 1) the way to handle this is provide inferred stamp in case no non-mesh features were provided. (potentially we introduce a new flag for "mesh-features" to enforce it more cleanly, or we just check based on Mesh prefix)

/cc @mikemorris @kflynn @howardjohn for addtl feedback

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Comment on lines +205 to +206
case isOnlyMeshProfile(&options):
source = confv1.SupportedFeaturesSourceUndefined
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think I understand the intent of this logic.

Do you envision mesh sources to eventually fall under Inferred once a resource for reporting SupportedFeatures is available? Or if it's intended to remain distinct, should Inferred be named something more specific like GatewayClassInferred?

Copy link
Member

Choose a reason for hiding this comment

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

the former. It is currently undefined, and hence allowed. they would become Inferred once we have a resource or a way for reporting - yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/conformance-machinery Issues or PRs related to the machinery and the suite used to run conformance tests. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. kind/feature Categorizes issue or PR as related to a new feature. kind/gep PRs related to Gateway Enhancement Proposal(GEP) ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants