Skip to content

Fixes 5970: report Oracle foreign-key referred_table verbatim (backport 2.0 #34302) - #34415

Merged
Khairajani merged 2 commits into
2.0from
backport/oracle-fk-case-2.0
Oct 6, 2026
Merged

Khairajani merged 2 commits into
2.0from
backport/oracle-fk-case-2.0

Conversation

@Khairajani

Copy link
Copy Markdown
Contributor

Describe your changes:

Fixes open-metadata/openmetadata-collate#5970

Backport of #34302 to 2.0 — connector fix and unit tests only.

Type of change:

  • Bug fix

High-level design:

Two Oracle code paths disagreed about identifier case:

Path Reports Result
get_table_names CUSTOMERS (dictionary name, verbatim) Table entity created as …schema.CUSTOMERS
get_foreign_keys customers (via normalize_name) FK points at …schema.customers

common_db_source._get_foreign_constraints 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 — tableConstraints came back empty for every Oracle table.

remote_table = row[3]

get_table_names returns row[0] as stored, so taking row[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.py asserted the normalised referred_table and 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_v2 does not exist on 2.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.py is new and fails against the unfixed implementation. It covers both preserveIdentifierCase modes and verbatim pass-through for uppercase, quoted lowercase and mixed-case dictionary names. 50 Oracle unit tests pass.

Two failures in test_oracle.py about stored-procedure schema casing are pre-existing on 2.0 and unrelated — verified identical with and without this change.

🤖 Generated with Claude Code

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.
@Khairajani
Khairajani requested a review from a team as a code owner October 1, 2026 21:46
@Khairajani
Khairajani requested review from mohittilala and removed request for a team October 1, 2026 21:46
@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

  • No GitHub issue is linked. Link an issue in the Development section of the PR (or add Fixes #12345 to the description). For a same-org cross-repo issue, add Fixes open-metadata/<repo>#123 to the description.

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 skip-pr-checks label.

@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

@github-actions

github-actions Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

✅ Playwright Results — workflow succeeded

Validated commit 37e63426a00e4285bf7ccf6f52ab2b2eb30b8991 in Playwright run 37278122905, attempt 1.

✅ 110 passed · ❌ 0 failed · 🟡 0 flaky · ⏭️ 0 skipped · 🧰 0 lifecycle flaky

Performance

Blocking 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:

  • Browser traffic was 210.03 requests per attempt (convergence target: fewer than 200).
  • Application boot ratio was 1.79 per UI scenario (216 boots / 121 scenarios; convergence target: at most 1).
Shard Passed Failed Flaky Skipped Lifecycle failed Lifecycle flaky
✅ Shard chromium-01 46 0 0 0 0 0
✅ Shard ingestion-01 30 0 0 0 0 0
✅ Shard ingestion-02 34 0 0 0 0 0

📦 Download artifacts

How to debug locally
# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip    # view trace

@Khairajani Khairajani added the safe to test Add this label to run secure Github workflows on PRs label Oct 5, 2026
@gitar-bot

gitar-bot Bot commented Oct 5, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

🟡 Medium risk · Oracle foreign-key reflection now preserves dictionary casing during metadata ingestion.

Fixes Oracle foreign-key resolution by reporting referred_table verbatim from the dictionary instead of normalizing it, ensuring FQN lookups match correctly. Includes new test coverage for both identifier case modes; all 50 Oracle unit tests pass.

Review coverage

📋 Rules No rules evaluated

🧪 Functional validation Not enabled · Set up

🤖 Auto-approval Not enabled · Set up

Options

Display: compact → Counting what did not apply, without listing it.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@sonarqubecloud

sonarqubecloud Bot commented Oct 5, 2026

Copy link
Copy Markdown

@Khairajani
Khairajani merged commit 7941704 into 2.0 Oct 6, 2026
98 of 99 checks passed
@Khairajani
Khairajani deleted the backport/oracle-fk-case-2.0 branch October 6, 2026 07:22

This branch was previously deployed

1 inactive deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test Add this label to run secure Github workflows on PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants