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

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

Merged
merged 1 commit into from
Nov 4, 2024

Conversation

gustavovalverde
Copy link
Member

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

  • If the version is not found, exit the Get database versions from logs step using an exit 1

Follow-up Work

  • We should confirm why the Diagnostic Metadata is not shown in some instances
  • Manually fix the version numbers in the already created disks in GCP

PR Author's Checklist

  • The PR name will make sense to users.
  • The PR provides a CHANGELOG summary.
  • The solution is tested.
  • The documentation is up to date.
  • The PR has a priority label.

PR Reviewer's Checklist

  • The PR Author's checklist is complete.
  • The PR resolves the issue.

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.
@gustavovalverde gustavovalverde added C-bug Category: This is a bug A-devops Area: Pipelines, CI/CD and Dockerfiles I-integration-fail Continuous integration fails, including build and test failures A-script Area: Script handling P-Critical 🚑 labels Nov 4, 2024
@gustavovalverde gustavovalverde self-assigned this Nov 4, 2024
@gustavovalverde gustavovalverde requested a review from a team as a code owner November 4, 2024 08:54
@gustavovalverde gustavovalverde requested review from arya2 and removed request for a team November 4, 2024 08:54
@github-actions github-actions bot added the C-trivial Category: A trivial change that is not worth mentioning in the CHANGELOG label Nov 4, 2024
@arya2
Copy link
Contributor

arya2 commented Nov 4, 2024

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).

mergify bot added a commit that referenced this pull request Nov 4, 2024
@mergify mergify bot merged commit 75fae66 into main Nov 4, 2024
142 of 148 checks passed
@mergify mergify bot deleted the fix-state-versioning branch November 4, 2024 18:42
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 A-script Area: Script handling C-bug Category: This is a bug C-trivial Category: A trivial change that is not worth mentioning in the CHANGELOG I-integration-fail Continuous integration fails, including build and test failures P-Critical 🚑
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants