Skip to content

fix(ci): Increase test coverage of state rebuild #4020

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 1, 2022

Conversation

teor2345
Copy link
Contributor

@teor2345 teor2345 commented Mar 31, 2022

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

  • Only do a rebuild when state::constants changes, because it contains the database format version

This 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

  • CI works

Only run the state rebuild job if the database format version has (likely) changed.

If we have accidentally changed the format, but not changed the version,
we want to run with the old cached state, so this job fails.

If we change the state path without changing the version,
this job will take a few hours, because it will do a full rebuild.
@teor2345 teor2345 added C-bug Category: This is a bug A-devops Area: Pipelines, CI/CD and Dockerfiles P-High 🔥 I-slow Problems with performance or responsiveness lightwalletd any work associated with lightwalletd labels Mar 31, 2022
@teor2345 teor2345 self-assigned this Mar 31, 2022
@teor2345 teor2345 requested a review from a team as a code owner March 31, 2022 21:49
@teor2345 teor2345 removed the request for review from a team March 31, 2022 23:07
Copy link
Collaborator

@conradoplg conradoplg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

mergify bot added a commit that referenced this pull request Apr 1, 2022
@mergify mergify bot merged commit eeff71d into main Apr 1, 2022
@mergify mergify bot deleted the fix-state-rebuild-coverage branch April 1, 2022 16:02
Copy link
Contributor

@dconnolly dconnolly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-devops Area: Pipelines, CI/CD and Dockerfiles C-bug Category: This is a bug I-slow Problems with performance or responsiveness lightwalletd any work associated with lightwalletd
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants