Skip to content

fix(actions): read arc-job-report metrics from mimir-internal at 15 s - #381

Merged
JesperTerkelsen merged 1 commit into
mainfrom
fix/arc-job-report-mimir-15s
Oct 13, 2026
Merged

JesperTerkelsen merged 1 commit into
mainfrom
fix/arc-job-report-mimir-15s

Conversation

@JesperTerkelsen

@JesperTerkelsen JesperTerkelsen commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

Summary

The ARC job report has had no resource data since about 2026-10-01. ARC's cAdvisor and kube-state-metrics series stopped arriving in grafanacloud-prom; they now live in mimir-internal. Every job came back as no metrics, so the comments showed durations only and never suggested a runner change. An example is https://github.com/monta-app/monorepo-typescript/pull/11680#issuecomment-6147620737.

This PR:

  • queries mimir-internal (uid ffzoywkuhm5tsd) instead of grafanacloud-prom.
  • queries at a 15 s step with rate[1m], matching the actual 15 s scrape interval (about 20 samples per 5 min on runner pods). It previously used 60 s / rate[2m]. At the old resolution, peak CPU was effectively a 2-minute average and hid bursts. Across about 280 runs of each monorepo PR job, p90 peak CPU goes from 1.8 → 3.3 cores for Lint, 2.9 → 5.7 for Typecheck and 2.7 → 5.2 for the E2E jobs. A 30 s window is higher still: 5.0, 7.5 and 6.1.
  • updates the README, action.yml and the comment text from "60 s" to 15 s.

Testing

Gaps

  • I couldn't check that the GRAFANA_CLOUD_TOKEN service account can query mimir-internal, because reading datasource permissions needs a scope I don't have. If it can't, the request raises and the report job fails visibly; the first monorepo run after merge will tell.
  • The datasource's Scrape interval setting in Grafana is still 60s, which makes $__rate_interval 4 min on every dashboard using it, including ARC Job Resources. That is a separate change to a shared datasource and isn't part of this PR.

🤖 Generated with Claude Code

ARC cAdvisor and kube-state-metrics stopped landing in grafanacloud-prom
around 2026-10-01, so every job in the report came back as "no metrics"
and no runner suggestions were made. Query mimir-internal instead.

mimir-internal scrapes every 15 s, so query at a 15 s step with a 1 min
rate window instead of 60 s / 2 min, which caught only 2-minute averages
and hid CPU bursts.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@JesperTerkelsen
JesperTerkelsen marked this pull request as ready for review October 13, 2026 14:25
@JesperTerkelsen
JesperTerkelsen requested a review from a team as a code owner October 13, 2026 14:25
@JesperTerkelsen
JesperTerkelsen requested review from maoanran and removed request for a team October 13, 2026 14:25
@JesperTerkelsen
JesperTerkelsen merged commit a7aa579 into main Oct 13, 2026
1 check passed
@JesperTerkelsen
JesperTerkelsen deleted the fix/arc-job-report-mimir-15s branch October 13, 2026 14:32
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.

2 participants