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

Refactor Indexer caching for exchange_rates and validators_apys to use instance-level caches, fixing cargo test failures #3774

Merged

Conversation

samuel-rufi
Copy link
Member

Description of change

This PR addresses an issue in iota-indexer where global caches in the exchange_rates and validators_apys functions cause test failures when running cargo test with dedicated clusters (own TestCluster per test). By refactoring these functions to use instance-level caches, we prevent test interference and ensure that tests can run in parallel without conflicts.

Links to any relevant issues

Fixes #3773

Type of change

  • Bug fix (a non-breaking change which fixes an issue)

How the change has been tested

cargo test --features shared_test_runtime -- --nocapture

Change checklist

  • I have followed the contribution guidelines for this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that new and existing unit tests pass locally with my changes

@samuel-rufi samuel-rufi added the infrastructure Issues related to the Infrastructure Team label Oct 29, 2024
@samuel-rufi samuel-rufi self-assigned this Oct 29, 2024
@samuel-rufi samuel-rufi requested a review from a team as a code owner October 29, 2024 21:17
Copy link
Contributor

This pull request has been deployed to Vercel.

Latest commit: b0391df

✅ Preview: https://apps-ui-nxmwmyqym-iota1.vercel.app

Copy link
Contributor

This pull request has been deployed to Vercel.

Latest commit: b0391df

✅ Preview: https://apps-backend-29a719c9ccbdb9b80c97b599a599d8953354da-p1o9t1n8k.vercel.app

Copy link
Contributor

This pull request has been deployed to Vercel.

Latest commit: b0391df

✅ Preview: https://wallet-dashboard-a225fcfa1e2f852205a61a7cd1d5d93e92-2f5l99mlt.vercel.app

Copy link
Contributor

This pull request has been deployed to Vercel.

Latest commit: b0391df

✅ Preview: https://iota-rebased-explorer-092603f1de8088243ccb8b861b23e-rjoqmewu9.vercel.app

Copy link
Contributor

@sergiupopescu199 sergiupopescu199 left a comment

Choose a reason for hiding this comment

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

lgtm✨

@samuel-rufi samuel-rufi requested a review from tomxey October 30, 2024 16:40
Copy link
Contributor

@tomxey tomxey left a comment

Choose a reason for hiding this comment

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

lgtm 🌷

@samuel-rufi samuel-rufi merged commit 527fab1 into sc-platform/indexer-new-rpc-tests Oct 31, 2024
28 of 32 checks passed
@samuel-rufi samuel-rufi deleted the l1sc/infra/governance-rpc-tests branch October 31, 2024 08:15
sergiupopescu199 pushed a commit that referenced this pull request Oct 31, 2024
sergiupopescu199 pushed a commit that referenced this pull request Oct 31, 2024
sergiupopescu199 pushed a commit that referenced this pull request Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infrastructure Issues related to the Infrastructure Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants