Skip to content

test(e2e): IPFS support - #3528

Merged
Alenar merged 10 commits into
mainfrom
djo/3457/ipfs/adapt-e2e
Sep 9, 2026
Merged

test(e2e): IPFS support#3528
Alenar merged 10 commits into
mainfrom
djo/3457/ipfs/adapt-e2e

Conversation

@Alenar

@Alenar Alenar commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

Content

This PR wires the private local ipfs-devnet (#3434) into the mithril-end-to-end test runner, so the IPFS artifact-distribution path (uploaded from mithril-aggregator, download from mithril-client) can now be tested end-to-end.

  • Adds a --use-ipfs CLI option that bootstraps and starts an IPFS devnet swarm alongside the Cardano devnet, and stops it when the test completes (IPFS node output is streamed to the test logs the same way the other devnet processes are).
  • Propagates the IPFS node endpoints to the Mithril infrastructure: one Kubo node per aggregator (via IPFS_RPC_SERVER_CONFIG) plus one dedicated node for the mithril-client.
  • Extends the Cardano DB v2 download/verification check to also exercise the IPFS download path (--ipfs-rpc-url) alongside the existing local-storage check.
  • Adds a Detached mode (--ipfs-devnet-to-attach <path>) to attach to an already-running IPFS devnet instead of spawning a new one. The runner validates the swarm has enough nodes, always starts it (as it does nothing it's already started), but never stops it, leaving it running independently of the test run.
  • Minor internal refactor: renamed devnet::runner to devnet::cardano and moved RetryableDevnetError to devnet::mod so it can be shared with the new devnet::ipfs module.
  • README: Documents --use-ipfs/--ipfs-devnet-to-attach, and (while at it) some of the previously-undocumented multi-aggregator and DMQ options.
  • CI: add one new scenario with IPFS support to the E2E matrix.

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)
    • No new TODOs introduced

Comments

To try it locally (from the project root):

cargo run -p mithril-end-to-end -- -vvv --bin-directory target/x86_64-unknown-linux-musl/release/ --devnet-scripts-directory=mithril-test-lab/cardano-devnet/ --use-ipfs --ipfs-devnet-scripts-directory=mithril-test-lab/ipfs-devnet/

See the README's "Additional network topology options" section for details, including how to attach to a pre-existing devnet with --ipfs-devnet-to-attach.

Issue(s)

Closes #3460

@Alenar Alenar self-assigned this Sep 8, 2026
@Alenar
Alenar requested a review from jpraynaud as a code owner September 8, 2026 17:31
@Alenar Alenar added the testing 🔁 Something related to tests label Sep 8, 2026
@Alenar
Alenar requested a review from turmelclem as a code owner September 8, 2026 17:31
@Alenar
Alenar force-pushed the djo/3457/ipfs/adapt-e2e branch from ae56ed9 to 2e1ee71 Compare September 8, 2026 17:40
@jpraynaud
jpraynaud requested a lite review from Copilot September 8, 2026 17:50

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The PR introduces avoidable panics/unwraps and a likely clippy unused_async warning in the new IPFS devnet code, which should be fixed before merging.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR extends the mithril-end-to-end runner to optionally bootstrap (or attach to) a local IPFS devnet and wire its Kubo RPC endpoints into the e2e infrastructure, so Cardano DB artifact upload/download through IPFS can be exercised end-to-end (including a new CI scenario).

Changes:

  • Add an IPFS devnet module (devnet::ipfs) and plumb its topology into aggregator/client configuration and scenarios.
  • Extend Cardano DB v2 verification to run both local-storage and (optionally) IPFS download paths.
  • Update CLI/README/CI matrix and bump mithril-end-to-end version.
File summaries
File Description
mithril-test-lab/mithril-end-to-end/src/toolkit/check/cardano_database.rs Adds optional IPFS download verification via --ipfs-rpc-url.
mithril-test-lab/mithril-end-to-end/src/stress_test/aggregator_helpers.rs Updates aggregator bootstrap config for new IPFS field.
mithril-test-lab/mithril-end-to-end/src/scenario/minimal.rs Passes client IPFS RPC URL into database verification when available.
mithril-test-lab/mithril-end-to-end/src/scenario/full.rs Passes client IPFS RPC URL into database verification when available.
mithril-test-lab/mithril-end-to-end/src/mithril/infrastructure.rs Starts/stores optional IPFS devnet, maps Kubo nodes to aggregators and client.
mithril-test-lab/mithril-end-to-end/src/mithril/client.rs Adds ipfs_rpc_url option to Cardano DB v2 download command wrapper.
mithril-test-lab/mithril-end-to-end/src/mithril/aggregator.rs Injects IPFS_RPC_SERVER_CONFIG when an IPFS node is configured.
mithril-test-lab/mithril-end-to-end/src/main.rs Adds --use-ipfs and devnet attach/scripts flags; integrates IPFS devnet lifecycle into app.
mithril-test-lab/mithril-end-to-end/src/lib.rs Minor formatting change.
mithril-test-lab/mithril-end-to-end/src/devnet/mod.rs Refactors devnet into cardano + ipfs modules; centralizes RetryableDevnetError.
mithril-test-lab/mithril-end-to-end/src/devnet/ipfs.rs New IPFS devnet bootstrap/start/stop implementation and topology model.
mithril-test-lab/mithril-end-to-end/src/devnet/cardano.rs Adjusts to shared RetryableDevnetError; updates tests imports.
mithril-test-lab/mithril-end-to-end/README.md Documents IPFS option and other topology flags.
mithril-test-lab/mithril-end-to-end/Cargo.toml Version bump to 0.5.16.
Cargo.lock Updates locked version for mithril-end-to-end.
.github/workflows/ci.yml Adds a new e2e matrix entry running with IPFS enabled.
Review details

Suppressed comments (1)

mithril-test-lab/mithril-end-to-end/src/main.rs:204

  • --ipfs-devnet-scripts-directory is only meaningful when --use-ipfs is enabled; adding a Clap requires constraint avoids confusing no-op flag usage.
    #[clap(long, default_value = "./ipfs_devnet")]
    ipfs_devnet_scripts_directory: PathBuf,
  • Files reviewed: 15/16 changed files
  • Comments generated: 5
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread mithril-test-lab/mithril-end-to-end/src/main.rs Outdated
Comment thread mithril-test-lab/mithril-end-to-end/src/mithril/infrastructure.rs
Comment thread mithril-test-lab/mithril-end-to-end/src/devnet/ipfs.rs
Comment thread mithril-test-lab/mithril-end-to-end/src/devnet/ipfs.rs
Comment thread mithril-test-lab/mithril-end-to-end/src/devnet/ipfs.rs
@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown

Test Results

     5 files     221 suites   51m 44s ⏱️
 3 542 tests  3 542 ✅ 0 💤 0 ❌
11 661 runs  11 661 ✅ 0 💤 0 ❌

Results for commit 4ac2b58.

♻️ This comment has been updated with latest results.

@Alenar
Alenar temporarily deployed to testing-2-preview September 8, 2026 18:01 — with GitHub Actions Inactive
@Alenar
Alenar temporarily deployed to testing-preview September 8, 2026 18:01 — with GitHub Actions Inactive
@Alenar
Alenar force-pushed the djo/3457/ipfs/adapt-e2e branch from 2e1ee71 to 95e1685 Compare September 9, 2026 08:23
@Alenar
Alenar temporarily deployed to testing-2-preview September 9, 2026 08:41 — with GitHub Actions Inactive
@Alenar
Alenar temporarily deployed to testing-preview September 9, 2026 08:41 — with GitHub Actions Inactive

@jpraynaud jpraynaud left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM 👍

To avoid confusion with the upcomming `ipfs` devnet.
By providing spawned nodes RPC urls to aggregators.
It will only check if the target devnet have enough node, start it if it
was not already started, and leave it running after the test suite end.
…tor, DMQ, IPFS)

- DMQ & multi-aggregators support existed but weren't covered
- IPFS doc include the new `--ipfs-devnet-to-attach` detached mode
* mithril-end-to-end from `0.5.15` to `0.5.16`
@Alenar
Alenar force-pushed the djo/3457/ipfs/adapt-e2e branch from 95e1685 to 4ac2b58 Compare September 9, 2026 10:50
@Alenar
Alenar temporarily deployed to testing-2-preview September 9, 2026 11:10 — with GitHub Actions Inactive
@Alenar
Alenar temporarily deployed to testing-preview September 9, 2026 11:10 — with GitHub Actions Inactive

@turmelclem turmelclem left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM 👍

@Alenar
Alenar merged commit 471ada0 into main Sep 9, 2026
52 checks passed
@Alenar
Alenar deleted the djo/3457/ipfs/adapt-e2e branch September 9, 2026 14:09
@Alenar Alenar mentioned this pull request Sep 9, 2026
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testing 🔁 Something related to tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement IPFS in the end to end tests

4 participants