-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Description
Affected module
Backend
Describe the bug
ChangeEvent notifications for table column tag updates report duplicate tags in the ChangeDescription. When updating tags on a table column, the fieldsAdded
array
contains duplicate entries of the same tag, even though the entity itself stores only one instance.
To Reproduce
- Update tags on a table column (e.g., change from
PII.Sensitive
toPII.None
) - Observe the ChangeDescription in the generated ChangeEvent
- The
fieldsAdded
array shows duplicate tag entries:
fieldsAdded=[
FieldChange[name=columns.xxx.tags, newValue=[
{"tagFQN":"PII.None","name":"None",...},
{"tagFQN":"PII.None","name":"None",...} // duplicate
]]
]
Expected behavior
Each tag should appear only once in the ChangeDescription fieldsAdded
array, matching the actual entity state.
Root cause
EntityRepository.updateTags()
(line 4020-4067) pre-calculates addedTags
and deletedTags
, then passes these pre-populated lists to recordListChange()
.
However, recordListChange()
is designed to calculate diffs itself by adding to the provided lists, causing duplicates.
Other implementations like GlossaryTermRepository
correctly pass empty lists to recordListChange()
.
Version
- OpenMetadata version: main branch
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Status