Fixes #27842: Fix unitycataog error when httpPath is missing#27844
Fixes #27842: Fix unitycataog error when httpPath is missing#27844mohittilala merged 3 commits intomainfrom
Conversation
There was a problem hiding this comment.
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.connectionArgumentsearlier inget_sqlalchemy_connectionto avoidAttributeErrorwhen it is missing. - Add unit tests covering engine creation when
httpPath/connectionArgumentsare unset and whenhttpPathis 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. |
|
The Python checkstyle failed. Please run You can install the pre-commit hooks with |
Code Review ✅ ApprovedHandles missing httpPath by adding a null check in the UnityCatalog client, preventing potential runtime errors. No issues found. OptionsDisplay: compact → Showing less information. Comment with these commands to change:
Was this helpful? React with 👍 / 👎 | Gitar |
🟡 Playwright Results — all passed (10 flaky)✅ 3988 passed · ❌ 0 failed · 🟡 10 flaky · ⏭️ 86 skipped
🟡 10 flaky test(s) (passed on retry)
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
|
|
Changes have been cherry-picked to the 1.13 branch. |
|
Changes have been cherry-picked to the 1.12.7 branch. |
|
Manually cherry-picked to 1.12.6 for 1.12.6.4 patch- b9d8846 |
…sing (open-metadata#27844) * Fix unitycataog error when httpPath is missing * py_format * Drop redundant restoration test



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 inconnection.connectionArgumentsresolution whenhttpPathandconnectionArgumentsare not provided in the connection.Type of change:
Checklist:
Fixes <issue-number>: <short explanation>Bug fix