Repository navigation
Backport #32350 to 1.13: emit ChangeEvents for bulk entity updates - #32536
Conversation
❌ 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 |
e8c3027 to
b3d32dd
Compare
Code Review ✅ Approved 1 resolved / 1 findingsBackport of #32350 to 1.13 that restores ✅ 1 resolved✅ Quality: Unused 2-arg BulkApi.upsert overload is dead code
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 #32350 (
Fixes #32092) to1.13. This is the branch the issue was reported against(1.13.3, Pylon 21043).
PUT /v1/{collection}/bulkpersisted entity updates and version history but wrote nochange_eventrow, so
Get Schema Changesalerts never fired on metadata ingestion, and no ingestion-driven updatewas auditable.
EntityUpdater.updateWithDeferredStore()(the bulk path) ranupdateInternal()withoutthe
captureIncrementalFromCurrentChange()step its three sibling entry points run, leavingincrementalChangeDescriptionnull, whichincrementalFieldsChanged()reads as "nothing changed".Every bulk update was therefore classified
ENTITY_NO_CHANGEand dropped bybuildChangeEventJsonForBulkOperation.Full analysis, blast radius and manual-test tables are in #32350.
This did not reach
1.13automatically: #32350 merged without theTo releaselabel, and thatworkflow no longer targets
1.13in any case.Type of change:
High-level design:
Two commits.
git cherry-pick -x a3e5f5f4b030c818f8a52b0bb99eab46a94d13e3, with one conflict resolved.1.13does not haveprivate boolean entityStored = false;(introduced by perf: one-transaction flush + async indexing write path, read-path fixes #28675, neverbackported). That line is context for the new javadoc hunk, not something Fixes #32092: emit ChangeEvents for bulk entity updates #32350 adds, so the
resolution drops it and keeps only the javadoc. Verified rather than eyeballed: the added and
removed lines of this commit are byte-identical to the
maincommit's, andBulkChangeEventIT.javais byte-identical to the file onmain.test: add the BulkApi harness helper required by BulkChangeEventIT on 1.13.openmetadata-integration-tests/.../it/util/BulkApi.javadoes not exist on1.13(it came in withImprove bulk endpoints for ingestion #28155 and fix(drive): add deleteStale endpoint and set File column FQNs on write #31375, neither backported), so the test would not compile. Added as a separate commit
so it reads as a test-harness prerequisite rather than part of the fix. It is
main's file trimmedto the two methods
BulkChangeEventITactually calls,botToken()andupsert(collection, requests, overrideMetadata, token). ThedeleteStale*helpers are omittedbecause they need
BulkDeleteStaleRequest, a schema that does not exist on1.13.?overrideMetadata=is a no-op here:1.13'sbulkCreateOrUpdatedoes not declare the queryparam, JAX-RS ignores unknown params, and every call site passes
false.Everything else the test needs is already present and signature-compatible on
1.13:DatabaseSchemaTestFactory.createSimple,DatabaseServiceTestFactory.createPostgres,SdkClients.{adminClient,getAdminToken,getServerUrl},JwtAuthProvider.tokenFor,RequestOptions.builder().queryParams,executeForString,eventSubscriptions(),ListResponseand
BulkOperationResult.The companion 2.0 backport is #32535.
Tests:
Backend integration tests
BulkChangeEventIT(6 cases), brought over unchanged.Ingestion integration tests
Playwright (UI) tests
Manual testing performed
Built and ran locally on this branch, all 11 modules from source in-reactor so the test exercises
this code and not a cached artifact:
spotless:checkonopenmetadata-serviceandopenmetadata-integration-testsis green.Negative control on this branch. Since the fix hunk had to be conflict-resolved here, I rebuilt
1.13with only thecaptureIncrementalFromCurrentChange()call removed and re-ran the suite:Same 4-of-6 signature reported on
mainin #32350, so the resolved hunk is the load-bearing one on1.13and the two no-op cases correctly pass either way. The tree was restored afterwards.Notes for reviewers
Carried over from #32350 and still applicable on
1.13:change_eventrows. This restores pre-1.13 volume for ingestion updates, bounded bythe existing
DataRetentionapp. Customers who created alerts while the bug was live have not seenthis traffic before. Worth a release note.
persistBulkUpdaters(), and sharesupdateWithDeferredStore()with this fix.Checklist:
On
skip-pr-checks: a PR whose base is not the default branch cannot create GitHub's nativeclosingIssuesReferenceslink, so the metadata gate has no way to see the linked issue and can never be satisfied here. The issue is #32092, already closed by #32350.