Skip to content

Fixes #27842: Fix unitycataog error when httpPath is missing#27844

Merged
mohittilala merged 3 commits intomainfrom
fix/unitycatalog-no-httppath-connection-args
May 1, 2026
Merged

Fixes #27842: Fix unitycataog error when httpPath is missing#27844
mohittilala merged 3 commits intomainfrom
fix/unitycatalog-no-httppath-connection-args

Conversation

@mohittilala
Copy link
Copy Markdown
Contributor

@mohittilala mohittilala commented Apr 30, 2026

Describe your changes:

Fixes #27842

UnityCatalog connections results into AttributeError: 'NoneType' object has no attribute 'root' when httpPath parameter is not provided even though it being optional parameter. This PR aims to resolve the bug in connection.connectionArguments resolution when httpPath and connectionArguments are not provided in the connection.

Type of change:

  • Bug fix
  • Improvement
  • New feature
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • I have commented on my code, particularly in hard-to-understand areas.
  • For JSON Schema changes: I updated the migration scripts or explained why it is not needed.

Bug fix

  • I have added a test that covers the exact scenario we are fixing. For complex issues, comment the issue number in the test for future reference.

@mohittilala mohittilala self-assigned this Apr 30, 2026
Copilot AI review requested due to automatic review settings April 30, 2026 09:10
@mohittilala mohittilala requested a review from a team as a code owner April 30, 2026 09:10
@github-actions github-actions Bot added Ingestion safe to test Add this label to run secure Github workflows on PRs labels Apr 30, 2026
@mohittilala mohittilala added bug Something isn't working Unity Catalog python Pull requests that update python code labels Apr 30, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes a UnityCatalog ingestion crash when httpPath and connectionArguments are omitted by ensuring connection.connectionArguments is initialized before injecting auth args.

Changes:

  • Initialize connection.connectionArguments earlier in get_sqlalchemy_connection to avoid AttributeError when it is missing.
  • Add unit tests covering engine creation when httpPath/connectionArguments are unset and when httpPath is provided.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
ingestion/src/metadata/ingestion/source/database/unitycatalog/connection.py Initializes connectionArguments before adding http_path and auth args when building the SQLAlchemy engine.
ingestion/tests/unit/topology/database/test_unity_catalog_connection.py Adds regression/unit coverage for missing httpPath/connectionArguments and basic engine creation scenarios.

Comment thread ingestion/tests/unit/topology/database/test_unity_catalog_connection.py Outdated
@github-actions
Copy link
Copy Markdown
Contributor

The Python checkstyle failed.

Please run make py_format and py_format_check in the root of your repository and commit the changes to this PR.
You can also use pre-commit to automate the Python code formatting.

You can install the pre-commit hooks with make install_test precommit_install.

Copilot AI review requested due to automatic review settings April 30, 2026 11:34
@gitar-bot
Copy link
Copy Markdown

gitar-bot Bot commented Apr 30, 2026

Code Review ✅ Approved

Handles missing httpPath by adding a null check in the UnityCatalog client, preventing potential runtime errors. No issues found.

Options

Display: compact → Showing less information.

Comment with these commands to change:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 30, 2026

🟡 Playwright Results — all passed (10 flaky)

✅ 3988 passed · ❌ 0 failed · 🟡 10 flaky · ⏭️ 86 skipped

Shard Passed Failed Flaky Skipped
🟡 Shard 1 298 0 1 4
🟡 Shard 2 749 0 5 8
🟡 Shard 3 744 0 2 7
✅ Shard 4 775 0 0 18
✅ Shard 5 687 0 0 41
🟡 Shard 6 735 0 2 8
🟡 10 flaky test(s) (passed on retry)
  • Features/MetricCustomUnitFlow.spec.ts › Should create metric and test unit of measurement updates (shard 1, 1 retry)
  • Features/ActivityAPI.spec.ts › Activity event is created when description is updated (shard 2, 1 retry)
  • Features/ActivityAPI.spec.ts › Activity event shows the actor who made the change (shard 2, 1 retry)
  • Features/DataQuality/ColumnLevelTests.spec.ts › Column Value Mean To Be Between (shard 2, 1 retry)
  • Features/Glossary/GlossaryWorkflow.spec.ts › should display correct status badge color and icon (shard 2, 1 retry)
  • Features/Glossary/GlossaryWorkflow.spec.ts › should start term as Draft when glossary has reviewers (shard 2, 1 retry)
  • Features/Permissions/DataProductPermissions.spec.ts › Data Product deny operations (shard 3, 1 retry)
  • Features/RTL.spec.ts › Verify Following widget functionality (shard 3, 1 retry)
  • Pages/Lineage/LineageFilters.spec.ts › Verify lineage schema filter selection (shard 6, 1 retry)
  • Pages/Lineage/LineageRightPanel.spec.ts › Verify custom properties tab IS visible for supported type: searchIndex (shard 6, 1 retry)

📦 Download artifacts

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

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 1, 2026

@mohittilala mohittilala merged commit 0fb6954 into main May 1, 2026
111 of 114 checks passed
@mohittilala mohittilala deleted the fix/unitycatalog-no-httppath-connection-args branch May 1, 2026 13:23
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 1, 2026

Changes have been cherry-picked to the 1.13 branch.

github-actions Bot pushed a commit that referenced this pull request May 1, 2026
* Fix unitycataog error when httpPath is missing

* py_format

* Drop redundant restoration test

(cherry picked from commit 0fb6954)
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 1, 2026

Changes have been cherry-picked to the 1.12.7 branch.

github-actions Bot pushed a commit that referenced this pull request May 1, 2026
* Fix unitycataog error when httpPath is missing

* py_format

* Drop redundant restoration test

(cherry picked from commit 0fb6954)
mohittilala added a commit that referenced this pull request May 1, 2026
* Fix unitycataog error when httpPath is missing

* py_format

* Drop redundant restoration test
@mohittilala
Copy link
Copy Markdown
Contributor Author

mohittilala commented May 1, 2026

Manually cherry-picked to 1.12.6 for 1.12.6.4 patch- b9d8846

jatinmasaram pushed a commit to jatinmasaram/OpenMetadata that referenced this pull request May 2, 2026
…sing (open-metadata#27844)

* Fix unitycataog error when httpPath is missing

* py_format

* Drop redundant restoration test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working Ingestion python Pull requests that update python code safe to test Add this label to run secure Github workflows on PRs To release Will cherry-pick this PR into the release branch Unity Catalog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unity Catalog Ingestion Fails When httpPath is Missing

3 participants