Repository navigation
Fixes 5970: report Oracle foreign-key referred_table verbatim (backport 2.0 #34302) - #34415
Conversation
Backport of #34302 to 2.0, connector fix and unit tests only. get_table_names returns the data dictionary name verbatim, so a table is stored as schema.CUSTOMERS, while get_foreign_keys reported referred_table through normalize_name as customers. common_db_source looks the referred table up by exact FQN, so it never matched: the constraint was discarded with no error, no warning and a reported 100% workflow success, leaving tableConstraints empty for every Oracle table. Taking row[3] as stored matches get_table_names by construction, in both identifier modes and for tables created with quoted lowercase or mixed-case names. No FQN changes, so nothing is renamed and no migration is needed. test_oracle_constraint_reflection.py asserted the normalised referred_table and so pinned the behaviour this fixes; its expectation is updated. The v2 E2E suite from #34302 is not backported: ingestion/tests/cli_e2e_v2 does not exist on 2.0, since the framework from #27949 was never backported. Two pre-existing failures in test_oracle.py on 2.0, both about stored-procedure schema casing, are unaffected: they fail identically with and without this change.
❌ 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 |
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
✅ Playwright Results — workflow succeededValidated commit ✅ 110 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) 47m 36s ⏱️ Max setup 3m 8s · max shard execution 12m 19s · max shard-job elapsed before upload 17m 18s · reporting 4s 🌐 210.03 requests/attempt · 1.79 app boots/UI scenario · 0.00% 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 |
Code Review ✅ Approved🟡 Medium risk · Oracle foreign-key reflection now preserves dictionary casing during metadata ingestion. Fixes Oracle foreign-key resolution by reporting OptionsDisplay: compact → Counting what did not apply, without listing it. 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:
Fixes open-metadata/openmetadata-collate#5970
Backport of #34302 to
2.0— connector fix and unit tests only.Type of change:
High-level design:
Two Oracle code paths disagreed about identifier case:
get_table_namesCUSTOMERS(dictionary name, verbatim)…schema.CUSTOMERSget_foreign_keyscustomers(vianormalize_name)…schema.customerscommon_db_source._get_foreign_constraintslooks the referred table up by exact FQN, so it never matched. The constraint was discarded with no error, no warning, and a reported 100% workflow success —tableConstraintscame back empty for every Oracle table.get_table_namesreturnsrow[0]as stored, so takingrow[3]as stored matches it by construction — in both identifier modes, and for tables created with quoted lowercase or mixed-case names. No FQN changes, so nothing is renamed and no migration or reindex is needed.test_oracle_constraint_reflection.pyasserted the normalisedreferred_tableand so pinned the behaviour this fixes; its expectation is updated. That is the only pre-existing assertion this PR changes.What is deliberately not backported:
The v2 E2E suite from #34302.
ingestion/tests/cli_e2e_v2does not exist on2.0— the framework from #27949 was never backported — so the suite, its CI matrix entry and the v2 README changes have nothing to attach to. The connector fix stands on its own and is covered here by unit tests.Tests:
test_oracle_foreign_key_case.pyis new and fails against the unfixed implementation. It covers bothpreserveIdentifierCasemodes and verbatim pass-through for uppercase, quoted lowercase and mixed-case dictionary names. 50 Oracle unit tests pass.Two failures in
test_oracle.pyabout stored-procedure schema casing are pre-existing on2.0and unrelated — verified identical with and without this change.🤖 Generated with Claude Code