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

Ensure downstream CI can run envtest successfully #72

Merged
merged 2 commits into from Sep 29, 2022

Conversation

timflannagan
Copy link
Contributor

Closes #70.

Updates the Makefile invocation when running the unit tests to ensure we're able to install the requisite envtest executables in a directory path that's writable in CI. Add a barebones testing suite to ensure we're not regressing on envtest capability.

Signed-off-by: timflannagan <timflannagan@gmail.com>
Signed-off-by: timflannagan <timflannagan@gmail.com>
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 28, 2022
@@ -113,9 +113,10 @@ lint: golangci-lint
GOLANGCI_LINT_CACHE=/tmp/golangci-cache $(GOLANGCI_LINT) run

UNIT_TEST_DIRS=$(shell go list ./... | grep -v /test/)
ENVTEST_OPTS ?= $(if $(OPENSHIFT_CI),--bin-dir=/tmp)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I realize that OPENSHIFT_CI could be set to "false" as we're not checking the value of that variable. That said, the existence of this variable should be sufficient for now given local environments are likely setting it, and CI is guaranteed to have it specified.

@timflannagan
Copy link
Contributor Author

This doesn't affect anything user facing, and only affects our dev testing suite. Manually the requisite labels.

/label px-approved
/label docs-approved
/label qe-approved

@openshift-ci openshift-ci bot added px-approved Signifies that Product Support has signed off on this PR docs-approved Signifies that Docs has signed off on this PR qe-approved Signifies that QE has signed off on this PR labels Sep 29, 2022
Copy link
Contributor

@awgreene awgreene left a comment

Choose a reason for hiding this comment

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

Looks good! Had one question.

Comment on lines -52 to +65
CRDDirectoryPaths: []string{filepath.Join("..", "config", "crd", "bases")},
CRDDirectoryPaths: []string{"../manifests", "../vendor/github.com/openshift/api/config/v1/"},
Copy link
Contributor

Choose a reason for hiding this comment

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

Why did you choose to remove the filepath.Join call?

Copy link
Contributor

Choose a reason for hiding this comment

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

Or rather, why abandon using filepath.Join.

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Sep 29, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 29, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: awgreene, timflannagan

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

openshift-ci bot commented Sep 29, 2022

@timflannagan: The following test 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-aws-techpreview cc4f380 link false /test e2e-aws-techpreview

Full PR test history. Your PR dashboard.

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.

@openshift-merge-robot openshift-merge-robot merged commit baa1cb0 into openshift:main Sep 29, 2022
@timflannagan timflannagan deleted the fix-envtest branch September 29, 2022 14:15
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. docs-approved Signifies that Docs has signed off on this PR lgtm Indicates that a PR is ready to be merged. px-approved Signifies that Product Support has signed off on this PR qe-approved Signifies that QE has signed off on this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Envtest cannot successfully start in CI environments
3 participants