From eeff71d0bd27b839ea3c025201fd914ab0eb39f2 Mon Sep 17 00:00:00 2001 From: teor Date: Sat, 2 Apr 2022 02:02:55 +1000 Subject: [PATCH] Increase test coverage of state rebuild (#4020) 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. --- .github/workflows/test.yml | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 41ae45f4b..a6bec5a5d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -219,26 +219,19 @@ jobs: persist-credentials: false fetch-depth: '2' - # only run this job if the database format might have changed + # Only run this 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. - name: Get specific changed files id: changed-files-specific uses: tj-actions/changed-files@v18.4 with: files: | - zebra-state/**/config.rs zebra-state/**/constants.rs - zebra-state/**/finalized_state.rs - zebra-state/**/disk_format.rs - zebra-state/**/disk_format/block.rs - zebra-state/**/disk_format/chain.rs - zebra-state/**/disk_format/shielded.rs - zebra-state/**/disk_format/transparent.rs - zebra-state/**/disk_db.rs - zebra-state/**/zebra_db.rs - zebra-state/**/zebra_db/block.rs - zebra-state/**/zebra_db/chain.rs - zebra-state/**/zebra_db/shielded.rs - zebra-state/**/zebra_db/transparent.rs - name: Inject slug/short variables uses: rlespinasse/github-slug-action@v4