Skip to content

chore: remove per-program fetch metric#1261

Open
thlorenz wants to merge 4 commits into
masterfrom
thlorenz/fix-unbounded-metrics
Open

chore: remove per-program fetch metric#1261
thlorenz wants to merge 4 commits into
masterfrom
thlorenz/fix-unbounded-metrics

Conversation

@thlorenz
Copy link
Copy Markdown
Collaborator

@thlorenz thlorenz commented May 29, 2026

Summary

Remove the program-specific account fetch metric that tracked fetch results by program ID.

Details

This PR removes the per_program_account_fetch_stats metric and its associated result
type/helpers from magicblock-metrics. The existing aggregate account fetch metrics remain in
place for failed, found, not-found, and successful fetches.

magicblock-chainlink

Account fetch handling no longer records per-program fetch results on either failure or success
paths. Fetch routing and the existing aggregate metrics behavior are preserved.

magicblock-metrics

The per-program account fetch counter, registration, helper function, and ProgramFetchResult
label type were removed. Aggregate bounded account fetch metrics remain available unchanged.

Summary by CodeRabbit

  • Chores
    • Removed per-program account-fetch metrics and related metric APIs to simplify monitoring.
    • Simplified account-fetching APIs by removing an unused optional filter parameter; call sites and tests updated to match the new signatures.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 29, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: a548bf7d-7b64-49da-99f3-da640d314824

📥 Commits

Reviewing files that changed from the base of the PR and between d1ebcbf and d19ad6f.

📒 Files selected for processing (22)
  • magicblock-aperture/src/requests/http/mod.rs
  • magicblock-chainlink/src/chainlink/fetch_cloner/mod.rs
  • magicblock-chainlink/src/chainlink/fetch_cloner/tests.rs
  • magicblock-chainlink/src/chainlink/mod.rs
  • magicblock-chainlink/src/remote_account_provider/mod.rs
  • magicblock-chainlink/src/remote_account_provider/tests.rs
  • magicblock-chainlink/tests/01_ensure-accounts.rs
  • magicblock-chainlink/tests/03_deleg_after_sub.rs
  • magicblock-chainlink/tests/08_subupdate-ordering.rs
  • magicblock-chainlink/tests/09_waiter_reconciliation_race.rs
  • magicblock-chainlink/tests/basics.rs
  • magicblock-chainlink/tests/utils/test_context.rs
  • test-integration/test-chainlink/src/test_context.rs
  • test-integration/test-chainlink/tests/ix_01_ensure-accounts.rs
  • test-integration/test-chainlink/tests/ix_03_deleg_after_sub.rs
  • test-integration/test-chainlink/tests/ix_06_redeleg_us_separate_slots.rs
  • test-integration/test-chainlink/tests/ix_07_redeleg_us_same_slot.rs
  • test-integration/test-chainlink/tests/ix_ata_eata_replace.rs
  • test-integration/test-chainlink/tests/ix_exceed_capacity.rs
  • test-integration/test-chainlink/tests/ix_full_scenarios.rs
  • test-integration/test-chainlink/tests/ix_programs.rs
  • test-integration/test-chainlink/tests/ix_remote_account_provider.rs
💤 Files with no reviewable changes (9)
  • magicblock-chainlink/tests/08_subupdate-ordering.rs
  • test-integration/test-chainlink/tests/ix_remote_account_provider.rs
  • magicblock-aperture/src/requests/http/mod.rs
  • magicblock-chainlink/tests/basics.rs
  • magicblock-chainlink/tests/01_ensure-accounts.rs
  • magicblock-chainlink/tests/09_waiter_reconciliation_race.rs
  • magicblock-chainlink/tests/03_deleg_after_sub.rs
  • magicblock-chainlink/tests/utils/test_context.rs
  • magicblock-chainlink/src/chainlink/fetch_cloner/tests.rs

📝 Walkthrough

Walkthrough

This pull request removes per-program account fetch metrics and the ProgramFetchResult type from the metrics crate, deletes the PER_PROGRAM_ACCOUNT_FETCH_STATS counter and its helper, and updates consumers. RemoteAccountProvider stops deriving/passing program_ids and no longer records per-program fetch stats. Chainlink and FetchCloner APIs drop the program_ids parameter and update all internal call sites. Numerous unit and integration tests and a couple of HTTP helper calls were adjusted to the new function signatures or formatting.

Suggested reviewers

  • GabrielePicco
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch thlorenz/fix-unbounded-metrics

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@thlorenz thlorenz requested review from GabrielePicco and bmuddha and removed request for GabrielePicco May 29, 2026 06:26
thlorenz added 3 commits May 29, 2026 14:27
* master:
  Reduce chainlink log noise (#1260)
  feat(validator): add `--no-tui` runtime flag (#1252)
@thlorenz thlorenz marked this pull request as ready for review May 29, 2026 07:33
Copy link
Copy Markdown
Collaborator

@GabrielePicco GabrielePicco left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Copy Markdown
Collaborator

@bmuddha bmuddha left a comment

Choose a reason for hiding this comment

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

LGTM

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