-
Notifications
You must be signed in to change notification settings - Fork 472
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
Add flags for SupportedFeatures and ExemptFeatures in conformance tests. #1394
Add flags for SupportedFeatures and ExemptFeatures in conformance tests. #1394
Conversation
Hi @gyohuangxin. 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 Once the patch is verified, the new status will be reflected by the 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/test-infra repository. |
cSuite := suite.New(suite.Options{ | ||
Client: client, | ||
GatewayClassName: *flags.GatewayClassName, | ||
Debug: *flags.ShowDebug, | ||
CleanupBaseResources: *flags.CleanupBaseResources, | ||
SupportedFeatures: []suite.SupportedFeature{ | ||
suite.SupportReferenceGrant, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe the original intent of having this specific feature hardcoded was to include ReferenceGrant in the default set of conformance tests - I'm not sure if we should try to keep a "default supported features" list somehow (feels awkward), or instead just change conformance tests currently enabled with the flag to instead switch to an ExemptFeature flag to opt-out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can make a "default supported features" which runs all the conformance tests, and we can change enabled tests with SupportedFeatures
flag or just opt-out tests with ExemptFeatures
flag. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we could just remove the suite.SupportReferenceGrant
constant, and remove it from the Features
list on all conformance tests that currently expect it to be set.
This keeps those tests included by default, still allows using the ExemptReferenceGrant
flag to opt-out, avoids any complexity of an extra "default" list, and feels okay given that we're intending to promote ReferenceGrant to v1beta1 in the upcoming v0.6.0 Gateway API release.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mikemorris Thanks for your reply, I can understand it basically. What to do are:
- Remove suite.SupportReferenceGrant as the default value of
SupportedFeatures
- Remove suite.SupportReferenceGrant from
Features
list on all tests, such as https://github.com/kubernetes-sigs/gateway-api/blob/main/conformance/tests/gateway-secret-invalid-reference-grant.go#L37. Then replace it toExemptions: []suite.ExemptFeature{ suite.ExemptReferenceGrant, },
, so that--exempt-features ExemptReferenceGrant
flag can be set to opt-out.
Can I confirm it is correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that should be correct @gyohuangxin!
I think we can then do:
3. Remove the constant at
gateway-api/conformance/utils/suite/suite.go
Lines 47 to 48 in 583e4e2
// This option indicates support for the ReferenceGrant object. | |
SupportReferenceGrant SupportedFeature = "ReferenceGrant" |
In upcoming Gateway API v0.6.0, all implementations should assume ReferenceGrant is supported unless explicitly setting ExemptReferenceGrant
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mikemorris Thanks! I've updated the code and the "user-facing change" section per your comments, please review again.
/ok-to-test @gyohuangxin Could you add a changelog entry in the "user-facing change" section? |
Updated the "user-facing change" section. |
@aryan9600 @mikemorris Any more comments? |
Signed-off-by: Huang Xin <xin1.huang@intel.com>
…eatures and remove suite.SupportReferenceGrant from Features list on all tests. Signed-off-by: Huang Xin <xin1.huang@intel.com>
92bec8a
to
c7c0164
Compare
/assign @mikemorris |
/lgtm |
/assign @shaneutt |
@shaneutt Can you help review it? Thanks. |
@shaneutt Cloud you please have a look on that? |
Thanks @gyohuangxin! /approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: gyohuangxin, 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 |
What type of PR is this?
/kind feature
What this PR does / why we need it:
This PR add flags for SupportedFeatures and ExemptFeatures in conformance tests.
Examples:
Which issue(s) this PR fixes:
Fixes #1391
Does this PR introduce a user-facing change?: