Skip to content

Add instructions for setting up envtest #2504

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

Merged
merged 1 commit into from
Dec 8, 2021

Conversation

fgiloux
Copy link
Contributor

@fgiloux fgiloux commented Dec 2, 2021

Signed-off-by: Frederic Giloux [email protected]

Description of the change:

Added instructions for installing envtest, mainly a link to controller-runtime documentation.

Motivation for the change:

The first instruction $ make test fails when envtest is not available.

Reviewer Checklist

  • Docs updated or added to /doc
  • Commit messages sensible and descriptive

Sorry, something went wrong.

@openshift-ci openshift-ci bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Dec 2, 2021
@openshift-ci
Copy link

openshift-ci bot commented Dec 2, 2021

Hi @fgiloux. Thanks for your PR.

I'm waiting for a operator-framework 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.

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.

@openshift-ci openshift-ci bot requested review from awgreene and kevinrizza December 2, 2021 09:20
@fgiloux
Copy link
Contributor Author

fgiloux commented Dec 2, 2021

Also changed the instruction for go version. Recommending looking at go.mod instead of using v1.9

@njhale
Copy link
Member

njhale commented Dec 2, 2021

/ok-to-test

@openshift-ci openshift-ci bot 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 Dec 2, 2021
@njhale
Copy link
Member

njhale commented Dec 2, 2021

So the make unit target has a prereq that ensures kubebuilder is installed. make test seems to be vestigial/unused. I'd be interested in merging the two and incorporating some of the envtest changes here as part of the Makefile directly.

(see

)

Copy link
Member

@njhale njhale left a comment

Choose a reason for hiding this comment

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

/approve

@openshift-ci
Copy link

openshift-ci bot commented Dec 2, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fgiloux, njhale

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:

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 added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 2, 2021
@timflannagan
Copy link
Member

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Dec 2, 2021
@fgiloux
Copy link
Contributor Author

fgiloux commented Dec 3, 2021

So the make unit target has a prereq that ensures kubebuilder is installed. make test seems to be vestigial/unused. I'd be interested in merging the two and incorporating some of the envtest changes here as part of the Makefile directly.

(see


)

@njhale it seems that there are more things than what I expected. If I understand it properly now:

  1. document the use of make unit instead of make test
  2. amend Makefile and merge make unit and make test
  3. document the installation of envtest (the purpose of this PR). In this regard you have "kubebuilder" in the doc and in the Makefile as prerequisite but I only see the use of envtest. Am I missing something? If not the Makefile should point to the instructions for envtest installation and the kubebuilder check could be removed (keeping only api and etcd):
# ifeq (, $(wildcard $(KUBEBUILDER_ASSETS)/kubebuilder))
#       $(error kubebuilder $(KUBEBUILDER_ASSETS_ERR))
# endif

In regards to 2. I am not sure exactly of the options you need to keep so that I would rather let it to you. Let me know how you want to proceed.

@timflannagan
Copy link
Member

Just a quick note: our current workflow setup of skipping markdown-only PRs doesn't work well with required branch protection checks so despite the requisite labels being present, tide can't merge this due to those defined protection rules. I took a stab at fixing this in #2500.

@timflannagan timflannagan reopened this Dec 8, 2021
@timflannagan
Copy link
Member

(just recycling the checks as we should've merged the update to the workflows to they don't block tide from merging markdown-only PRs)

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

2 similar comments
@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit 53c7d3f into operator-framework:master Dec 8, 2021
@fgiloux fgiloux mentioned this pull request Jan 26, 2022
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. lgtm 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants