Skip to content

Commit eeff71d

Browse files
authored
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.
1 parent aa5564d commit eeff71d

File tree

1 file changed

+7
-14
lines changed

1 file changed

+7
-14
lines changed

.github/workflows/test.yml

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -219,26 +219,19 @@ jobs:
219219
persist-credentials: false
220220
fetch-depth: '2'
221221

222-
# only run this job if the database format might have changed
222+
# Only run this job if the database format version has (likely) changed.
223+
#
224+
# If we have accidentally changed the format, but not changed the version,
225+
# we want to run with the old cached state, so this job fails.
226+
#
227+
# If we change the state path without changing the version,
228+
# this job will take a few hours, because it will do a full rebuild.
223229
- name: Get specific changed files
224230
id: changed-files-specific
225231
uses: tj-actions/[email protected]
226232
with:
227233
files: |
228-
zebra-state/**/config.rs
229234
zebra-state/**/constants.rs
230-
zebra-state/**/finalized_state.rs
231-
zebra-state/**/disk_format.rs
232-
zebra-state/**/disk_format/block.rs
233-
zebra-state/**/disk_format/chain.rs
234-
zebra-state/**/disk_format/shielded.rs
235-
zebra-state/**/disk_format/transparent.rs
236-
zebra-state/**/disk_db.rs
237-
zebra-state/**/zebra_db.rs
238-
zebra-state/**/zebra_db/block.rs
239-
zebra-state/**/zebra_db/chain.rs
240-
zebra-state/**/zebra_db/shielded.rs
241-
zebra-state/**/zebra_db/transparent.rs
242235
243236
- name: Inject slug/short variables
244237
uses: rlespinasse/github-slug-action@v4

0 commit comments

Comments
 (0)