Skip to content

Conversation

@lentzi90
Copy link
Contributor

What this PR does / why we need it:

The controller test suite was disabled due to missing kubebuilder
assets. These are now installed before running the tests. There are no
tests yet but now it is possible to add some.

Special notes for your reviewer:

  1. Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.

TODOs:

  • squashed commits
  • if necessary:
    • includes documentation
    • adds unit tests

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Mar 24, 2022
@k8s-ci-robot
Copy link
Contributor

Hi @lentzi90. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

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.

@netlify
Copy link

netlify bot commented Mar 24, 2022

Deploy Preview for kubernetes-sigs-cluster-api-openstack ready!

Name Link
🔨 Latest commit 7dad064
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-cluster-api-openstack/deploys/6242f12e1a39040008d1017c
😎 Deploy Preview https://deploy-preview-1183--kubernetes-sigs-cluster-api-openstack.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Mar 24, 2022
@apricote
Copy link
Member

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Mar 24, 2022
@seanschneeweiss
Copy link
Contributor

Thank you for adding this.
How would you think about doing it similar to CAPI?
https://github.com/kubernetes-sigs/cluster-api/blob/89a1613756381e15568a8a9157a7ea20c7561738/Makefile#L493-L495
Sean Schneeweiss sean.schneeweiss@mercedes-benz.com, Daimler TSS GmbH, Provider Information

@lentzi90
Copy link
Contributor Author

Thank you for adding this. How would you think about doing it similar to CAPI? https://github.com/kubernetes-sigs/cluster-api/blob/89a1613756381e15568a8a9157a7ea20c7561738/Makefile#L493-L495 Sean Schneeweiss sean.schneeweiss@mercedes-benz.com, Daimler TSS GmbH, Provider Information

Great, had not seen that! I will do it in the same way then. 🙂

@lentzi90 lentzi90 force-pushed the lentzi90/enable-controller-tests branch from 07b5145 to f7ce2d4 Compare March 24, 2022 12:44
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Mar 24, 2022
@lentzi90 lentzi90 force-pushed the lentzi90/enable-controller-tests branch from f7ce2d4 to 16e97fc Compare March 24, 2022 13:26
@jichenjc
Copy link
Contributor

looks like error from

https://storage.googleapis.com/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_cluster-api-provider-openstack/1183/pull-cluster-api-provider-openstack-test/1506986057416052736/build-log.txt

pkg/cloud/services/provider/provider.go:31:2: could not import k8s.io/apimachinery/pkg/types (-: could not load export data: cannot import "k8s.io/apimachinery/pkg/types" (unstable iexport format version 2, just rebuild compiler and std library), export data is newer version - update tool) (typecheck)
	"k8s.io/apimachinery/pkg/types"

is not caused by golint issue? caused by change here?

@lentzi90
Copy link
Contributor Author

@jichenjc I don't understand this error unfortunately. And I cannot reproduce it locally. It looks like others have similar issues and it should hopefully be fixed in #1184.

@lentzi90 lentzi90 force-pushed the lentzi90/enable-controller-tests branch 2 times, most recently from 360f277 to d1d4ae5 Compare March 28, 2022 07:07
Copy link
Contributor

@mdbooth mdbooth left a comment

Choose a reason for hiding this comment

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

This is looks great, and I'd like to massively expand our envtest coverage.

Do we currently have any envtests? It would be good to see the framework being exercised by at least one test.

@lentzi90
Copy link
Contributor Author

This is looks great, and I'd like to massively expand our envtest coverage.

Do we currently have any envtests? It would be good to see the framework being exercised by at least one test.

Thanks!
I don't think there are any tests currently (but I could easily have missed some). My plan was to try adding some for the openstackcluster_controller in a follow up PR. Would it be better to add something already in this PR?

@mdbooth
Copy link
Contributor

mdbooth commented Mar 28, 2022

This is looks great, and I'd like to massively expand our envtest coverage.
Do we currently have any envtests? It would be good to see the framework being exercised by at least one test.

Thanks! I don't think there are any tests currently (but I could easily have missed some). My plan was to try adding some for the openstackcluster_controller in a follow up PR. Would it be better to add something already in this PR?

I'd prefer it: it would test the test 😀 Maybe add the simplest imaginable envtest? Basically it would just have to bounce something off the apiserver to demonstrate that everything is wired up correctly.

@jichenjc
Copy link
Contributor

Maybe add the simplest imaginable envtes

+1 to this :) , we need test the test and make sure the added code works fine ~ thanks for the work on this

@lentzi90 lentzi90 force-pushed the lentzi90/enable-controller-tests branch from d1d4ae5 to 33dc769 Compare March 29, 2022 08:37
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 29, 2022
@lentzi90 lentzi90 force-pushed the lentzi90/enable-controller-tests branch from 33dc769 to 7dad064 Compare March 29, 2022 08:46
The controller test suite was disabled due to missing kubebuilder
assets. These are now installed before running the tests.
A simple sanity check test is also added to confirm that envTest is
working.
@lentzi90
Copy link
Contributor Author

/retest

@lentzi90 lentzi90 force-pushed the lentzi90/enable-controller-tests branch from 977e041 to 7dad064 Compare March 29, 2022 11:44
@lentzi90
Copy link
Contributor Author

E2e test is broken. Waiting on #1185 to fix it.

@tobiasgiese
Copy link
Member

/retest

@tobiasgiese
Copy link
Member

/approve

Thanks for enabling the controller test suite 👍🏻

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lentzi90, tobiasgiese

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details 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 the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 30, 2022
@jichenjc
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 31, 2022
@k8s-ci-robot k8s-ci-robot merged commit 5d7d0a3 into kubernetes-sigs:main Mar 31, 2022
@lentzi90 lentzi90 deleted the lentzi90/enable-controller-tests branch March 31, 2022 07:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants