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

Community code sync for operand, update CRDs #375

Merged
merged 14 commits into from
Oct 18, 2023
Merged

Community code sync for operand, update CRDs #375

merged 14 commits into from
Oct 18, 2023

Conversation

bluzarraga
Copy link
Member

No description provided.

Signed-off-by: Ben Luzarraga <luzarragaben@gmail.com>
Signed-off-by: Ben Luzarraga <luzarragaben@gmail.com>
@bluzarraga
Copy link
Member Author

The problem with the build comes from this line here: https://github.com/IBM/ibm-cert-manager-operator/blob/master/controllers/operator/suite_test.go#L29. This package is no longer included in controller-runtime past 0.13.1 (latest 0.16.2). I have no idea what the relevant code does https://github.com/IBM/ibm-cert-manager-operator/blob/master/controllers/operator/suite_test.go#L49 but this is the only place in the operator where this code is used. I tried finding replacement code from the community but it looks like they just completely stripped it out without replacement based on kubernetes-sigs/controller-runtime#1977. I tried just setting the level of controller-runtime to 0.13.1 but that has caused the above build failures. Will need to look into this more, not sure what disabling that code would do for our testing/build process.

Signed-off-by: Ben Luzarraga <luzarragaben@gmail.com>
Signed-off-by: Ben Luzarraga <luzarragaben@gmail.com>
Signed-off-by: Ben Luzarraga <luzarragaben@gmail.com>
Signed-off-by: Ben Luzarraga <luzarragaben@gmail.com>
@bitscuit
Copy link
Member

Please see the PR I have opened to update the controller-runtime and get it merged in first #373. It should make this PR a lot easier and cleaner.

bluzarraga and others added 4 commits October 13, 2023 13:38
Signed-off-by: Ben Luzarraga <luzarragaben@gmail.com>
Signed-off-by: Ben Luzarraga <luzarragaben@gmail.com>
Signed-off-by: Ben Luzarraga <luzarragaben@gmail.com>
@bluzarraga
Copy link
Member Author

bluzarraga commented Oct 13, 2023

This is 100% because of the changes to the operator suite_test.go file https://github.com/IBM/ibm-cert-manager-operator/pull/373/files#diff-9e9b69fa6c24f24eeac3c5817dd0cfe19d34194e179fac21090a522d74a2dbe5R47:

   /home/prow/go/src/github.com/IBM/ibm-cert-manager-operator/controllers/operator/suite_test.go:60
------------------------------
Ran 0 of 0 Specs in 5.570 seconds
FAIL! -- 0 Passed | 0 Failed | 0 Pending | 0 Skipped
--- FAIL: TestAPIs (5.57s)
FAIL
	github.com/ibm/ibm-cert-manager-operator/controllers/operator	coverage: 0.0% of statements
FAIL	github.com/ibm/ibm-cert-manager-operator/controllers/operator	5.589s
FAIL

I was trying to make the exact same change in this PR prior to merging in 373 and was curious if it would be problematic. From the output of the test, it does not look like anything ran but it still is marked as a failure. We need to figure out how to replace this but unfortunately, as I mentioned in an earlier comment, the previous way we ran this test was deprecated but not replaced so we will need a new approach to this test.

I'm not sure why this wasn't an issue for #373

Copy link
Member

@bitscuit bitscuit left a comment

Choose a reason for hiding this comment

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

Change the labels back for all the CRD yamls. It's blocking the test because when I ran the test locally I got more logs

Unexpected error:
      <*fmt.wrapError | 0xc0000ac240>: 
      unable to install CRDs onto control plane: unable to create CRD instances: unable to create CRD "challenges.acme.cert-manager.io": CustomResourceDefinition.apiextensions.k8s.io "challenges.acme.cert-manager.io" is invalid: [metadata.labels: Invalid value: "{{ template \"cert-manager.name\" . }}"

@bitscuit
Copy link
Member

Also make sure the run make manifests, make generate, and make bundle to regenerate things properly.

bluzarraga and others added 2 commits October 17, 2023 09:41
Signed-off-by: Ben Luzarraga <luzarragaben@gmail.com>
Signed-off-by: root <root@api.newztest.cp.fyre.ibm.com>
@bluzarraga
Copy link
Member Author

Those changes seem to have satisfied the build, thank you @bitscuit

Signed-off-by: Henry H Li <henry.h.li@ibm.com>
- so that YAML can be copied from upstream directly

Signed-off-by: Henry H Li <henry.h.li@ibm.com>
Copy link
Member

@bitscuit bitscuit left a comment

Choose a reason for hiding this comment

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

/lgtm

@ibm-ci-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bitscuit, bluzarraga

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:
  • OWNERS [bitscuit,bluzarraga]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ibm-ci-bot ibm-ci-bot merged commit 136cb3c into master Oct 18, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants