Repository navigation
Conversation
✅ PR checks passedThe linked issue has a description and all required Shipping project fields set. Thanks! |
🔄 Playwright impact map auto-refreshedThis PR touched specs or UI source that changed the source→spec routing map. I regenerated What is this file? It is the auto-generated half of Playwright's PR planner. It routes "if source X changes, run specs Y" by walking spec imports and cross-referencing What if I want to regenerate locally instead? Run this before pushing your next change to skip the bot commit: python3 .github/scripts/generate_playwright_impact_map.py
git add .github/playwright/impact-map.generated.json
git commit --amend --no-edit # or a separate commit |
✅ Generated Sources Auto-UpdatedThe generated TypeScript types ( |
🚦 Removed from the merge queue —
|
🚦 Removed from the merge queue —
|
…channel is grouped from
…stopping flag and recipient lookups
…ed once and health per destination
…, fails the event with its reason
🚦 Removed from the merge queue —
|
Code Review ✅ Approved 1 closed / 1 findings🟡 Medium risk · Alert job lifecycle, reconciliation, and repository hooks change execution across alert save paths. Refactors alert job scheduling so jobs carry only the alert ID and are written exclusively by ✅ 1 closed✅ Bug: Reconciler counts failed repairs as repaired, never as failures
OptionsDisplay: compact → Counting what did not apply, without listing it. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
|
|



Fixes #34265
What this pull request implements
GET /v1/events/subscriptions/id/{id}/schedulingshows an alert's job, trigger state, position, lag and what the last reconcile found.What was wrong before
Jobs were scheduled from several places, each storing its own copy of the alert in the job data, and only the REST resource kept them in step. An alert saved another way could run with an old copy of itself, or not run at all. A job whose scheduler call failed stayed broken until the alert was saved again or the server restarted.
Design
flowchart LR subgraph CALLERS["Ask for an alert's job to match its stored row"] BOOT["Server start"] TICK["AlertTick: alert gone or off"] REPO["Repository: after each commit"] REC["AlertReconciler: each round"] end JOBS["AlertJobs: the only writer of alert jobs"] ALERT["Stored alert"] AJOB["Quartz job per enabled alert: named by its id, runs AlertPublisher, no data"] RECORD["AlertRecord"] BOOT --> JOBS TICK --> JOBS REPO --> JOBS REC --> JOBS JOBS -->|decides from| ALERT JOBS -->|schedules or removes| AJOB JOBS -->|rows first| RECORD REPO -->|forget deleted rows| RECORD REC -->|forget leftovers| RECORDAlertJobsis the only class that creates, updates or removes an alert's job. It decides from the stored row, never from a copy a caller holds: two saves can commit in one order and arrive in the other, and a disable arriving last must not delete the job an enable just wrote. A lock per alert orders this server's callers, and the row is read again after applying, so a save another server committed in between is caught too. Every job is stored withAlertPublisher, a class every server can load, and is named by the alert's id.AlertJobViewis the read-only view of the job store.AlertReconcilerruns inside each server rather than as a scheduled job, so there is no job class another release could fail to load. It repairs a save whose scheduler call failed, a trigger stuck in error or frozen in the past, and a job or rows left behind by a deleted alert. It acts only on keys that name an alert; any other key is reported and left alone.ReconcileRoundrecords what one round did, andReconcilerMetricscounts rounds by outcome, so a round that fails or stops coming is visible.AuditLogSchedulegives the audit log consumer, which is not an alert, its own job: it reads change events and writes the audit log on a fixed interval, one instance at a time across the cluster.What users notice
Nothing new in normal use; alerts saved through any path now run as saved.
For code built on OpenMetadata
The scheduler's publisher methods are removed. Saving or deleting the alert through its repository schedules or removes its job.
How it was tested
The alerting unit tests (65 classes, 488 tests), the alert integration tests (7 classes, 69 tests, including
AlertStateIT's save, rollback and cascade delete paths andAlertReconcilerIT) and the existing alert integration tests (565 tests) pass on MySQL and on PostgreSQL.