Repository navigation
Backport #32181 to 1.13: stop pipeline alerts firing for historical and re-ingested executions - #32590
Conversation
…nd 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 |
…as on 2.0 and main
a938982 to
3c67576
Compare
Code Review ✅ Approved 1 resolved / 1 findingsBackport of #32181 to 1.13 stops pipeline alerts from firing on historical and re-ingested executions by filtering change events to only those with execution timestamps at or after the alert's creation. Resolves three merge conflicts with careful preservation of the original logic—17 of 20 files have byte-identical deltas to main, and the intentional adaptations ( ✅ 1 resolved✅ Performance: Full pipeline deep-copied once per status in bulk backfill 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 |
|
|



Describe your changes:
Backport of #32181 (
Fixes #31782) to1.13.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 carried
To releaseand the release cherry-pick workflow ran(run 33819745878), but it
could not land on either branch: on
1.13itsgit cherry-pick -xhit the three conflicts resolvedbelow, and on
2.0(where it applies cleanly) the direct push was rejected withpush declined due to repository rule violations. The workflow asked for a manual cherry-pick; thisis it. The companion
2.0backport is #32589.Type of change:
High-level design:
One commit:
git cherry-pick -x 3969ba38a7cb2188bdafc2d7ba5f10a2795c47e3, with three conflictsresolved. Diffstat is the original's minus the one dropped file: 20 files, +606/-66 against the
original's 21 files, +607/-67.
Resolutions were verified, not eyeballed. For every file the commit touches, the delta this PR
applies (
git diff origin/1.13 HEAD -- <file>, added and removed lines) was compared against thedelta the original applied on
main. 17 of 20 files have a byte-identical delta, including bothconflicted Java files. The only three that differ are the three intentional adaptations:
1.
AbstractEventConsumer(content conflict). The conflict swept in three context lines thatmainalready had before #32181 and1.13does not (lastReadOffsetassignment,pendingGapSince,gapStateChanged— the change-event gap-cursor work, never backported). #32181 adds exactly one linehere:
Kept that, dropped the three context lines. The resulting file's delta is byte-identical to
main's.2.
AlertUtil(content conflict). Same shape: the conflict region included theCOMPILED_CONDITIONSCaffeine cache, which is amain-only optimisation this branch does not have(
1.13callsparseExpression(completeCondition)directly). #32181 adds one field here,FIELD_PIPELINE_STATUS. Kept that, dropped the cache block and itsCache/Caffeineimports.Confirmed there is no residual
COMPILED_CONDITIONSreference. Delta again byte-identical tomain's.3.
AlertsRuleEvaluatorDeletedEntityIT(modify/delete). The file does not exist on1.13; itarrived on
mainafter this branch was cut. Its only change in #32181 was passingnullto thewidened
getFilteredEvents, so there is nothing to preserve. Dropped. Verified there is no othercaller of
getFilteredEventsanywhere inopenmetadata-integration-testson this branch, so nodangling call site is left behind.
Migration folder moved
2.0.2->1.13.6, SQL body unchanged (only the-- ... OpenMetadata <version>header line differs).1.13.6is this branch's in-flightpomversion and the nextunreleased folder here:
1.13.5-releaseshipped 2026-09-03 and the folders on1.13stop at1.13.5. Appending to1.13.5would silently skip every cluster that has already executed it,because
MigrationWorkflow.getReprocessingVersionsonly reprocesses the max executed version perrelease train. The statement is idempotent (
WHERE ... startingTimestamp IS NULL) and leaves$.timestampalone, whichchange_event_consumersderives aNOT NULLgenerated column from, so acluster that later upgrades onto the 2.0 line and runs
2.0.2sees 0 rows there.Nothing else needed adapting. Every symbol the new code depends on already exists on
1.13:routeToStagedIfActive,bulkIndexPipelineExecutions,getResultsFromAndToTimestamps,getExtensionAtTimestamp,upsertSubscriberExtension, andbuildChangeEventJsonForBulkOperation/insertChangeEventsBatch(the latter two from the #32350 backport, #32536). ThealertTypeenum isidentical to
main's, so theNotification/Observabilityscoping of the new filter behaves thesame here.
getStartingOffsethas the same five call sites as onmain, so the one behaviouralchange that writes on read (persisting the offset row on first derivation) has the same blast radius.
PipelineResourceITon this branch is a strict subset ofmain's — zero lines exist here that donot exist there — including all seven pipeline-status test methods, so no branch-local assertion can
disagree with the new behaviour.
Second commit:
test(1.13): make SecurityConfigurationManagerTest order-independent. Not part ofthe fix; it repairs a branch-level defect this PR happens to expose.
SecurityConfigurationManagerTest.testConfigGettersReturnNullWhenNotInitializedreads three staticgetters on a singleton and its
elsebranch assertsauthandauthzare non-null, so it failswhenever a previously-run test leaves the singleton partially initialised.
openmetadata-serviceruns surefire single-fork with
runOrder=filesystem, so all 6273 tests share one JVM and its statics,and the two test classes this backport adds are enough to shift the Linux runner's ordering onto a
polluting predecessor. Evidence it is not the pipeline-alert change:
StalePipelineExecutionTestandPipelineStatusComparisonTestimmediately before it in one JVM leaves it green (9/9), and neitheruses
mockStatic, so neither can leak one;2.0(Backport #32181 to 2.0: stop pipeline alerts firing for historical and re-ingested executions #32589) passes the same suite;The reason
2.0is immune is that upstream already fixed this test inb16f585789, which is on2.0andmainbut never reached1.13: it changeselse { assertNotNull(auth); assertNotNull(authz); }to
else if (auth != null) { assertNotNull(auth); }and adds a comment saying the singleton mayalready be initialised. This commit applies exactly that, so the method is now byte-identical to the
one
2.0andmainalready run. Test-only, no production code.Tests:
Unit tests
mvn -pl openmetadata-service -am package -Dtest='StalePipelineExecutionTest,PipelineStatusComparisonTest,AlertUtilTest,AbstractEventConsumerTest,SearchRepositoryBehaviorTest'run on this branch: 187 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. The one IT the original PR touched does not exist on this
branch (see resolution 3 above).
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). The backport carries byte-identical logic, so
nothing there is re-litigated here.
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-sonarcloud-ciis red on every base-1.13PR that touches Java and is not caused by thischange:
pull_request_targetruns the workflow from the default branch, and itsRestore openmetadata-ui dist cachestep uses.github/actions/cache-ui-dist, which does not existon
1.13. Same failure on the merged base-1.13Java backport #32536.UI screen recording / screenshots:
Not applicable.
Checklist:
Fixes #31782.