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 test-e2e-encryption rule #1470

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

dgrisonnet
Copy link
Member

@dgrisonnet dgrisonnet commented Feb 17, 2023

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, the make test-e2e-encryption invocation is yielding the following error:

make: Nothing to be done for 'test-e2e-encryption'.

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.

@openshift-ci openshift-ci bot requested review from deads2k and sttts February 17, 2023 14:28
@dgrisonnet
Copy link
Member Author

dgrisonnet commented Feb 17, 2023

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.

@dgrisonnet
Copy link
Member Author

/test e2e-aws-encryption

@tkashem
Copy link
Contributor

tkashem commented Feb 17, 2023

/lgtm
/approve

Thanks !

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Feb 17, 2023
@tkashem
Copy link
Contributor

tkashem commented Feb 17, 2023

/assign @sttts (for approval)

@sttts
Copy link
Contributor

sttts commented Feb 17, 2023

/approve

@openshift-ci openshift-ci bot added approved Indicates a PR has been approved by an approver from all required OWNERS files. and removed lgtm Indicates that a PR is ready to be merged. labels Feb 17, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 17, 2023

New changes are detected. LGTM label has been removed.

@dgrisonnet
Copy link
Member Author

There was a compilation error in the test, I fixed it in the latest commit.

/retest

@openshift-bot
Copy link

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@openshift-ci openshift-ci bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label May 19, 2023
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 19, 2023
@openshift-bot
Copy link

Stale issues rot after 30d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle rotten
/remove-lifecycle stale

@openshift-ci openshift-ci bot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jun 18, 2023
@openshift-bot
Copy link

Rotten issues close after 30d of inactivity.

Reopen the issue by commenting /reopen.
Mark the issue as fresh by commenting /remove-lifecycle rotten.
Exclude this issue from closing again by commenting /lifecycle frozen.

/close

@openshift-ci openshift-ci bot closed this Jul 19, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 19, 2023

@openshift-bot: Closed this PR.

In response to this:

Rotten issues close after 30d of inactivity.

Reopen the issue by commenting /reopen.
Mark the issue as fresh by commenting /remove-lifecycle rotten.
Exclude this issue from closing again by commenting /lifecycle frozen.

/close

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.

@dgrisonnet
Copy link
Member Author

/reopen

@dgrisonnet
Copy link
Member Author

/remove-lifecycle rotten

@openshift-ci openshift-ci bot reopened this Oct 16, 2024
@openshift-ci openshift-ci bot removed the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Oct 16, 2024
Copy link
Contributor

openshift-ci bot commented Oct 16, 2024

@dgrisonnet: Reopened this PR.

In response to this:

/reopen

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.

Copy link
Contributor

openshift-ci bot commented Oct 16, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: dgrisonnet, sttts, tkashem
Once this PR has been reviewed and has the lgtm label, please assign bertinatto 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

@openshift-ci openshift-ci bot removed the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 16, 2024
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 16, 2024
@p0lyn0mial
Copy link
Contributor

/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>
@@ -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
Copy link
Contributor

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 :)

Copy link
Member Author

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
Copy link
Contributor

Choose a reason for hiding this comment

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

is this required ?

Copy link
Member Author

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{}
Copy link
Contributor

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 ?

Copy link
Member Author

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>
Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
Copy link
Contributor

openshift-ci bot commented Oct 17, 2024

@dgrisonnet: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-aws-encryption d440f32 link true /test e2e-aws-encryption

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.

@openshift-bot
Copy link

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@openshift-ci openshift-ci bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 16, 2025
@openshift-bot
Copy link

Stale issues rot after 30d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle rotten
/remove-lifecycle stale

@openshift-ci openshift-ci bot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Feb 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants