Skip to content

add https support for Druid connector#27634

Open
Nitin2332 wants to merge 1 commit intoopen-metadata:mainfrom
Nitin2332:fix/druid-https-support
Open

add https support for Druid connector#27634
Nitin2332 wants to merge 1 commit intoopen-metadata:mainfrom
Nitin2332:fix/druid-https-support

Conversation

@Nitin2332
Copy link
Copy Markdown

@Nitin2332 Nitin2332 commented Apr 22, 2026

Describe your changes:

Fixes #25991

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.

Summary by Gitar

  • Schema updates:
    • Added druid+https option to druidScheme in druidConnection.json.
  • Connector logic:
    • Updated connection.py to set use_https in connection arguments when druid+https scheme is selected.
  • Testing:
    • Added unit test in test_source_connection.py to verify HTTPS connection URL generation.
  • Documentation:
    • Updated Druid.md to provide instructions on using druid+https for HTTPS connections.

This will update automatically on new commits.

@Nitin2332 Nitin2332 requested review from a team as code owners April 22, 2026 15:34
@github-actions
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!

Comment on lines +48 to +51
if connection.scheme.value == "druid+https":
if not connection.connectionArguments:
connection.connectionArguments = init_empty_connection_arguments()
connection.connectionArguments.root["use_https"] = True
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Quality: New HTTPS connection logic in get_connection() is untested

The new test test_druid_https_url only verifies URL generation via get_connection_url(), but the actual new logic that injects use_https=True into connectionArguments (lines 48-51 of connection.py) lives in get_connection() and is not covered by any test. If someone later refactors this code and breaks the use_https injection, no test would catch it.

Suggested fix:

Add a test that calls `get_connection` (or directly exercises the `get_connection` logic) with `scheme=druid+https` and asserts that `connection.connectionArguments.root["use_https"]` is `True` after the function runs. You could also verify the case where `connectionArguments` is already set to ensure it's preserved rather than overwritten.

Was this helpful? React with 👍 / 👎 | Reply gitar fix to apply this suggestion

@gitar-bot
Copy link
Copy Markdown

gitar-bot Bot commented Apr 22, 2026

Code Review 👍 Approved with suggestions 0 resolved / 1 findings

Adds HTTPS support for the Druid connector by updating connection arguments. Please add unit tests to verify the new HTTPS connection logic in get_connection().

💡 Quality: New HTTPS connection logic in get_connection() is untested

📄 ingestion/src/metadata/ingestion/source/database/druid/connection.py:48-51 📄 ingestion/tests/unit/test_source_connection.py:656-666

The new test test_druid_https_url only verifies URL generation via get_connection_url(), but the actual new logic that injects use_https=True into connectionArguments (lines 48-51 of connection.py) lives in get_connection() and is not covered by any test. If someone later refactors this code and breaks the use_https injection, no test would catch it.

Suggested fix
Add a test that calls `get_connection` (or directly exercises the `get_connection` logic) with `scheme=druid+https` and asserts that `connection.connectionArguments.root["use_https"]` is `True` after the function runs. You could also verify the case where `connectionArguments` is already set to ensure it's preserved rather than overwritten.
🤖 Prompt for agents
Code Review: Adds HTTPS support for the Druid connector by updating connection arguments. Please add unit tests to verify the new HTTPS connection logic in `get_connection()`.

1. 💡 Quality: New HTTPS connection logic in get_connection() is untested
   Files: ingestion/src/metadata/ingestion/source/database/druid/connection.py:48-51, ingestion/tests/unit/test_source_connection.py:656-666

   The new test `test_druid_https_url` only verifies URL generation via `get_connection_url()`, but the actual new logic that injects `use_https=True` into `connectionArguments` (lines 48-51 of `connection.py`) lives in `get_connection()` and is not covered by any test. If someone later refactors this code and breaks the `use_https` injection, no test would catch it.

   Suggested fix:
   Add a test that calls `get_connection` (or directly exercises the `get_connection` logic) with `scheme=druid+https` and asserts that `connection.connectionArguments.root["use_https"]` is `True` after the function runs. You could also verify the case where `connectionArguments` is already set to ensure it's preserved rather than overwritten.

Options

Display: compact → Showing less information.

Comment with these commands to change:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Druid add support for https connection

1 participant