Improve TUF test reliability and speed #1401
Merged
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.
I've noticed a lot of flaky errors with the TUF tests recently, and I think it's because they make heavier use of
CopyBinary
, which copies the test executable. (Example failure: https://github.com/kolide/launcher/actions/runs/6508335416/job/17677493575.) This PR tries out symlinking instead of copying to see if we experience fewer errors that way.Also, the TUF tests are super slow. I determined this was because of the compression step -- locally, it takes 8 seconds per compression for me, but I suspect longer in the CI pipeline. Each usage of the TUF CI server (six separate instances) performs three compressions, so 18 compressions per test run. This PR embeds pre-compressed test binaries to significantly speed up the TUF tests.
Prior to this change, TUF autoupdater tests in the pipeline were taking an average of 209 seconds, or about 3.5 minutes (averaged over the most recent 5 CI jobs). In this PR, they took an average of just under 10 seconds.