Repository navigation
feat(notifications): send scoped copies of the new-issues summary - #9
Closed
felipebergamin wants to merge 3 commits into
Closed
felipebergamin wants to merge 3 commits into
felipebergamin wants to merge 3 commits into
Conversation
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>
Member
Author
|
Moved to kernelci/dashboard: kernelci#2199 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The hourly new-issues mail still goes to kernelci-results@groups.io with new build and boot issues.
new_issues/default.yamlnow supplies that address and those kinds, and the cron job no longer passes--to. Passing--tostill overrides the file.Any other file under
backend/data/notifications/new_issues/can request a copy. A tree key matches the subscriptionurl. A hardware key matches the platform. If a hardware entry omitsorigin, the loader uses that platform's origin fromsubscriptions/*_hardware.yaml, ormaestrowhen 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
mainyet, 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=poetry run ./manage.py notifications --action=new_issueswith onlynew_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 printCopy from.bootfor one subscription tree. The dry run prints one extraTowith only that tree's boot ids, and no mail for an entry whose branch matches nothing.architectureto an entry.pytest -m unitfails and the error names the file, entry index, and key.Made with Cursor