-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
NE-1968: add e2e tests for FeatureGate GatewayAPI #29597
Conversation
@lihongan: This pull request references NE-1968 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.19.0" version, but no target version was set. 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 openshift-eng/jira-lifecycle-plugin repository. |
Skipping CI for Draft Pull Request. |
openshift/cluster-ingress-operator#1192 got merged |
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.
Overall, LGTM. Just some small remarks:
test/extended/router/gatewayapi.go
Outdated
|
||
g.It("should not be deleted", func() { | ||
ctx := context.Background() | ||
crdClient := apiextensionsclientset.NewForConfigOrDie(oc.AdminConfig()) |
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.
Why creating the crdClient for each It
clause? Would a single crdClient
in var
section above be enough?
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 tried the way you mentioned but always get error when executing make update
goroutine 1 [running]:
runtime/debug.Stack()
/home/hongli/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.23.4.linux-amd64/src/runtime/debug/stack.go:26 +0x5e
github.com/openshift/origin/test/extended/util.FatalErr({0x6710f60, 0xc001a845d0})
/home/hongli/go/src/github.com/openshift/origin/test/extended/util/client.go:1018 +0x25
github.com/openshift/origin/test/extended/util.(*CLI).AdminConfig(0x6e0b520?)
/home/hongli/go/src/github.com/openshift/origin/test/extended/util/client.go:819 +0x3b
github.com/openshift/origin/test/extended/router.init.func3()
/home/hongli/go/src/github.com/openshift/origin/test/extended/router/gatewayapi.go:26 +0x89
github.com/onsi/ginkgo/v2/internal.NewNode.func2({0xc001b65a40?, 0x0?})
/home/hongli/go/src/github.com/openshift/origin/vendor/github.com/onsi/ginkgo/v2/internal/node.go:324 +0x13
github.com/onsi/ginkgo/v2/internal.(*Suite).PushNode.func1(0xc00078db08?)
/home/hongli/go/src/github.com/openshift/origin/vendor/github.com/onsi/ginkgo/v2/internal/suite.go:209 +0x5b
github.com/onsi/ginkgo/v2/internal.(*Suite).PushNode(_, {0x20d, 0x2, {0x6fe7a54, 0x5c}, 0xc001545f70, {{0x8c1ad5d, 0x52}, 0x16, {0x0, ...}, ...}, ...})
/home/hongli/go/src/github.com/openshift/origin/vendor/github.com/onsi/ginkgo/v2/internal/suite.go:211 +0x71e
github.com/onsi/ginkgo/v2/internal.(*Suite).BuildTree(0xc0010b4008)
/home/hongli/go/src/github.com/openshift/origin/vendor/github.com/onsi/ginkgo/v2/internal/suite.go:101 +0xb8
k8s.io/kubernetes/openshift-hack/e2e/annotate.Run(0xa644818?, 0x71be1e8)
/home/hongli/go/src/github.com/openshift/origin/vendor/k8s.io/kubernetes/openshift-hack/e2e/annotate/annotate.go:31 +0xd5
main.main()
/home/hongli/go/src/github.com/openshift/origin/test/extended/util/annotate/annotate.go:14 +0x25
And no error if creating the crdClient for each It
clause, am I missing something ?
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.
Interesting. It's not a big deal (we can move on without this) but just out of curiosity, was there an error message? Because the call stack just shows that there was an error while getting AdminConfig
.
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.
There was no clear error message, maybe something wrong in init, not very sure.
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.
@alebedev87 I added a wrapper in test/extended/util/client.go
so this issue is solved now. The crdClient
is not required and we can use oc.AdminApiextensionsClient()
instead.
test/extended/router/gatewayapi.go
Outdated
|
||
g.Describe("The ValidatingAdmissionPolicy for Gateway API", func() { | ||
// Adding [Serial] since it could break Gateway API CRDs creation/deletion/update tests | ||
g.It("should be recreated after it is deleted [Serial]", func() { |
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.
Is adding [Serial]
to the test name is enough to make it serial?
|
||
"[sig-network][OCPFeatureGate:GatewayAPI][Feature:Router][apigroup:gateway.networking.k8s.io] The Gateway API CRDs should not be updated": " [Suite:openshift/conformance/parallel]", | ||
|
||
"[sig-network][OCPFeatureGate:GatewayAPI][Feature:Router][apigroup:gateway.networking.k8s.io] The ValidatingAdmissionPolicy for Gateway API should be recreated after it is deleted [Serial]": " [Suite:openshift/conformance/serial]", |
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.
@alebedev87 From this generated file looks adding [Serial] to the test name is enough to make it serial.
@lihongan: This pull request references NE-1968 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.19.0" version, but no target version was set. 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 openshift-eng/jira-lifecycle-plugin repository. |
/test e2e-gcp-ovn-techpreview |
/test e2e-gcp-ovn-techpreview-serial |
/test e2e-aws-ovn-single-node-techpreview |
/test e2e-aws-ovn-single-node-techpreview-serial |
/retest-required |
/test e2e-gcp-ovn-techpreview |
Job Failure Risk Analysis for sha: 117b506
Risk analysis has seen new tests most likely introduced by this PR. New Test Risks for sha: 117b506
New tests seen in this PR at sha: 117b506
|
/test e2e-gcp-ovn-techpreview |
/assign |
Job Failure Risk Analysis for sha: 3d4bcbb
Risk analysis has seen new tests most likely introduced by this PR. New Test Risks for sha: 3d4bcbb
New tests seen in this PR at sha: 3d4bcbb
|
/test e2e-gcp-ovn-techpreview |
Job Failure Risk Analysis for sha: 3ef9216
Risk analysis has seen new tests most likely introduced by this PR. New Test Risks for sha: 3ef9216
New tests seen in this PR at sha: 3ef9216
|
Job Failure Risk Analysis for sha: 9ee70a2
Risk analysis has seen new tests most likely introduced by this PR. New tests seen in this PR at sha: 9ee70a2
|
1 similar comment
Job Failure Risk Analysis for sha: 9ee70a2
Risk analysis has seen new tests most likely introduced by this PR. New tests seen in this PR at sha: 9ee70a2
|
1 similar comment
Job Failure Risk Analysis for sha: 9ee70a2
Risk analysis has seen new tests most likely introduced by this PR. New tests seen in this PR at sha: 9ee70a2
|
Job Failure Risk Analysis for sha: 9ee70a2
Risk analysis has seen new tests most likely introduced by this PR. New tests seen in this PR at sha: 9ee70a2
|
Job Failure Risk Analysis for sha: 9ee70a2
Risk analysis has seen new tests most likely introduced by this PR. New tests seen in this PR at sha: 9ee70a2
|
1 similar comment
Job Failure Risk Analysis for sha: 9ee70a2
Risk analysis has seen new tests most likely introduced by this PR. New tests seen in this PR at sha: 9ee70a2
|
Implements e2e tests for GatewayAPI featuregate. These tests cover the following scenarios: Verify Gateway API CRDs and esnure required CRDs should already be installed Verfiy Gateway API CRDs and ensure existing CRDs can not be deleted Verify Gateway API CRDs and ensure existing CRDs can not be updated Verify Gateway API CRDs and ensure CRD of standard group can not be created Verify Gateway API CRDs and ensure CRD of experimental group is not installed Verify Gateway API CRDs and ensure CRD of experimental group can not be created
@@ -693,6 +694,10 @@ func (c *CLI) TemplateClient() templatev1client.Interface { | |||
return templatev1client.NewForConfigOrDie(c.UserConfig()) | |||
} | |||
|
|||
func (c *CLI) AdminApiextensionsClient() apiextensionsclient.Interface { | |||
return apiextensionsclient.NewForConfigOrDie(c.AdminConfig()) | |||
} |
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.
@Miciah Could you please help check if the wrapper is correct ?
/test e2e-gcp-ovn-techpreview |
Job Failure Risk Analysis for sha: 5c5d543
Risk analysis has seen new tests most likely introduced by this PR. New tests seen in this PR at sha: 5c5d543
|
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED Approval requirements bypassed by manually added approval. This pull-request has been approved by: alebedev87, knobunc, lihongan 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 |
Job Failure Risk Analysis for sha: 5c5d543
Risk analysis has seen new tests most likely introduced by this PR. New tests seen in this PR at sha: 5c5d543
|
Job Failure Risk Analysis for sha: 5c5d543
Risk analysis has seen new tests most likely introduced by this PR. New tests seen in this PR at sha: 5c5d543
|
1 similar comment
Job Failure Risk Analysis for sha: 5c5d543
Risk analysis has seen new tests most likely introduced by this PR. New tests seen in this PR at sha: 5c5d543
|
Job Failure Risk Analysis for sha: 5c5d543
Risk analysis has seen new tests most likely introduced by this PR. New tests seen in this PR at sha: 5c5d543
|
/retest-required |
@lihongan: The following tests failed, say
Full PR test history. Your PR dashboard. 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. I understand the commands that are listed here. |
/retest-required |
addcf0c
into
openshift:main
[ART PR BUILD NOTIFIER] Distgit: openshift-enterprise-tests |
Implements e2e tests for GatewayAPI featuregate. These tests cover the following scenarios:
requires openshift/cluster-ingress-operator#1192