Skip to content

[hud][ch][drci] add api to cache ch queries + cache issues query #6578

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

Merged
merged 3 commits into from
Apr 28, 2025

Conversation

izaitsevfb
Copy link
Contributor

@izaitsevfb izaitsevfb commented Apr 25, 2025

As evident from the hud, issues_query is biggest cumulative time and memory hoggers, simply because it runs too frequently (≈27 times / minute)
image

Since there are only three parameter values that dominate the executions:
- ci: sev
- skipped
- unstable

it makes sense to cache this query.

This PR:

  • adds parameter to our ch apis to use_query_cache (1 minute TTL by default)
  • adds a python test (intended to be run locally, as we don't expose CH credentials in CI)
  • caches issues_query in several places
  • updates the ch client node package (the old one didn't expose use_query_cache)

The intended effect of using query cache is to drop time and memory to 0 for cache hits.

Copy link

vercel bot commented Apr 25, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
torchci ✅ Ready (Inspect) Visit Preview Apr 25, 2025 9:54pm

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Apr 25, 2025
@izaitsevfb izaitsevfb requested review from clee2000 and huydhn April 25, 2025 21:46
@izaitsevfb izaitsevfb merged commit a50fd5f into main Apr 28, 2025
9 checks passed
@izaitsevfb izaitsevfb deleted the cache-ch-queries branch April 28, 2025 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants