Skip to content
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

Re-use cached state with the same version from any branch #4153

Closed
teor2345 opened this issue Apr 20, 2022 · 1 comment · Fixed by #4385
Closed

Re-use cached state with the same version from any branch #4153

teor2345 opened this issue Apr 20, 2022 · 1 comment · Fixed by #4385
Assignees
Labels
A-devops Area: Pipelines, CI/CD and Dockerfiles C-enhancement Category: This is an improvement I-slow Problems with performance or responsiveness lightwalletd any work associated with lightwalletd

Comments

@teor2345
Copy link
Collaborator

teor2345 commented Apr 20, 2022

Motivation

In PR #4074, we check for unexpected state versions before running Google Cloud tests.

But we want tests to re-use the previous cached state with the same version.

Designs

We want to re-use the cached state from any branch, as long as:

  • the state version is the same, and
  • the state kind (checkpoint or tip) is the same.

If there is a state with that version on main, and on another branch, use the one from main.

If a cached state with that version can't be found, the state should be rebuilt.
(We currently check for changes to the state version constants.rs Rust file, but we should check for a matching cached state version instead.)

And then the tests should be run with that new state.

Out of Scope

Old cached state versions should be cleaned up:

  • when the main branch has a higher state version.

I'm not sure what we should do if a previous cached state version has a bug. But we can make this decision later, because we only have one state version change planned, and it is a low priority.

As a workaround, we can change the state version in the code, which will regenerate a new cached state.

Related Work

@teor2345 teor2345 added A-devops Area: Pipelines, CI/CD and Dockerfiles C-enhancement Category: This is an improvement S-needs-triage Status: A bug report needs triage P-Medium ⚡ I-slow Problems with performance or responsiveness lightwalletd any work associated with lightwalletd labels Apr 20, 2022
@ftm1000
Copy link

ftm1000 commented May 5, 2022

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-enhancement Category: This is an improvement I-slow Problems with performance or responsiveness lightwalletd any work associated with lightwalletd
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants