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

fix: remove ExemptFeatures in experimental suite #2279

Closed
wants to merge 2 commits into from

Conversation

Xunzhuo
Copy link
Member

@Xunzhuo Xunzhuo commented Aug 9, 2023

What type of PR is this?

/kind bug

What this PR does / why we need it:

In experimental test suite, we did not remove ExemptFeatures. This makes ExemptFeatures in Options does not work.

Which issue(s) this PR fixes:

Fixes #2347

Does this PR introduce a user-facing change?:

Remove ExemptFeatures in experimental suite

@k8s-ci-robot k8s-ci-robot added do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Aug 9, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Xunzhuo
Once this PR has been reviewed and has the lgtm label, please assign mlavacca for approval. For more information see the Kubernetes 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/XS Denotes a PR that changes 0-9 lines, ignoring generated files. release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Aug 9, 2023
@Xunzhuo
Copy link
Member Author

Xunzhuo commented Aug 9, 2023

/kind bug

@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Aug 9, 2023
@shaneutt
Copy link
Member

shaneutt commented Aug 9, 2023

/cc @mlavacca @sunjayBhatia

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.

Thanks, @Xunzhuo! This change makes total sense to me, but I see it as incomplete:

what happens when you want to be conformant with let's say the HTTP profile, but you exempt a mandatory feature like SupportGateway? With this kind of check, I think the conformance will be given, even if the Gateway tests are not executed.

@Xunzhuo
Copy link
Member Author

Xunzhuo commented Aug 11, 2023

Thanks, @Xunzhuo! This change makes total sense to me, but I see it as incomplete:

what happens when you want to be conformant with let's say the HTTP profile, but you exempt a mandatory feature like SupportGateway? With this kind of check, I think the conformance will be given, even if the Gateway tests are not executed.

Thanks for comments @mlavacca, let me try to understand this point. You mean we cannot exempt a coreFeatures in profiles? If so, this is a bit werid for me, I think users should be able to exempt features in core or extended. Correct me if I misundstand it.

This is synced with https://github.com/kubernetes-sigs/gateway-api/blob/main/conformance/utils/suite/suite.go#L102

@sunjayBhatia
Copy link
Member

Thanks, @Xunzhuo! This change makes total sense to me, but I see it as incomplete:
what happens when you want to be conformant with let's say the HTTP profile, but you exempt a mandatory feature like SupportGateway? With this kind of check, I think the conformance will be given, even if the Gateway tests are not executed.

Thanks for comments @mlavacca, let me try to understand this point. You mean we cannot exempt a coreFeatures in profiles? If so, this is a bit werid for me, I think users should be able to exempt features in core or extended. Correct me if I misundstand it.

This is synced with https://github.com/kubernetes-sigs/gateway-api/blob/main/conformance/utils/suite/suite.go#L102

I think @mlavacca's point is that if a feature is exempted that is part of one of the conformance profiles specified, then the resulting report should not mark that profile as having passed

e.g. if I use this branch and have a config like this:

	cSuite, err := suite.NewExperimentalConformanceTestSuite(suite.ExperimentalConformanceOptions{
		Options: suite.Options{
...
			SupportedFeatures:    suite.AllFeatures,
			SkipTests: []string{
...
			},
			ExemptFeatures: sets.New(
				suite.SupportMesh,
				suite.SupportHTTPRoutePortRedirect,
				suite.SupportReferenceGrant,
			),
		},
		Implementation: conformance_v1alpha1.Implementation{
...
		},
		ConformanceProfiles: sets.New(
			suite.HTTPConformanceProfileName,
			suite.TLSConformanceProfileName,
		),
	})

I still get a report that says everything passed even though not all the tests were run

        apiVersion: gateway.networking.k8s.io/v1alpha1
        date: "2023-08-15T19:57:19Z"
        gatewayAPIVersion: TODO
        implementation:
...
        kind: ConformanceReport
        profiles:
        - core:
            result: success
            statistics:
              Failed: 0
              Passed: 21
              Skipped: 0
            summary: ""
          extended:
            result: success
            statistics:
              Failed: 0
              Passed: 8
              Skipped: 0
            summary: ""
            supportedFeatures:
            - HTTPRouteHostRewrite
            - HTTPRoutePortRedirect
            - HTTPRoutePathRewrite
            - HTTPRouteRequestMirror
            - HTTPRouteQueryParamMatching
            - HTTPRouteMethodMatching
            - HTTPResponseHeaderModification
            - HTTPRouteSchemeRedirect
            - HTTPRoutePathRedirect
          name: HTTP
        - core:
            result: success
            statistics:
              Failed: 0
              Passed: 6
              Skipped: 0
            summary: ""
          name: TLS

Seems like for completeness we should make sure to set the profile result field to partial or otherwise if an exempt feature is specified that is part of a profile (and probably make sure the skipped tests are recorded as well)

Copy link
Member

@sunjayBhatia sunjayBhatia left a comment

Choose a reason for hiding this comment

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

left a comment, the change is correct, but probably needs more to make it complete in the context of the conformance profile suite

@youngnick
Copy link
Contributor

Yes, I agree that you should not be able to skip any Core tests in any profile and still have your conformance test marked as "Passing". Allowing that will undermine the value of the Core parts of the tests.

@mlavacca
Copy link
Member

I think @mlavacca's point is that if a feature is exempted that is part of one of the conformance profiles specified, then the resulting report should not mark that profile as having passed

Yep, this is 100% what I meant 👍

@Xunzhuo
Copy link
Member Author

Xunzhuo commented Aug 25, 2023

Great for clarifications, I will update it to make it complete.

@robscott
Copy link
Member

robscott commented Sep 7, 2023

@Xunzhuo do you think you'll have a chance to follow up on this one?

@Xunzhuo
Copy link
Member Author

Xunzhuo commented Sep 7, 2023

Yep @robscott

Signed-off-by: bitliu <bitliu@tencent.com>
Signed-off-by: bitliu <bitliu@tencent.com>
@robscott
Copy link
Member

robscott commented Sep 7, 2023

@Xunzhuo thanks for the update here! Unless I'm missing something, it still doesn't address @sunjayBhatia's comment above though: #2279 (comment).

@Xunzhuo
Copy link
Member Author

Xunzhuo commented Oct 25, 2023

/close

@arkodg is working on #2515

@k8s-ci-robot
Copy link
Contributor

@Xunzhuo: Closed this PR.

In response to this:

/close

Arko is working on https://github.com/kubernetes-sigs/gateway-api/pull/2515/files

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ExemptFeatures did not skip features in experimental suite
7 participants