-
Notifications
You must be signed in to change notification settings - Fork 747
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: Pin k3d to use rancher/k3s:v1.21.7-k3s1 #2207
Conversation
I think running the tests in parallel is causing a race condition where the last process to write the kube context to the |
@dfarr - thanks for submitting the PR and appreciate your help! |
Sure! I took a look at k3s (not sure the relationship with k3d, but it appears as if they are sister projects) and I noticed that argo workflows is using it in their ci, I also noticed that there is a github action for it so I will give that a try. |
Signed-off-by: David Farr <david_farr@intuit.com>
run: | | ||
echo /home/runner/go/bin >> $GITHUB_PATH | ||
echo /usr/local/bin >> $GITHUB_PATH | ||
- name: Restore go build cache |
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.
From [github action/cache docs](https://github.com/actions/cache/blob/main/examples.md#go---modules. I also noticed that argo workflows is using the cache action in this manner.
.github/workflows/ci.yaml
Outdated
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-go- | ||
- name: Install and start K3S |
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 stole this verbatim from argo workflows.
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.
Would prefer to use k3d
instead of k3s
directly, as we leverage its image registry feature when doing local development.
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.
We can leave k3d in the makefile, k3s is what argo events uses and it seems to be more consistent as the last 12 ci runs on our fork have all succeeded (first try).
.github/workflows/ci.yaml
Outdated
- run: make lint | ||
- run: git diff --exit-code | ||
|
||
build-image: |
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 pulled this out into an independent step so it can be executed once rather than for each item in the e2e-tests matrix.
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.
The idea is we also want to make it one step for local e2e testing, so I'm okay with each matrix testing to build the image for testing, even though it adds several minutes.
.github/workflows/ci.yaml
Outdated
- run: make lint | ||
- run: git diff --exit-code | ||
|
||
build-image: |
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.
The idea is we also want to make it one step for local e2e testing, so I'm okay with each matrix testing to build the image for testing, even though it adds several minutes.
If I'm not wrong, the reason it becomes stable is just because of using a low version k3s image. If that's the case, I would prefer to just add The reason why |
Signed-off-by: David Farr <david_farr@intuit.com>
|
||
run: | | ||
make start | ||
EventBusDriver=${{ matrix.driver }} make test-functional |
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 is not right - it's testing against the latest
tag, which is the latest image from master branch. You could simply revert this part of changes, still use k3d and use the approach like https://github.com/argoproj/argo-events/pull/2218/files#diff-944291df2c9c06359d37cc8833d182d705c9e8c3108e7cfe132d61a06e9133ddR135.
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.
Does it matter if we tag the image as latest though? The ci pipeline isn't used for pushing images to quay.
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.
latest
image is pushed to quay.io on master branch commit.
Signed-off-by: David Farr <david_farr@intuit.com>
Signed-off-by: David Farr <david_farr@intuit.com>
@dfarr - pin the k3s version. |
Signed-off-by: David Farr <david_farr@intuit.com>
Whoops, to much trial and error I must have reverted that too by mistake |
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!
Signed-off-by: David Farr <david_farr@intuit.com>
Pinning the image to older version appears to stabilize the e2e tests