Use stestr to prune its own history in CI jobs#16364
Conversation
|
One or more of the following people are relevant to this code:
|
jakelishman
left a comment
There was a problem hiding this comment.
One comment, but then let's check the cache size on the Windows job after this to verify before merging.
Coverage Report for CI Build 26896151341Warning Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes. Coverage decreased (-0.04%) to 87.483%Details
Uncovered ChangesNo uncovered changes found. Coverage Regressions566 previously-covered lines in 11 files lost coverage.
Coverage Stats
💛 - Coveralls |
In CI test jobs we cache the stestr timing data to provide a scheduler hint to stestr for future runs. stestr will use this to improve the distribution of tests across the workers to improve the balance of tests between the parallel workers improving throughput. However, the timing data is stored in stestr's repository (the .stestr directory in the repo) along with the subunit streams of all the previous runs. We don't need these subunit streams as they contain the full result and output from all the tests run and we won't use that for scheduling; it's mainly for local debugging purposes. These streams also can get quite large as they contain all the stdout, stderr, and logging from every test. To minimize the size of the data we're caching the CI jobs were configured to filter the stestr repository and remove the subunit streams and only leave the timing data. This was being done manually though and was likely broken on Windows. Since stestr 3.2.0 (released in 2021: https://github.com/mtreinish/stestr/releases/tag/3.2.0 ) there has been a stestr history command to manage the repository's historical subunit streams. To avoid the error prone manual filtering this just switches to use this command instead. It does require raising our lower bound on the stestr version supported for running tests. But since the release is from > 5 years ago that shouldn't be a big deal.
19a1232 to
9f9f45b
Compare
jakelishman
left a comment
There was a problem hiding this comment.
Assuming this passes now, and the cache size of all the jobs is back in the ~3MB mark like we expect, this is good to go.
Thanks for fixing the apostrophe in the commit message too!
|
The thing I just realized (mainly because @ShellyGarion keeps reminding me to add performance release notes on my PRs). Is there a build system release note needed for the stestr version change? |
|
Oh yeah, there is a |
|
I'll remove "stable backport potential" for now just out of caution, since it's not super critical on |
In CI test jobs we cache the stestr timing data to provide a scheduler hint to stestr for future runs. stestr will use this to improve the distribution of tests across the workers to improve the balance of tests between the parallel workers improving throughput. However, the timing data is stored in stestr's repository (the .stestr directory in the repo) along with the subunit streams of all the previous runs. We don't need these subunit streams as they contain the full result and output from all the tests run and we won't use that for scheduling; it's mainly for local debugging purposes. These streams also can get quite large as they contain all the stdout, stderr, and logging from every test. To minimize the size of the data we're caching the CI jobs were configured to filter the stestr repository and remove the subunit streams and only leave the timing data. This was being done manually though and was likely broken on Windows. Since stestr 3.2.0 (released in 2021: https://github.com/mtreinish/stestr/releases/tag/3.2.0 ) there has been a stestr history command to manage the repository's historical subunit streams. To avoid the error prone manual filtering this just switches to use this command instead. It does require raising our lower bound on the stestr version supported for running tests. But since the release is from > 5 years ago that shouldn't be a big deal.
AI/LLM disclosure