Deliver scoped metrics reports from metrics rules
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 9
- Forks
- 31
- Avg merge
- 3d 19h
- Merged PRs (30d)
- 16
Description
Goal
On the weekly metrics job, send scoped metrics reports per rule in backend/data/notifications/metrics/. Keep the global weekly community mail unchanged.
Depends on: #2114
(Can be implemented in parallel with subscription new-issues delivery; does not depend on that issue.)
Today vs after
| Today | After | |
|---|---|---|
| Metrics report | One global weekly mail (fixed To/Cc in cron) | Same default, plus scoped reports per metrics rule |
Community delivery (unchanged)
Default weekly send: To kernelci@lists.linux.dev, Cc kernelci-results@groups.io, Saturday cron, existing cache warm.
Subscription delivery
For each rule in metrics/, filter get_metrics_data() by rule trees, hardware, origins; render metrics_report.txt.j2 for period_days; send to rule recipients. One rule spanning multiple trees → one email.
Note: Tree scoping requires SQL joins (incidents/builds/checkouts); extend cache warm for configured scopes.
Acceptance criteria
- Default config → single global weekly metrics mail unchanged
- At least one metrics rule sends scoped report to its recipients only
- Query/cache impact documented; warm covers subscribed scopes
-
docs/notifications.mdupdated
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in backend/data/notifications/metrics/ and inspect the metrics rules and metrics_report.txt.j2 flow, then review docs/notifications.md and the existing weekly job behavior. Verify that the default global mail is unchanged, scoped reports reach only each rule's recipients, configured scopes are covered by cache warm-up, and the query/cache impact is documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, sql
- Domain
- backend, databases, documentation
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 64/100