Repository navigation
ci test: split each dagger do to own test name - #2406
Merged
Merged
Conversation
Even though we export to GHA using per-test scopes, there are often multiple invocations of dagger do within a single test, each of which will use the same export target and thus overwrite each other's cache manifests. This meant that we would pay the price to export cache (quite expensive for large blobs), eat up our bandwidth limit uploading that cache (causing more throttles) and then never actually reuse the cache because the manifest got overwritten. For one example, the ./container.cue test in the go universe package would take ~8 seconds to execute w/out cache hits, but then spend ~30 seconds exporting cache. If you run the test on its own in GHA so that the cache manifest doesn't get overwritten, it will only take 3 seconds to run. So in this single test case we were wasting ~37 seconds most runs. There are many other test cases in the same boat. This immediately solves the problem in order to stop our CI from taking forever and getting so many throttles from GHA cache. In general, we need a better way of configuring cache that's easy to turn on and off per-plan. Signed-off-by: Erik Sipsma <[email protected]>
helderco
approved these changes
May 5, 2022
helderco
left a comment
Contributor
There was a problem hiding this comment.
I've wanted the 1 assert per test for a while, not aware of caching issues though. 🙂
Contributor
Author
|
Just as an example, after letting the universe tests run once to upload the cache w/out manifest overwrites, I re-ran them and the execution time went from 15m30s -> 6m37s. |
jlongtine
approved these changes
May 5, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Even though we export to GHA using per-test scopes, there are often
multiple invocations of dagger do within a single test, each of which
will use the same export target and thus overwrite each other's cache
manifests.
This meant that we would pay the price to export cache (quite expensive
for large blobs), eat up our bandwidth limit uploading that cache
(causing more throttles) and then never actually reuse the cache
because the manifest got overwritten.
For one example, the ./container.cue test in the go universe package
would take ~8 seconds to execute w/out cache hits, but then spend ~30
seconds exporting cache. If you run the test on its own in GHA so that
the cache manifest doesn't get overwritten, it will only take 3 seconds
to run. So in this single test case we were wasting ~37 seconds most
runs. There are many other test cases in the same boat.
This immediately solves the problem in order to stop our CI from taking
forever and getting so many throttles from GHA cache. In general, we
need a better way of configuring cache that's easy to turn on and off
per-plan.
Signed-off-by: Erik Sipsma [email protected]
Related to #2140 and #2365
Also, another lesson from this is that it was very difficult to find out any of this; our current observability into cache performance is next to nothing. I hacked together in my fork a bunch of stuff for collecting Jaeger traces in GHA that can be exported and orchestrating tests that let you more easily compare multiple test runs with different cache settings. I will prioritize productionizing this so we can more quickly diagnose these types of issues in the future.