ZcashFoundation / zebra

Zcash - Financial Privacy in Rust 🦓
https://zfnd.org/zebra/
Apache License 2.0
412 stars 106 forks source link

fix(ci): fail cache disk creation if no db version is found #8987

Closed gustavovalverde closed 3 weeks ago

gustavovalverde commented 3 weeks ago

In some cases Zebra logs might not output the database version, and thus we should avoid creating a disk without a version.

Before this change, a disk was created without a db version number, just indicating a -v-, that caused other tests to fail as an actual version was not found in their regexes.

Motivation

Specifications & References

The expected output in logs is:

Zcash network: Mainnet
running state version: 26.0.0
initial disk state version: creating.new.database

Like in this example: https://github.com/ZcashFoundation/zebra/actions/runs/11584155837/job/32255694034#step:11:614

Sometimes this is not the output as the Diagnostic Metadata is not shown: https://github.com/ZcashFoundation/zebra/actions/runs/11526479010/job/32091165009#step:11:632

Solution

Follow-up Work

PR Author's Checklist

PR Reviewer's Checklist

arya2 commented 3 weeks ago

We should confirm why the Diagnostic Metadata is not shown in some instances

The added build metadata is actually unrelated, it would only happen when Zebra is compiled with the indexer feature, which isn't currently happening in CI.

In the case of the scan_start_where_left test, the shielded scanner was formerly a component of zebrad (behind the shielded-scan feature), but now it's running without starting Zebrad. The test could be updated to spawn a zebrad child (it's currently opening the state and reading blocks from it directly, and opening the state directly will still log the running version but in an unexpected format).