Repository navigation
Fixes #33324: let a force-sync refresh connector-supplied custom properties - #35622
Merged
Merged
Conversation
…erties
Connector-supplied `extension` values landed only on an entity's first write.
EntityRepository.updateExtension reverts any bot PUT to the stored extension,
and ingestion authenticates as ingestion-bot over the bulk PUT path, so a
changed custom property never propagated and a newly added one never appeared.
Deleting and re-ingesting the entity was the only workaround.
The guard itself is right - it stops a scheduled re-sync from clobbering custom
properties a user curated in the UI. What it lacked was the opt-out every
comparable field already has. overrideMetadata is set on the updater and read
in updateDescription, updateDisplayName, updateTags and updateCertification,
but updateExtension never consulted it: 0 of the 25 references in the class
were in that method. It now follows the same shape as its four siblings - the
bot guard applies unless overrideMetadata is set and the incoming extension is
non-empty.
Emptiness is tested through the nullOrEmpty(JsonNode) overload rather than
nullOrEmpty(Object), which stringifies an empty map to "{}" and would call it
non-empty. A connector that is not collecting custom properties sends no
extension, and that absence must not blank the stored ones.
A force-sync merges rather than replaces. The diff below the guard treats a
stored key the request omits as a deletion, so a plain replace would drop
custom properties a user set in the UI the moment any connector force-synced
one property of its own - reintroducing the exact loss the guard prevents.
Tags can afford replace semantics because TagLabel carries LabelType and the
update path filters on it; a custom property carries no provenance at all, and
ingestion only ever sends the properties its own source produces. So the keys
the connector sends win and the rest are left alone.
The cost of that choice: a property removed at the source lingers until someone
deletes it. Removing it automatically needs per-key provenance to tell a
connector-owned property from a curated one, which is the larger design #33324
raises as the alternative and is not attempted here.
Scope: updateExtension is on the generic EntityUpdater, so this reaches every
entity type and every writer of an extension - Athena and Glue via the table
hook, dbt on Metric, SAS on Table. Default behaviour is unchanged, because
overrideMetadata defaults to false; nothing moves unless an operator has
explicitly turned on Override Metadata for that pipeline.
Tests: EntityRepositoryExtensionTest, 7 cases driving updateExtension through
the updater. Three fail without the change - a bot PUT under overrideMetadata
leaving a value stale, dropping a newly added property, and losing a curated
property the connector does not send. The other four pin the behaviour that
must not move: a bot PUT without overrideMetadata keeps the stored extension,
a null or empty incoming extension never blanks it, and a human PUT still
applies.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
A force-sync merges the incoming extension over the stored one rather than replacing it. Tags do replace under the same flag and can afford to, because TagLabel carries LabelType; a custom property has no provenance at all, so the merge reads like an inconsistency someone could tidy away. The squash-merge drops the PR description, so the rule goes in the tree and is cited from the Javadoc. Also tests mergedOverStoredExtension's non-object path, taking it to 7/7 lines. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Code Review ✅ Approved🔴 High risk · Enabling overrideMetadata lets connector values replace matching stored custom properties across entity types, which could overwrite user-curated values. Lets a force-sync refresh connector-supplied custom properties when Override Metadata is enabled, by merging the incoming extension over the stored one so keys the connector sends update and keys it omits are kept. No issues found. VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
yan-3005
approved these changes
Oct 16, 2026
harshsoni2024
added this pull request to the merge queue
Oct 17, 2026
1 task done
harshsoni2024
added a commit
that referenced
this pull request
Oct 19, 2026
This was referenced Oct 19, 2026
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.
Describe your changes:
Fixes #33324
Connector-supplied custom properties landed on an entity's first write and never changed
again. A corrected source value did not propagate, and a property added at the source never
appeared. Deleting and re-ingesting the entity was the only workaround.
EntityRepository.updateExtensionreverts every bot PUT to the stored extension. Ingestionauthenticates as
ingestion-botand writes over the bulk PUT path, so that guard caught everyingestion run:
The guard is right — it stops a scheduled re-sync from overwriting custom properties a user
curated in the UI. What it lacked was the opt-in that every comparable field already honours.
overrideMetadatais set on the updater and read byupdateDescription,updateDisplayName,updateTagsandupdateCertification, but 0 of the class's 25overrideMetadatareferenceswere inside
updateExtension. It now takes the same shape as its four siblings.Default behaviour does not change:
overrideMetadatadefaults tofalse, so nothing moves untilan operator turns on Override Metadata for that pipeline.
Type of change:
High-level design:
Small diff, but it sits in the generic
EntityUpdaterand makes one non-obvious choice, so it isworth stating rather than leaving as N/A.
A force-sync merges; it does not replace. The diff below the guard treats a stored key the
request omits as a deletion. Ingestion only ever sends the properties its own source produces —
Glue sends Glue parameters, dbt sends its own — so simply honouring
overrideMetadataand lettingthe existing diff run would delete every custom property a user had added in the UI the first time
any connector force-synced a single property of its own. That is precisely the loss the bot guard
exists to prevent, so the incoming extension is merged over the stored one: keys the request
carries win, keys it omits are kept.
Why not match tags, which do replace under the same flag?
TagLabelcarriesLabelTypeandthe tag path filters on it, so a manual label survives. A custom property value carries no
provenance at all — the server cannot tell a connector-owned key from a hand-curated one. The two
are only superficially alike.
Rejected: per-key extension provenance, the other option #33324 raises. It would also let a
force-sync delete properties the source dropped, but it needs a schema and migration for ownership
and changes every writer of an extension. Out of scope for a bug fix.
Cost, stated plainly: a property deleted at the source lingers until someone removes it by
hand. That is the trade for not deleting curated data, and it is what provenance would later fix.
Recorded as
docs/decisions/2026-10-16-a-force-sync-merges-connector-supplied-custom-properties.mdand cited from the Javadoc, because a later contributor could reasonably "simplify" the merge into
a replace, and this description is gone from
git logafter the squash-merge.Blast radius:
updateExtensionis on the genericEntityUpdater, so this reaches every entitytype and every writer of an extension — Athena and Glue via the table hook, dbt on
Metric, SAS onTable.Tests:
Use cases covered
now reaches the already-ingested table instead of being reverted.
ones — covered for both
nulland{}.Unit tests
Added:
openmetadata-service/src/test/java/org/openmetadata/service/jdbi3/EntityRepositoryExtensionTest.java(8 cases, driving
updateExtensionthrough a realEntityUpdater).Three fail without the production change — the issue's exact symptoms:
botPutWithOverrideMetadataAppliesIncomingExtensionexpected: <refreshed> but was: <stale>botPutWithOverrideMetadataAddsNewlyIntroducedPropertyexpected: <30> but was: <null>botPutWithOverrideMetadataKeepsPropertyTheConnectorDoesNotSendexpected: <refreshed> but was: <stale>The other five pin behaviour that must not move, and pass against the unfixed code — so they
are real regression guards, not artefacts of the change:
botPutWithoutOverrideMetadataKeepsStoredExtension,botPutOmittingExtensionWithOverrideMetadataKeepsStoredExtension,botPutWithEmptyExtensionAndOverrideMetadataKeepsStoredExtension,botPutWithOverrideMetadataPassesANonObjectExtensionThrough,humanPutAppliesIncomingExtensionWithoutOverrideMetadata.Commands run:
Coverage (
jacoco:prepare-agent test jacoco:report), on the changed code:keepsStoredExtension(new)mergedOverStoredExtension(new)The uncovered branch is the half of
!stored.isObject() \|\| !incoming.isObject()where the storedextension is a non-object, which the schema does not allow to occur.
EntityRepository.javaas a whole is 28.9% line-covered by unit tests, well under the 90%target. That is pre-existing and structural, not a gap this PR introduces: this class is exercised
almost entirely by the integration suite rather than by unit tests. The lines this PR adds are
fully covered.
Backend integration tests
Integration tests were NOT run locally.
EntityRepository.javatriggers areacore's fullsuite in
.github/java-tests/impact-map.json, so the planner selects 423 IT classes across 7lanes (mysql-elasticsearch parallel/isolated/rdf, cache-tests parallel/isolated,
postgres-opensearch parallel/isolated/search-it) plus 5 nightly-only suites. That needs Docker and
hours of wall time.
Given the blast radius this should be run before merge:
BulkOverrideMetadataITandColumnCustomPropertiesITare the two most directly relevant classesin that set.
Ingestion integration tests
ingestion/changes. The fix is server-side; the connectors alreadysend the extension correctly (fix(glue): ingest AWS Glue table parameters as custom properties #33333, Support Custom Properties for AWS Glue Catalog #31467).
Playwright (UI) tests
Not applicable — no files under
openmetadata-ui/.Manual testing performed
None against a live stack for this fix — it is verified by the unit tests above, three of which
reproduce the reported symptoms and fail without the change.
The bug was confirmed live while building #33333: re-running a Glue pipeline against an
already-ingested service showed no updated custom properties, which is what prompted #33324.
Steps for a reviewer who wants to confirm the fix end to end:
./docker/run_local_docker.sh -m ui -d mysqlpipeline and run it against a fresh service. Confirm the table's Custom Properties.
the hand-added property is still there.
Step 6 is the whole PR; step 4 is the regression check.
UI screen recording:
Not applicable — backend-only bug fix in
openmetadata-service, no UI surface.Checklist:
Fixes <issue-number>: <short explanation>Fixes #<issue-number>above.docs/decisions/2026-10-16-a-force-sync-merges-connector-supplied-custom-properties.md, citedfrom the
mergedOverStoredExtensionJavadoc.EntityRepositoryExtensionTestnames Connector-supplied custom properties never update after the first ingestion #33324 in its class Javadoc.
🤖 Generated with Claude Code
The saved-result test required by the repository’s testing rule is still needed before merging.
Findings
Summary
Bot PUTs with
overrideMetadatacan refresh custom properties without dropping stored keys that the connector omits.Reviews (2) · Last reviewed commit: "fix(test): updateExtension behaviour" · Reviewed by Greptile