Repository navigation
Fixes #28505: replace tags when overriding metadata - #32496
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 |
Code Review ✅ ApprovedFixes tag replacement behavior when 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 |
There was a problem hiding this comment.
🟢 Approval recommended
The change is targeted to the reported root cause, preserves the “omitted fields don’t clobber curated metadata” behavior, and includes meaningful integration tests that would fail under the prior merging logic.
Pull request overview
This PR updates the backend tag update semantics for bulk PUT operations when overrideMetadata=true, so that explicitly provided tags replace existing tags (avoiding mutually-exclusive conflicts), while omitted tags continue to preserve curated tag state. It also adds integration coverage to prevent regressions.
Changes:
- Adjusted
EntityRepository.updateTags()to treat a bulkPUTwithoverrideMetadata=trueand non-empty tags as a replace operation (instead of merge). - Added integration tests in
BulkOverrideMetadataITcovering table/column mutually-exclusive tag replacement and the “tags omitted → preserve” behavior. - Updated the table fetch helper in the test to request
columns,tagsfields for assertions.
File summaries
| File | Description |
|---|---|
| openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/EntityRepository.java | Changes bulk PUT tag handling under overrideMetadata to replace (not merge) when tags are explicitly supplied, preventing mutually-exclusive tag conflicts. |
| openmetadata-integration-tests/src/test/java/org/openmetadata/it/tests/BulkOverrideMetadataIT.java | Adds regression coverage ensuring override runs replace mutually exclusive tags for tables/columns and preserve tags when omitted. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
✅ Playwright Results — workflow succeededValidated commit ✅ 557 passed · ❌ 0 failed · 🟡 0 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) 55m 30s ⏱️ Max setup 4m 55s · max shard execution 18m 13s · max shard-job elapsed before upload 22m 19s · reporting 5s 🌐 215.05 requests/attempt · 2.82 app boots/UI scenario · 12.72% common-shard skew Optimization targets still in progress:
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
🚦 Removed from the merge queue —
|
Describe your changes:
Fixes #28505
Honor
overrideMetadatawhen a bot bulk PUT explicitly supplies tags. Explicit tags now replace existing tags instead of being merged, while omitted tags continue to preserve curated metadata.Type of change:
High-level design:
N/A — small change.
Tests:
Use cases covered
Backend integration tests
BulkOverrideMetadataIT.Ingestion integration tests
Playwright (UI) tests
Manual testing performed
Ran a custom database metadata ingestion against a local stack with Override Metadata enabled. Replaced the connector tag manually with another mutually exclusive tag, reran ingestion, and verified the connector tag replaced it without HTTP 400.
UI screen recording / screenshots:
Not applicable.
Checklist:
Fixes <issue-number>: <short explanation>.Fixes #<issue-number>above.