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

Use controller-runtime setup-envtest instead of fetch_ext_bins.sh #3086

Closed
sbueringer opened this issue Jan 20, 2022 · 15 comments · Fixed by #3362
Closed

Use controller-runtime setup-envtest instead of fetch_ext_bins.sh #3086

sbueringer opened this issue Jan 20, 2022 · 15 comments · Fixed by #3362
Assignees
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature. priority/backlog Higher priority than priority/awaiting-more-evidence. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@sbueringer
Copy link
Member

/kind feature

Hey folks,

just wanted to make you aware of that there is a tool by controller-runtime which can be used to setup the controller-runtime envtest binaries (https://github.com/kubernetes-sigs/controller-runtime/tree/master/tools/setup-envtest).

It's already used in core CAPI: https://github.com/kubernetes-sigs/cluster-api/blob/main/Makefile#L437-L441

I think this could be a good first issue, if you want to adopt setup-envtest.

Environment:

  • Cluster-api-provider-aws version: latest
  • Kubernetes version: (use kubectl version): -
  • OS (e.g. from /etc/os-release): -
@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. needs-priority needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jan 20, 2022
@sedefsavas
Copy link
Contributor

/triage accepted
/priority backlog
/good-first-issue
/milestone v1.x

@k8s-ci-robot
Copy link
Contributor

@sedefsavas:
This request has been marked as suitable for new contributors.

Guidelines

Please ensure that the issue body includes answers to the following questions:

  • Why are we solving this issue?
  • To address this issue, are there any code changes? If there are code changes, what needs to be done in the code and what places can the assignee treat as reference points?
  • Does this issue have zero to low barrier of entry?
  • How can the assignee reach out to you for help?

For more details on the requirements of such an issue, please see here and ensure that they are met.

If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-good-first-issue command.

In response to this:

/triage accepted
/priority backlog
/good-first-issue
/milestone v1.x

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.

@k8s-ci-robot k8s-ci-robot added this to the v1.x milestone Jan 20, 2022
@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. priority/backlog Higher priority than priority/awaiting-more-evidence. good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority labels Jan 20, 2022
@Skarlso
Copy link
Contributor

Skarlso commented Jan 30, 2022

/assign

@sedefsavas
Copy link
Contributor

@Skarlso is there any update on this issue?

@Skarlso
Copy link
Contributor

Skarlso commented Mar 22, 2022

Uh so sorry got bogged down with fever and life. I'm gonna do this this week or weekend. 😔😊 Thanks for the ping!

@Skarlso
Copy link
Contributor

Skarlso commented Mar 27, 2022

yay, got covid, so was out with high fever for most of the week. :/

But hopefully I can pick this up today. :)

@sedefsavas
Copy link
Contributor

Hope you are better. This is not urgent at all, take care.

@Skarlso
Copy link
Contributor

Skarlso commented Mar 28, 2022

Thanks, yeah it's better today. :)

@Skarlso
Copy link
Contributor

Skarlso commented Mar 28, 2022

@sbueringer Hi!

Are you sure that this is the right link? https://github.com/kubernetes-sigs/cluster-api/blob/main/Makefile#L437-L441

This is linking to a docker build make target... I think you meant to use 84-86 maybe? https://github.com/kubernetes-sigs/cluster-api/blob/main/Makefile#L81-L84

Or did this change since? I guess the Makefile was updated or stuff was moved, right?

@Skarlso
Copy link
Contributor

Skarlso commented Mar 28, 2022

ah you probably meant this part:

.PHONY: test
test: $(SETUP_ENVTEST) ## Run unit and integration tests
	KUBEBUILDER_ASSETS="$(KUBEBUILDER_ASSETS)" go test ./... $(TEST_ARGS)

@Skarlso
Copy link
Contributor

Skarlso commented Mar 28, 2022

Ah, yeah okay, I know what to do know. :)

@sbueringer
Copy link
Member Author

@Skarlso Exactly. I should have used a link based on a commit :). Our Makefile changed quite a bit recently.

@Skarlso
Copy link
Contributor

Skarlso commented Mar 29, 2022

No worries. :) I found it in the end. :) Now I'm comparing if we do anything extra in fetch_ext_bins.sh or if this can just be a drop-in replacement. And I'm wondering where, or if, the cleanup should be called.

@sbueringer
Copy link
Member Author

Looks like in CAPI we're not calling it at all. I guess so we "cache" between test runs

@Skarlso
Copy link
Contributor

Skarlso commented Mar 29, 2022

There were some interesting things here. Some deprecation, some function wasn't called at all too. ¯\_(ツ)_/¯.

I hope my changes will work. :D I also had to add a -count 1 so I force a re-run without using the cache. I thought everything is working until I realised that it's not running anything hahahaha.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature. priority/backlog Higher priority than priority/awaiting-more-evidence. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants