Skip to content

Bug 2032926: Bump envtest version#154

Merged
openshift-merge-robot merged 1 commit intoopenshift:masterfrom
Fedosin:envtest
Dec 20, 2021
Merged

Bug 2032926: Bump envtest version#154
openshift-merge-robot merged 1 commit intoopenshift:masterfrom
Fedosin:envtest

Conversation

@Fedosin
Copy link
Copy Markdown
Contributor

@Fedosin Fedosin commented Dec 10, 2021

Instead of a script, envtest started shipping as a compiled binary, so we have to updated our Makefile accordingly.

This bump is required to port CCCMO to k8s 1.23, because unit tests fail otherwise.

@JoelSpeed
Copy link
Copy Markdown
Contributor

Please add appropriate PR descriptions to all PRs, even if they are minimal. I can see what you are doing with this, but I don't know why.

@Fedosin Fedosin force-pushed the envtest branch 7 times, most recently from 25d1427 to e21989a Compare December 17, 2021 18:52
Comment thread Makefile Outdated
unit:
hack/unit-tests.sh
unit: envtest
PATH=$(PATH):$(KUBEBUILDER_ASSETS) go test ./... -coverprofile cover.out
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It looks like to override the default binaries path (/usr/local/kubebuilder/bin) we need to set the KUBEBUILDER_ASSETS env var rather than adding its value to the PATH env.
ref: https://github.com/kubernetes-sigs/controller-runtime/blob/11917e9d90625b51e5dab16b4cf20934971e2f08/pkg/envtest/server.go#L44

Suggested change
PATH=$(PATH):$(KUBEBUILDER_ASSETS) go test ./... -coverprofile cover.out
PATH="$(PATH)" KUBEBUILDER_ASSETS="$(KUBEBUILDER_ASSETS)" go test ./... -coverprofile cover.out

Copy link
Copy Markdown
Member

@damdo damdo left a comment

Choose a reason for hiding this comment

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

I tried to fix the unit tests that are failing for this PR, locally, and with the two changes I'm suggesting above, they are now passing for me.

Comment thread Makefile
ENVTEST = $(shell pwd)/bin/setup-envtest
.PHONY: envtest
envtest: ## Download envtest-setup locally if necessary.
$(call go-get-tool,$(ENVTEST),sigs.k8s.io/controller-runtime/tools/setup-envtest@latest)
Copy link
Copy Markdown
Member

@damdo damdo Dec 20, 2021

Choose a reason for hiding this comment

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

Is it worth pinning setup-envtest here to the current controller-runtime version we use in go.mod (i.e. v0.9.6)? Maybe we could have it in a variable at the top next to the ENVTEST_K8S_VERSION one.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Currently kubebuilder generates it with latest for all new projects. I don't think we should change this pattern.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I see, ok sounds good then 👍

@Fedosin Fedosin force-pushed the envtest branch 8 times, most recently from f00c084 to 0d5fe9a Compare December 20, 2021 17:24
@Fedosin
Copy link
Copy Markdown
Contributor Author

Fedosin commented Dec 20, 2021

/test unit

@Fedosin Fedosin changed the title Bump envtest version Bug 2032926: Bump envtest version Dec 20, 2021
@openshift-ci openshift-ci Bot added bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. labels Dec 20, 2021
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Dec 20, 2021

@Fedosin: This pull request references Bugzilla bug 2032926, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.10.0) matches configured target release for branch (4.10.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

Requesting review from QA contact:
/cc @sunzhaohua2

Details

In response to this:

Bug 2032926: Bump envtest version

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 a review from sunzhaohua2 December 20, 2021 17:46
Instead of a script envtest started shipping as a compiled binary,
so we have to updated our Makefile accordingly.

This bump is required to port to k8s 1.23, because unit tests fail
otherwise.
@damdo
Copy link
Copy Markdown
Member

damdo commented Dec 20, 2021

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Dec 20, 2021
Copy link
Copy Markdown
Contributor

@elmiko elmiko left a comment

Choose a reason for hiding this comment

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

i gave this a test drive locally, everything worked as expected, thanks Mike!
/approve

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Dec 20, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: elmiko

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

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 20, 2021
@openshift-merge-robot openshift-merge-robot merged commit fb3fd70 into openshift:master Dec 20, 2021
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Dec 20, 2021

@Fedosin: Some pull requests linked via external trackers have merged:

The following pull requests linked via external trackers have not merged:

These pull request must merge or be unlinked from the Bugzilla bug in order for it to move to the next state. Once unlinked, request a bug refresh with /bugzilla refresh.

Bugzilla bug 2032926 has not been moved to the MODIFIED state.

Details

In response to this:

Bug 2032926: Bump envtest version

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

openshift-ci Bot commented Dec 20, 2021

@Fedosin: The following tests 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-azure-upgrade 1075d21 link false /test e2e-azure-upgrade
ci/prow/e2e-azure 1075d21 link false /test e2e-azure
ci/prow/e2e-aws-ccm-install 1075d21 link false /test e2e-aws-ccm-install

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

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. bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants