Repository navigation
fix(dataProducts): key ODPS import identity on productID, not display name - #33993
Conversation
… name ODPS import derived the entity name from the ODPS `name` (display label), sanitized: "[DEV] Alarms Info" became "DEV_Alarms_Info". `productID` (the stable ODPS identifier) was validated but never used. Since the merge path matches an existing product by entity name, re-importing a product whose display name differs from its slug never matched the existing one — it created a duplicate and left the original untouched. This also disagreed with our own exporter: toODPS writes productID from the entity identifier and name from displayName, so an exported document could not be re-imported onto itself. Map ODPS productID -> entity name (sanitized to an FQN-safe slug) and ODPS name -> displayName. Matching then keys on productID, so re-imports update the same product. Import and export are now symmetric. Updates ODPSConverterTest assertions to the new mapping and adds DataProductResourceIT#importFromODPS_matchesExistingProductByProductId, which fails without the fix (re-import creates a duplicate).
✅ PR checks passedThe linked issue has a description and all required Shipping project fields set. Thanks! |
🚦 Removed from the merge queue —
|
🚦 Removed from the merge queue —
|
…ctid-identity # Conflicts: # openmetadata-integration-tests/src/test/java/org/openmetadata/it/tests/DataProductResourceIT.java
🔄 Playwright impact map auto-refreshedThis PR touched specs or UI source that changed the source→spec routing map. I regenerated What is this file? It is the auto-generated half of Playwright's PR planner. It routes "if source X changes, run specs Y" by walking spec imports and cross-referencing What if I want to regenerate locally instead? Run this before pushing your next change to skip the bot commit: python3 .github/scripts/generate_playwright_impact_map.py
git add .github/playwright/impact-map.generated.json
git commit --amend --no-edit # or a separate commit |
…ctid-identity # Conflicts: # .github/playwright/impact-map.generated.json
The import resolves the target product by productID, but the modal guard still compared the ODPS display name, so a YAML whose name matched the current product could update (or create) a different one, and a re-import with an edited display name was blocked. Compare productID against the product FQN/name (or its sanitized slug, the backend fallback) instead.
🔄 Playwright impact map auto-refreshedThis PR touched specs or UI source that changed the source→spec routing map. I regenerated What is this file? It is the auto-generated half of Playwright's PR planner. It routes "if source X changes, run specs Y" by walking spec imports and cross-referencing What if I want to regenerate locally instead? Run this before pushing your next change to skip the bot commit: python3 .github/scripts/generate_playwright_impact_map.py
git add .github/playwright/impact-map.generated.json
git commit --amend --no-edit # or a separate commit |
Code Review ✅ Approved 4 closed / 4 findings🔴 High risk · The new productID-based import matching could update an unintended data product or create duplicates, disrupting stored metadata integrity. Switches ODPS import identity from the display-name slug to the All four issues raised this session were resolved: dotted-ID re-imports, export→re-import for non-slug names like ✅ 4 closed✅ Bug: Re-import still fails for productIDs containing '.'
✅ Bug: productID slugging breaks export→re-import for non-slug entity names
✅ Bug: UI overwrite guard still checks ODPS name, backend now targets productID
✅ Edge Case: Sanitized-match fallback lets guard pass when raw productID hits sibling
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 |
|
|



Fixes #33995
Problem
ODPS import derived a data product's entity name from the ODPS
name(the editable display label), sanitized into a slug — e.g."[DEV] Alarms Info"→"DEV_Alarms_Info". The ODPSproductID(the stable identifier) was validated as required but never used.Because the merge/update path matches an existing product by its entity name, this caused:
toODPSwritesproductIDfrom the entity identifier andnamefromdisplayName, so an exported document couldn't be re-imported onto itself.Fix
Map the ODPS fields onto OpenMetadata's identity/display split, mirroring the exporter:
productID→ entity name (sanitized to an FQN-safe slug) — the identifier and update keyname→ displayNameMatching keys on
productID, so a re-import updates the same product. Additional robustness:Customer 360) still matches instead of forking.com.acme.orders) match.Tests
ODPSConverterTestupdated to the new mapping + a productID-not-sanitizable fallback case (36/36 green).DataProductResourceIT:importFromODPS_matchesExistingProductByProductId(dotted productID re-import updates the same product) andimportFromODPS_matchesExistingNonSlugProductByProductId(Customer 360re-import updates, not forks). Verified RED→GREEN on a real MySQL + ES stack.Summary by Gitar
ODPSImportModalguard now validates the YAMLproductIDagainst the current product's FQN or name, not the ODPSnameproductIDThis will update automatically on new commits.