Repository navigation
Backport #32181 to 2.0: stop pipeline alerts firing for historical and re-ingested executions - #32589
Conversation
…d re-ingested executions (cherry picked from commit 3969ba3)
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
Code Review ✅ Approved 1 resolved / 1 findingsBackport of #32181 to 2.0 fixes pipeline alerts firing repeatedly for historical and re-ingested executions by properly emitting change events only for genuinely new status runs. All 208 unit tests pass and the code compiles cleanly. Consider optimizing the per-status deep-copy loop in ✅ 1 resolved✅ Performance: Full pipeline deep-copy per changed status in bulk loop
OptionsDisplay: compact → Showing less information. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
|
✅ Playwright Results — workflow succeededValidated commit ✅ 1018 passed · ❌ 0 failed · 🟡 2 flaky · ⏭️ 0 skipped · 🧰 0 lifecycle flaky PerformanceBlocking targets: ✅ met · Optimization targets: 🟡 in progress Shard-job maxima below are not the full workflow wall time; the linked run includes build, fixture, planning, and reporting. 🕒 Full workflow signal wall (to summary) 54m 51s ⏱️ Max setup 3m 57s · max shard execution 20m 8s · max shard-job elapsed before upload 23m 14s · reporting 8s 🌐 202.30 requests/attempt · 2.42 app boots/UI scenario · 27.40% common-shard skew Optimization targets still in progress:
🟡 2 flaky test(s) (passed on retry)
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
|



Describe your changes:
Backport of #32181 (
Fixes #31782) to2.0.An alert on
Pipelinefiltered toFailedis unusable on this branch: the metadata agent re-sendsthe same
numberOfStatusruns every cycle and each re-send emitted a change event, so one oldfailure re-notifies forever; and the first ingestion after an alert is created emits a change event
per historical run, so enabling an alert produces a backfill burst.
PUT /status/bulkadditionallyemitted a single change event describing only the newest status, so a failure that was not the
newest run in a batch never alerted at all.
Full analysis, diagrams and manual-test tables are in #32181.
Why this is a manual PR. #32181 did carry
To release, and the release cherry-pick workflow ranfor both release branches
(run 33819745878). On
2.0the pick applied cleanly, but its direct push was rejected:so the workflow asked for a manual cherry-pick. This is it. The companion
1.13backport is#32590.
Type of change:
High-level design:
One commit:
git cherry-pick -x 3969ba38a7cb2188bdafc2d7ba5f10a2795c47e3, zero conflicts,diffstat identical to the original (21 files, +607/-67).
A clean apply is not by itself proof the pick is correct on a release branch, so this was verified
rather than eyeballed: every file the commit touches was diffed against
main's post-fix version.All of the PR's own content is present, and the only differences are pre-existing
2.0divergencethat this change never touches:
main-only content this branch does not havePipelineRepositorygetTaskWorkflow/TaskDescriptionWorkflow/TaskTagWorkflowblockAlertUtilConversationalert path (CONVERSATIONresource vsTHREAD)AbstractEventConsumerAccessControlDAOs.ChangeEventDAOvsCollectionDAO.ChangeEventDAOimportEventSubscriptionScheduler,EntityRepository,EventSubscriptionRepository,TableRepository,PipelineResource, both JSON schemas, both generated TS files and the connector doc arebyte-identical to
main. Every symbol the new code depends on already exists here:routeToStagedIfActive,bulkIndexPipelineExecutions,getResultsFromAndToTimestamps,upsertSubscriberExtension, andbuildChangeEventJsonForBulkOperation/insertChangeEventsBatch(the latter two arrived with the #32350 backport, #32535).Migration folder stays
2.0.2. That is this branch's in-flightpomversion and the nextunreleased folder here:
2.0.1-releaseshipped 2026-09-02 and the folders on2.0stop at2.0.1.Appending to an already-released folder would silently skip clusters that have executed
2.0.1,because
MigrationWorkflow.getReprocessingVersionsonly reprocesses the max executed version perrelease train. The statement is idempotent (
WHERE ... startingTimestamp IS NULL) and does nottouch
$.timestamp, whichchange_event_consumersderives aNOT NULLgenerated column from.Tests:
Unit tests
mvn -pl openmetadata-service -am package -Dtest='StalePipelineExecutionTest,PipelineStatusComparisonTest,AlertUtilTest,AbstractEventConsumerTest,SearchRepositoryBehaviorTest'run on this branch: 208 run, 0 failures, 0 errors.
StalePipelineExecutionTest(new)PipelineStatusComparisonTest(new)AlertUtilTestAbstractEventConsumerTestSearchRepositoryBehaviorTestThe two new suites carry the same 9 and 4 cases they have on
main.openmetadata-servicealsocompiles clean end to end (
-am package -DskipTests, main and test sources), which is the checkthat catches a release-branch pick that applies without conflict but leans on a symbol only
mainhas.
Backend integration tests
Not applicable: no new REST endpoints.
AlertsRuleEvaluatorDeletedEntityIT(the one IT the originalPR touched, to pass
nullto the widenedgetFilteredEvents) exists on this branch and is carriedover unchanged.
Ingestion integration tests
Not applicable: no connector changes.
Playwright (UI) tests
Not applicable: the only UI diff is regenerated types under
generated/.Manual testing performed
Covered on
mainin #32181 (backfill, identical re-send, stalelogical_date, bulk batches, andthe migration against live MySQL and Postgres 15). Nothing in the backport diverges from what was
tested there.
Note on CI
Validate PR Metadatacannot pass on a release-branch PR:Fixes #Nonly creates GitHub's nativeclosingIssuesReferenceswhen the PR targets the default branch, and the workflow's body regexonly accepts cross-repo forms. Bypassed with the documented
skip-pr-checkslabel. The linked issueis #31782, tracked on Shipping via #32181.
maven-collate-ciis red on every base-2.0OSS PR and is not caused by this change: the collatedispatch does a bare
cd OpenMetadata && git checkout "$INPUT_SHA"with no prior fetch, so thesubmodule clone never has the PR head object. Same on merged base-
2.0PRs #32509 and #32424.UI screen recording / screenshots:
Not applicable.
Checklist:
Fixes #31782.