fix(ci): Increase test coverage of state rebuild #4020
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.
Motivation
We only want to run the state rebuild job if the database format version has changed.
If we have accidentally changed the format, but not changed the version, we want to run with the old cached state, so the job fails.
(If we change the state path without changing the version, the job will take a few hours, because it will do a full rebuild. So it won't fail on any format changes if the path also changes. This is a rare case.)
Solution
state::constants
changes, because it contains the database format versionThis should also speed up a whole bunch of PRs.
I'd like to get this merged before we merge any more database changes, I'll set ZenHub blockers.
Review
This is a high priority PR, because it increases coverage. (And increases CI speed.)
It is low risk, because it just stops running state rebuilds, and we're not changing the state for NU5.
I'd like @dconnolly or @conradoplg to double-check I got the coverage logic right here.
Reviewer Checklist