Skip to content

feat(notifications): send scoped copies of the new-issues summary - #9

Closed
felipebergamin wants to merge 3 commits into
mainfrom
feat/2115/new-issues-recipients
Closed

felipebergamin wants to merge 3 commits into
mainfrom
feat/2115/new-issues-recipients

Conversation

@felipebergamin

Copy link
Copy Markdown
Member

Summary

The hourly new-issues mail still goes to kernelci-results@groups.io with new build and boot issues. new_issues/default.yaml now supplies that address and those kinds, and the cron job no longer passes --to. Passing --to still overrides the file.

Any other file under backend/data/notifications/new_issues/ can request a copy. A tree key matches the subscription url. A hardware key matches the platform. If a hardware entry omits origin, the loader uses that platform's origin from subscriptions/*_hardware.yaml, or maestro when the file omits it. Each address with at least one matching issue gets one mail for the run. The mail contains the union of every matching entry and file. An address with no matching row gets no mail. The community mail is still sent, including to an address that also gets a copy.

A copy goes to that address alone. The body starts with Copy from: new_issues/<file> for each file that contributed rows. The community mail has no such line.

The extra test query runs only when some entry includes test. It drops the build branch, and a build incident is never stored as a test. Maestro build regression reports are unchanged.

This branch is based on the regression recipient work for kernelci#2114, which is not on main yet, so those commits are in this pull request too.

Part of kernelci#2115

Test plan

  • cd backend && poetry run pytest kernelCI_app/tests/unitTests/commands/new_issues_recipients_test.py kernelCI_app/tests/unitTests/commands/regression_recipients_test.py kernelCI_app/tests/unitTests/queries/notifications_test.py::TestKcidbNewIssues -o addopts=
  • Run poetry run ./manage.py notifications --action=new_issues with only new_issues/default.yaml. The dry run prints one community mail to kernelci-results@groups.io and lists the new build and boot issue ids. It does not print Copy from.
  • Add a local tree file that requests boot for one subscription tree. The dry run prints one extra To with only that tree's boot ids, and no mail for an entry whose branch matches nothing.
  • Put the same address in two files. The dry run prints that address once, and the body lists both files.
  • Add architecture to an entry. pytest -m unit fails and the error names the file, entry index, and key.

Made with Cursor

felipebergamin and others added 3 commits October 21, 2026 17:26
Seed backend/data/notifications/regression/ with one unscoped entry per
non-hardware subscription tree, copied from default_recipients. After
this commit the directory is edited by hand. default.yaml holds the
regression To address used with --add-mailing-lists.

Nothing reads these files yet.

Part of kernelci#2114

Assisted-by: Cursor
Signed-off-by: Felipe Bergamin <felipebergamin@profusion.mobi>
Co-authored-by: Cursor <cursoragent@cursor.com>
[REGRESSION] Cc came from the default_recipients of the subscription
whose url matched the issue, regardless of branch or architecture. That
list stays the [STATUS] Cc. Regression Cc now comes from
backend/data/notifications/regression/, where an entry can be scoped by
issues, branch, architecture, config_name and compiler.

The loader validates every file against the subscription tree keys and
raises with the file, entry index and key. A unit test loads the
committed directory, so a bad file fails CI. Branch is matched against
the issue's first incident and the build keys against the incidents
already queried, so no new query is added.

test_report keeps using only the unscoped entries. With
--add-mailing-lists, regression reports take their To from
regression/default.yaml. Build and boot report bodies name the file
the Cc came from.

send_email_report no longer looks up recipients itself, so the
signup_folder and git_url plumbing on the regression path is removed.

Closes kernelci#2114
Closes kernelci#1080

Assisted-by: Cursor
Signed-off-by: Felipe Bergamin <felipebergamin@profusion.mobi>
Co-authored-by: Cursor <cursoragent@cursor.com>
The hourly community mail still lists new build and boot issues. Its To
address and those kinds now come from new_issues/default.yaml, so the
cron no longer passes --to. --to still overrides the file.

Other files in that directory send one extra mail per address, with the
rows that match the entry. A tree key matches the subscription url. A
hardware key matches the platform, and an omitted origin uses the
platform's origin from subscriptions (maestro when absent). No match
sends nothing. The community mail is still sent. A copy goes to that
address alone and names the files that contributed rows.

The second query runs only when some entry includes test issues, and it
drops the build branch. A build incident is never stored as a test.

Part of kernelci#2115

Assisted-by: Cursor
Signed-off-by: Felipe Bergamin <felipebergamin@profusion.mobi>
Co-authored-by: Cursor <cursoragent@cursor.com>
@felipebergamin

Copy link
Copy Markdown
Member Author

Moved to kernelci/dashboard: kernelci#2199

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.

1 participant