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

ci: Use pre-built e2e/integration test binaries #3876

Merged
merged 5 commits into from
Oct 19, 2023

Conversation

cfergeau
Copy link
Contributor

This PR is a pre-requisite for #3861

When testing in prow, we currently use pre-built crc binaries on the
node running the test, but the e2e.test/integration.test binaries are rebuilt on the node
running the test.

This is problematic because the GCP image used has an older golang
(1.19) version than the builder used for the crc code. This will cause
issues if we add code to crc which requires golang 1.20+, which will
happen when we update the gvisor-tap-vsock code.

This PR uses test binaries built at the same time as the crc binary used for
testing, and does misc cleanups to the image which we are using to create our
GCP instance.

When testing in prow, we currently use pre-built crc binaries on the
node running the test, but the e2e.test/integration.test binaries are rebuilt on the node
running the test.

This is problematic because the GCP image used has an older golang
(1.19) version than the builder used for the crc code. This will cause
issues if we add code to crc which requires golang 1.20+, which will
happen when we update the gvisor-tap-vsock code.

These tests will have to be adjusted to take this change into account:
https://github.com/openshift/release/blob/master/ci-operator/step-registry/code-ready/crc/microshift/test/code-ready-crc-microshift-test-commands.sh
https://github.com/openshift/release/blob/master/ci-operator/step-registry/code-ready/crc/e2e/test/code-ready-crc-e2e-test-commands.sh
https://github.com/openshift/release/blob/master/ci-operator/step-registry/code-ready/crc/integration/test/code-ready-crc-integration-test-commands.sh
This image is only used to create a GCP/azure instance and copy files to
it, it does not need to have libvirt or genisoimage installed.
The image only needs packages which are available in ubi9/external
repos, so we can switch to ubi9 for the image we run in openshift-ci.
The e2e tests already indirectly depend on the
github.com/crc-org/pkg/crc/version go package, and the correct build
flags are used to build it. Instead of setting VERSION_TO_TEST from
flags in the Makefile, we can directly set it from the go code.
This will check that the crc binary we use is the expected one.
The check can still be disabled with `--crc-version=""`
The Makefile uses a variable named MODULEPATH for the name of the crc go
module. It currently can be overridden with an env var, but I don't
think this was ever tested, and this causes issues as some recent fedora
package sets MODULEPATH in the env.

This commit drops the environment override for MODULEPATH.
This should fix crc-org#3865
@openshift-ci
Copy link

openshift-ci bot commented Oct 17, 2023

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from cfergeau. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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

openshift-ci bot commented Oct 17, 2023

@cfergeau: 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-crc 14e51ca link true /test e2e-crc

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.

@praveenkumar praveenkumar merged commit 5863186 into crc-org:main Oct 19, 2023
13 checks passed
@cfergeau cfergeau deleted the prebuilt-test-binaries branch October 19, 2023 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants