ci: improve performance by eliminating redundancies #14028
+14
−12
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
There's three sources of redundancy that are slowing down CI builds:
make install
is being redundantly run three times for each E2E test:argo-workflows/.github/workflows/ci-build.yaml
Lines 349 to 350 in 6699ab3
make start
:argo-workflows/Makefile
Line 547 in 6699ab3
argo-workflows/tasks.yaml
Line 39 in 6699ab3
controller
andcli
are prerequisites ofmake start
, and listed as prerequisites in Kit.GOMODCACHE
. I think the problem is the cache is usually populated by thedocs
workflow, which doesn't fetch all the Go dependencies (example), so they aren't included whenactions/setup-go
saves the cache.Modifications
This eliminates the first two redundancies by removing the unnecessary prerequisites from the
Makefile
and the redundantmake install
step inci-build.yaml
. Also, I addedmake --touch dist/*
to mark everything as up-to-date so the binaries aren't rebuilt (docs). For the issue with the go dependencies not being in the cache, I updateddocs.yaml
to rungo mod download
to ensure they're included.Also, I consolidated
Start controller/API
andWait for controller to be up
steps so you can see everything Kit is doing in the logs for the former, which will help prevent these kind of oversights in the future. The reason I didn't catch the issue with binaries being rebuilt in #14012 is because the logs are discarded unless the build failed (in which case they were visible in theFailure debug - Controller/API logs
step).Verification
Wait for E2E tests