-
Notifications
You must be signed in to change notification settings - Fork 632
Infer SupportedFeatures in Conformance Tests (GEP-2162) [#3759] #3848
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
Conversation
…r tests were manually supplied or inferred from GatewayClass
…ied and refactored some code around it.
…esting and if they were inferred or not.
|
@bexxmodd: The label(s) In response to this:
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. |
|
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 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-sigs/prow repository. |
|
Hi @LiorLieberman Please take a look |
|
/cc @LiorLieberman |
|
/ok-to-test |
|
suggest linking to the PR to #3759 And retitle to indicate the change as well. |
…hSupportedFeatures function.
|
Added unit tests. |
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.
Thanks @bexxmodd! looks good to me with a few small comments.
Also suggest re-title based on my comment here #3848 (comment)
holding lgtm as it will be removed after you add more commits
|
thanks for reviewing @LiorLieberman . Resolved comments and updated title. |
LiorLieberman
left a comment
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.
This is awesome and LGTM, thanks @bexxmodd !
Would be useful if you update the PR description with exactly what its doing, and with the name and version of implementation that you checked (I believe it was Kong)
/lgtm
|
/hold |
|
Also, can you fix release note by either say what you have done or adding NONE in that code block? |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bexxmodd, LiorLieberman, youngnick 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 |
|
-> Update description with steps how it was tested. <- I'll update conformance docs in a separate PR. /hold cancel |
|
/lgtm |
…igs#3759] (kubernetes-sigs#3848) * SupportedFeatures * Added inferredSupportedFeatures to determine and report if feature for tests were manually supplied or inferred from GatewayClass * Corrected suite unit tests after addition of a new field. * Added logic of determining if supportedFeatures are inferred or supplied and refactored some code around it. * moved SupportedFeatures init after scheme addition * Cleaned up and organized code to properly determine features we are testing and if they were inferred or not. * Cleanup v2 * Make inferring supportedFeatures to take precedence over all other feature flags. * Fix when no profile was setting inferred to false. * remove debug log * Switched args arrangement so ctx is the first argument passed to fetchSupportedFeatures function. * Updated context as it's unclear where it should be supplied from * removed SupportedFeatures struct and method for determining supported features. * Refactored logic of determining supported features and add flag for the report in cSuite. * Reversed flag parsing for some values. * Tweaked logging options. * Cleaned up last places for SupportedFeatures struct. * Wrote unit tests for supported features determination logic in conformance suite. * Formatting fixes. * Resolved comments. * Fixed formatting. * Updated conformance docs. * Removed doc update so it can be submitted as a seperate PR.
What type of PR is this?
/kind feature
/area conformance-test
What this PR does / why we need it:
This change automatically infers SupportedFeatures from the GatewayClass' Status to run conformance tests against. This eliminates need for manually supplying features you are testing and any confusion for what features are supported that pass conformance.
Inferred SupportedFeatures will take precedence over all other test related flags. Existing flags like,
--supported-features,--all-features,--conformance-profiles, or--exempt-featuresshould only be used for development/testing. Final report for submission should have inferred supported features.Generated Conformance report will have
InferredSupportedFeaturesthat determines the validity of conformance tests.Feature was testing using Kong's gateway-operator. Steps:
Install specific version of experimental CRDs (v1.3.0 in this case):
Clone kong’s gateway operator repo (currently >= v1.6.0) and
cdinto it.make buildCreate Gateway and GatewayClass
Run with experimental flag enabled:
Run conformance tests from gateway-api folder:
Does this PR introduce a user-facing change?:
The change is the user doesn't need to manually supply features test if they want to generate passing report. They still can use flags like --supported-features and --exempt-features but they will be purely for development purposes
/fixes #3759