Skip to content

Remove cardano-db-v2 and make cardano-db --backend v2 stable #2595

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

Merged
merged 5 commits into from
Jun 20, 2025

Conversation

turmelclem
Copy link
Collaborator

@turmelclem turmelclem commented Jun 19, 2025

Content

This PR includes...

  • Make cardano-db --backend v2 stable
  • Remove command cardano-db-v2 and use cardano-db --backend v2 instead in in CI and e2e tests
  • use cardano-db --backend v1 instead of default backend version in CI and e2e tests
  • rework some print for cardano-db download and verify commands

Pre-submit checklist

  • Branch
    • Tests are provided (if possible)
    • Crates versions are updated (if relevant)
    • CHANGELOG file is updated (if relevant)
    • Commit sequence broadly makes sense
    • Key commits have useful messages
  • PR
    • All check jobs of the CI have succeeded
    • Self-reviewed the diff
    • Useful pull request description
    • Reviewer requested
  • Documentation
    • Update README file (if relevant)
    • Update documentation website (if relevant)
    • Add dev blog post (if relevant)
    • Add ADR blog post or Dev ADR entry (if relevant)
    • No new TODOs introduced

Relate to #2577

@turmelclem turmelclem self-assigned this Jun 19, 2025
@turmelclem turmelclem force-pushed the ctl/2577-stabilize-cardano-db-v2 branch from 58e6305 to 483c30b Compare June 19, 2025 14:22
Copy link

github-actions bot commented Jun 19, 2025

Test Results

    3 files  ±0    102 suites  ±0   16m 18s ⏱️ -24s
2 035 tests  - 1  2 035 ✅  - 1  0 💤 ±0  0 ❌ ±0 
4 206 runs   - 3  4 206 ✅  - 3  0 💤 ±0  0 ❌ ±0 

Results for commit 272ac01. ± Comparison against base commit f28a611.

This pull request removes 1 test.
mithril-client-cli::bin/mithril-client ‑ tests::fail_if_cardano_database_v2_command_is_used_without_unstable_flag

♻️ This comment has been updated with latest results.

@turmelclem turmelclem force-pushed the ctl/2577-stabilize-cardano-db-v2 branch 2 times, most recently from 6d5ca51 to e195305 Compare June 19, 2025 15:26
@turmelclem turmelclem temporarily deployed to testing-preview June 19, 2025 15:34 — with GitHub Actions Inactive
@turmelclem turmelclem marked this pull request as draft June 19, 2025 15:41
@turmelclem turmelclem changed the title WIP: Remove cardano-db-v2 and make cardano-db --backend v2 stable Remove cardano-db-v2 and make cardano-db --backend v2 stable Jun 19, 2025
@turmelclem turmelclem temporarily deployed to testing-preview June 20, 2025 08:05 — with GitHub Actions Inactive
@turmelclem turmelclem force-pushed the ctl/2577-stabilize-cardano-db-v2 branch from 6ee707f to c5139cb Compare June 20, 2025 09:08
@turmelclem turmelclem temporarily deployed to testing-preview June 20, 2025 09:23 — with GitHub Actions Inactive
@turmelclem turmelclem marked this pull request as ready for review June 20, 2025 10:16
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR removes the deprecated cardano-db-v2 commands and consolidates backend handling so that the stable cardano-db command accepts a --backend option (v1 or v2). Key changes include:

  • Updating CLI command construction to always include an explicit --backend option.
  • Removing the cardano-db-v2 modules, tests, and documentation references.
  • Revising user-facing messages and CI workflows to reflect the new command usage.

Reviewed Changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated no comments.

Show a summary per file
File Description
mithril-test-lab/mithril-end-to-end/src/mithril/client.rs Adjusts argument composition to include explicit backend flags.
mithril-client-cli/src/main.rs Removes deprecated cardano-db-v2 commands and associated tests.
mithril-client-cli/src/commands/cardano_db/{show, list, verify, download, mod.rs} Updates command implementations to use the unified --backend option.
docs/website/root/manual/**/* Revises documentation to eliminate references to cardano-db-v2.
.github/workflows/test-client.yml Updates CI commands to use the new --backend flags and removes --unstable.
Comments suppressed due to low confidence (5)

mithril-test-lab/mithril-end-to-end/src/mithril/client.rs:225

  • Ensure that replacing the '--unstable' flag with the explicit '--backend' option is compatible with all client use cases and that any clients relying on the old flag semantics are updated accordingly.
                cmd.cli_arg(),

mithril-client-cli/src/main.rs:205

  • Confirm that all documentation and error messages referencing the old cardano-db-v2 command are removed or updated to prevent user confusion.
    CardanoStakeDistribution(CardanoStakeDistributionCommands),

mithril-client-cli/src/commands/cardano_db/verify.rs:170

  • Ensure that the simplified verification message is consistent with similar messages in other modules, so users receive a unified experience.
            println!("Cardano database snapshot '{snapshot_hash}' archives have been successfully verified. Immutable files have been successfully checked with Mithril.");

docs/website/root/manual/getting-started/bootstrap-cardano-node.md:478

  • [nitpick] Verify that this updated message matches the output of the CLI across all similar commands in order to ensure consistency.
Cardano db 'a1b5e6f43521fd9c5f55e3d6bf27dc4a62f43980681cb67e28cc40582a0d1974' has been unpacked and successfully checked with Mithril.

.github/workflows/test-client.yml:256

  • Double-check that all CI workflow steps consistently reference the updated '--backend' flag and have no residual usage of the '--unstable' flag.
        run: ./mithril-client --origin-tag CI cardano-db snapshot show --backend v2 $CARDANO_DATABASE_V2_SNAPSHOT_HASH

Copy link
Member

@jpraynaud jpraynaud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@turmelclem turmelclem force-pushed the ctl/2577-stabilize-cardano-db-v2 branch from c5139cb to d72a551 Compare June 20, 2025 12:21
@turmelclem turmelclem temporarily deployed to testing-preview June 20, 2025 12:30 — with GitHub Actions Inactive
Copy link
Collaborator

@Alenar Alenar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@turmelclem turmelclem force-pushed the ctl/2577-stabilize-cardano-db-v2 branch from d72a551 to 96aa33b Compare June 20, 2025 12:44
* mithril-client-cli from `0.12.13` to `0.12.14`
* mithril-end-to-end from `0.4.91` to `0.4.92`
@turmelclem turmelclem temporarily deployed to testing-preview June 20, 2025 13:00 — with GitHub Actions Inactive
@turmelclem turmelclem force-pushed the ctl/2577-stabilize-cardano-db-v2 branch from 5cc247e to b9ae69e Compare June 20, 2025 13:49
@turmelclem turmelclem force-pushed the ctl/2577-stabilize-cardano-db-v2 branch from b9ae69e to 272ac01 Compare June 20, 2025 13:54
@turmelclem turmelclem temporarily deployed to testing-preview June 20, 2025 14:06 — with GitHub Actions Inactive
@turmelclem turmelclem merged commit 7827a52 into main Jun 20, 2025
66 of 67 checks passed
@turmelclem turmelclem deleted the ctl/2577-stabilize-cardano-db-v2 branch June 20, 2025 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants