Skip to content

Conversation

@jpraynaud
Copy link
Member

@jpraynaud jpraynaud commented Sep 10, 2025

Content

This PR includes a fix for flakiness in the e2e tests in the CI which occurs when multiple clients are verifying Cardano database concurrently.

Pre-submit checklist

  • Branch
    • Tests are provided (if possible)
    • Crates versions are 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

Issue(s)

Closes #2687

@jpraynaud jpraynaud self-assigned this Sep 10, 2025
@jpraynaud jpraynaud requested a review from Copilot September 10, 2025 14:51
Copy link

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 addresses flakiness in end-to-end tests when multiple clients verify Cardano databases concurrently by introducing timestamp-based temporary directory providers to prevent file system conflicts.

  • Adds a new TempDirectoryProvider trait and TimestampTempDirectoryProvider implementation for unique temporary directories
  • Updates the CardanoDatabaseClient to use the new temporary directory provider instead of hardcoded paths
  • Refactors digest file handling to use instance-specific temporary directories

Reviewed Changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
mithril-client/src/utils/temp_dir_provider.rs Introduces the TempDirectoryProvider trait and TimestampTempDirectoryProvider implementation
mithril-client/src/utils/mod.rs Adds the new temp_dir_provider module to exports and reorganizes imports
mithril-client/src/client.rs Integrates TimestampTempDirectoryProvider in the client constructor
mithril-client/src/cardano_database_client/proving.rs Updates InternalArtifactProver to use the injected temp directory provider
mithril-client/src/cardano_database_client/api.rs Updates CardanoDatabaseClient constructor and test infrastructure to accept temp directory provider
mithril-client/Cargo.toml Bumps version from 0.12.30 to 0.12.31

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@github-actions
Copy link

github-actions bot commented Sep 10, 2025

Test Results

    4 files  ±0    164 suites  ±0   23m 49s ⏱️ + 1m 14s
2 180 tests ±0  2 180 ✅ ±0  0 💤 ±0  0 ❌ ±0 
6 702 runs  ±0  6 702 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 42c8f9c. ± Comparison against base commit 6a7107e.

This pull request removes 1 and adds 1 tests. Note that renamed tests count towards both.
mithril-client ‑ cardano_database_client::proving::tests::download_and_verify_digests::download_and_verify_digest_should_return_digest_map_acording_to_beacon
mithril-client ‑ cardano_database_client::proving::tests::download_and_verify_digests::download_and_verify_digest_should_return_digest_map_according_to_beacon

♻️ This comment has been updated with latest results.

@jpraynaud jpraynaud force-pushed the jpraynaud/2687-fix-cardano-database-temp-folder branch from ab8e130 to 42c8f9c Compare September 10, 2025 15:03
Copy link
Collaborator

@turmelclem turmelclem left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@jpraynaud jpraynaud merged commit 3dfc782 into main Sep 11, 2025
41 of 43 checks passed
@jpraynaud jpraynaud deleted the jpraynaud/2687-fix-cardano-database-temp-folder branch September 11, 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.

Flakiness in e2e tests in CI

3 participants