SEP-1868: Report success when alerts push recreates a missing PMM rule - #1392
Open
olucasandrade wants to merge 3 commits into
Open
SEP-1868: Report success when alerts push recreates a missing PMM rule#1392olucasandrade wants to merge 3 commits into
olucasandrade wants to merge 3 commits into
Conversation
olucasandrade
marked this pull request as ready for review
August 21, 2026 14:25
olucasandrade
requested review from
marcuscruz-percona and
peter-o-addo
as code owners
August 21, 2026 14:25
olucasandrade
requested review from
a team,
maxbube and
yyyyyyyan
as code owners
August 21, 2026 14:25
Contributor
There was a problem hiding this comment.
Pull request overview
Updates alert push results to distinguish recreated rules, existing-rule conflicts, and genuine failures.
Changes:
- Reports successful missing-rule recreation.
- Preserves skipped status for collisions and surfaces other errors.
- Adds regression tests and a changelog fragment.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
app/sep/apps/alerts/api_routes.py |
Refines push-result handling. |
tests/app/sep/apps/alerts/test_api_routes.py |
Tests revised result states. |
changelog.d/SEP-1868.fixed.md |
Documents the fix. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||||||||||||||
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
POST /api/apps/alerts/pushfinds a template already registered in PMM, it no longer always reportsskipped / Already present in PMM.create_rulesucceeds (the rule was missing, including after an out-of-band delete), the item issuccess/Pushed successfully."conflicts with existing"in the error detail) still reportsskipped. Any othercreate_rulefailure iserrorwith the real detail, not swallowed.GET /api/apps/alerts/in_pmmstill means template presence only.Tested
/alerts/templates/). Confirm PMM is connected (no "PMM not connected" warning).Pushed successfully.Pushed successfully, not a warningAlready present in PMM.Already present in PMM.Pushed successfully.Checklist
pytest tests/app/sep/apps/alerts/— 189 passed). Fullmake testnot re-run; no OpenAPI/schema change somake regen-specswas not runDatabase migrations generated if models changed ((N/A)make makemigrations)User-facing changes documented (README, inline help, UI text)(N/A — changelog fragment covers the push-result copy)Configuration changes documented with examples(N/A)changelog.d/if the change is user-facing (make changelog-add), or confirmed N/A (internal-only change, or a same-release-cycle fix for an unreleased sibling ticket)