-
Notifications
You must be signed in to change notification settings - Fork 187
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
Add setup-envtest in Makefile #404
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that combined with this PR we should be able to move over to the actions/envtest
from fluxcd/pkg
?
Use setup-envtest for installing the binaries required for using envtest. The latest envtest binaries for k8s v1.21.2 are not compatible with kubebuilder < v3, which results in envtest suite test tear down failure. envtest fails to stop the kube-apiserver. ``` timeout waiting for process kube-apiserver to stop ``` Pin to k8s v1.19.2 envtest binaries that work with kubebuilder v2. Signed-off-by: Sunny <darkowlzz@protonmail.com>
7aa83df
to
c975d37
Compare
I've added a local github action for envtest to avoid installing go on the host for installing setup-envtest (GOROOT from the host is passed on to the run-test container and the builds in the container fails because the GOROOT passed from host doesn't exist inside the container). This will be moved to the Pasting some log lines below for future reference(the github actions logs will get deleted after a few months):
A workaround for this was to clean More details about the changes are in the commit messages. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great, please open a PR for updating the action in fluxcd/pkg.
Thanks @darkowlzz 🏅
Created fluxcd/pkg#138 to update the action in fluxcd/pkg. In fluxcd/pkg, since the tests are run on host, it uncovered an issue with the |
Use fluxcd/pkg/actions/envtest to setup envtest. Since the run-test action runs in a container, the host $PATH is not passed to the test container. The ENV directive in actions/run-tests Dockerfile is used to append the PATH with envtest binary path. This helps avoid redownload of the envtest binaries when it's not found in the path via the Makefile targets. Signed-off-by: Sunny <darkowlzz@protonmail.com>
a2f470f
to
cb3fb3b
Compare
Updated to use fluxcd/pkg/actions/envtest 🙂 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks @darkowlzz ☕
Use setup-envtest for installing the binaries required for using
envtest.
The latest envtest binaries for k8s v1.21.2 are not compatible with
kubebuilder < v3, which results in envtest suite test tear down
failure. envtest fails to stop the kube-apiserver.
Pin to k8s v1.19.2 envtest binaries that work with kubebuilder v2.