test(e2e): IPFS support - #3528
Conversation
ae56ed9 to
2e1ee71
Compare
There was a problem hiding this comment.
🟡 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-endversion.
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-directoryis only meaningful when--use-ipfsis enabled; adding a Claprequiresconstraint 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.
Test Results 5 files 221 suites 51m 44s ⏱️ Results for commit 4ac2b58. ♻️ This comment has been updated with latest results. |
2e1ee71 to
95e1685
Compare
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`
95e1685 to
4ac2b58
Compare
Content
This PR wires the private local ipfs-devnet (#3434) into the
mithril-end-to-endtest runner, so the IPFS artifact-distribution path (uploaded from mithril-aggregator, download from mithril-client) can now be tested end-to-end.--use-ipfsCLI 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).IPFS_RPC_SERVER_CONFIG) plus one dedicated node for the mithril-client.--ipfs-rpc-url) alongside the existing local-storage check.Detachedmode (--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.devnet::runnertodevnet::cardanoand movedRetryableDevnetErrortodevnet::modso it can be shared with the newdevnet::ipfsmodule.--use-ipfs/--ipfs-devnet-to-attach, and (while at it) some of the previously-undocumented multi-aggregator and DMQ options.Pre-submit checklist
Comments
To try it locally (from the project root):
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