-
Notifications
You must be signed in to change notification settings - Fork 231
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 test-e2e-encryption rule #1470
base: master
Are you sure you want to change the base?
Conversation
As explained in #1469 (comment), this test seems to have been broken in CI since the time it was first added, because the Makefile rule never did anything. |
/test e2e-aws-encryption |
/lgtm Thanks ! |
/assign @sttts (for approval) |
/approve |
New changes are detected. LGTM label has been removed. |
There was a compilation error in the test, I fixed it in the latest commit. /retest |
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
Stale issues rot after 30d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle rotten |
Rotten issues close after 30d of inactivity. Reopen the issue by commenting /close |
@openshift-bot: Closed this PR. 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/test-infra repository. |
/reopen |
/remove-lifecycle rotten |
@dgrisonnet: Reopened this PR. 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. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: dgrisonnet, sttts, tkashem 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 |
ef8c1a0
to
1e1f254
Compare
/test e2e-aws-encryption |
Run the test-unit rule that was initially forgotten and add the same flags as the ones we are using in cluster-kube-apiserver-operator tests. Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
1e1f254
to
22a5ab6
Compare
@@ -24,6 +24,10 @@ verify-podnetworkconnectivitychecks: | |||
$(MAKE) -C pkg/operator/connectivitycheckcontroller verify | |||
|
|||
test-e2e-encryption: GO_TEST_PACKAGES :=./test/e2e-encryption/... | |||
test-e2e-encryption: GO_TEST_FLAGS += -v | |||
test-e2e-encryption: GO_TEST_FLAGS += -timeout 4h |
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.
4h for a single unit test is quite a long timeout :)
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 mostly copied from https://github.com/openshift/cluster-kube-apiserver-operator/blob/master/Makefile#L45-L48.
And there nothing unit about this test besides the fact that we invoke "test-unit" from build-machinery. The test creates 7 different keys: https://github.com/openshift/library-go/blob/master/test/e2e-encryption/encryption_test.go#L366-L371 which should result in at least 21 revisions if we include the migrations, which can take a while 😅
@@ -24,6 +24,10 @@ verify-podnetworkconnectivitychecks: | |||
$(MAKE) -C pkg/operator/connectivitycheckcontroller verify | |||
|
|||
test-e2e-encryption: GO_TEST_PACKAGES :=./test/e2e-encryption/... | |||
test-e2e-encryption: GO_TEST_FLAGS += -v | |||
test-e2e-encryption: GO_TEST_FLAGS += -timeout 4h | |||
test-e2e-encryption: GO_TEST_FLAGS += -p 1 |
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 this required ?
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.
Not right now since there is only one test in the package, but it can be a great protection in the future if we add another test as it would prevent running different encryption changes in parallel against the same cluster.
Based on that, do you think we should keep it?
@@ -628,3 +638,34 @@ func (p *provider) EncryptedGRs() []schema.GroupResource { | |||
func (p *provider) ShouldRunEncryptionControllers() (bool, error) { | |||
return true, nil | |||
} | |||
|
|||
func extractOperatorSpec(obj *unstructured.Unstructured, fieldManager string) (*applyoperatorv1.OperatorSpecApplyConfiguration, error) { | |||
castObj := &operatorv1.OpenShiftAPIServer{} |
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.
isn't the test using some fake resource ?
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.
correct 🤦♂️, I blindly copy-pasted these and didn't check
Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
22a5ab6
to
00f3d78
Compare
Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
@dgrisonnet: The following test 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. |
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
Stale issues rot after 30d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle rotten |
The test-e2e-encryption rule was broken which caused the
e2e-aws-encryption
CI job to not do anything. For instance, if we look at the job logs, themake test-e2e-encryption
invocation is yielding the following error:The intended way to run these test seem to call the
test-unit
rule from build-machinery: https://github.com/openshift/build-machinery-go/blob/bd58a901bbfeb5f63f027cfaa35de4863bb535fb/make/targets/golang/test-unit.mk#L5-L13. And that is what we are doing today in cluster-kube-apiserver-operator: https://github.com/openshift/cluster-kube-apiserver-operator/blob/master/Makefile#L39-L60.Alongside this fix, I also added the flags that we are setting in the kas-operator repo as they seem to be a good fit for this test aswell.