Repository navigation
Fixes 25991: Enable https scheme support for Druid connector - #27513
mohitjeswani01 wants to merge 7 commits into
Conversation
|
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! |
There was a problem hiding this comment.
Pull request overview
Expands the Druid ingestion connector’s connection schema to allow explicit druid+http and druid+https SQLAlchemy URL schemes, enabling connectivity to secured endpoints while keeping druid as the default for backward compatibility.
Changes:
- Updated
druidConnection.jsonto extend thedruidSchemeenum withdruid+httpanddruid+https. - Extended ingestion unit tests to validate URL building for the new schemes.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| openmetadata-spec/src/main/resources/json/schema/entity/services/connections/database/druidConnection.json | Adds druid+http and druid+https to supported Druid schemes while preserving the default. |
| ingestion/tests/unit/test_source_connection.py | Adds assertions that Druid URL construction supports the new schemes. |
|
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! |
|
Hi @harshach , I have addressed all the feedback from the bots (Gitar and Copilot) by updating the unit tests to use the generated DruidScheme enum members instead of raw string literals. This ensures better type-safety and consistency across the ingestion framework. Could you please review and kindly add the safe to test label so the CI workflows can run? Thank you for your time!🙏 |
|
@mohitjeswani01 since druid is available as docker, it would be good to write a integration test to make sure this works. Check the integration tests for ingestion |
|
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! |
thanks for informing @harshach sir👋 Added an integration test for the Druid connector as requested. Created ingestion/tests/integration/druid/ following the
The test uses DruidScheme.druid (plain http) for container |
There was a problem hiding this comment.
Pull request overview
Expands the Druid database connection schema to support SQLAlchemy-style driver schemes for secured endpoints (druid+http, druid+https), and updates ingestion tests to validate URL construction and basic Druid ingestion behavior.
Changes:
- Extended
druidSchemeenum in the Druid connection JSON schema to includedruid+httpanddruid+https. - Updated unit tests to assert correct URL generation for the new schemes.
- Added a Druid integration test (with dockerized Druid) to validate metadata ingestion path.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| openmetadata-spec/src/main/resources/json/schema/entity/services/connections/database/druidConnection.json | Adds druid+http / druid+https to the supported scheme enum. |
| ingestion/tests/unit/test_source_connection.py | Extends Druid URL unit test coverage to the new scheme variants. |
| ingestion/tests/integration/druid/test_metadata.py | New integration test validating Druid workflow discovers schemas. |
| ingestion/tests/integration/druid/conftest.py | New Druid container + service setup fixtures for integration testing. |
| ingestion/tests/integration/druid/init.py | Adds package marker for the new integration test folder. |
|
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! |
|
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! |
There was a problem hiding this comment.
Pull request overview
Expands the Druid connector connection schema to support explicit druid+http and druid+https SQLAlchemy schemes, and adds tests to validate URL construction and basic end-to-end metadata ingestion against a Druid container.
Changes:
- Extend
druidSchemeenum in the Druid connection JSON schema to includedruid+httpanddruid+https. - Update unit tests to assert the Druid connection URL builder emits the new schemes correctly.
- Add a new Druid integration test suite using
testcontainersto validate metadata ingestion against a running Druid instance.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| openmetadata-spec/src/main/resources/json/schema/entity/services/connections/database/druidConnection.json | Adds druid+http and druid+https to the allowed connection schemes. |
| ingestion/tests/unit/test_source_connection.py | Extends the Druid URL unit test to cover the new schemes. |
| ingestion/tests/integration/druid/conftest.py | Introduces a Druid container fixture + service creation request for integration testing. |
| ingestion/tests/integration/druid/test_metadata.py | Runs a metadata workflow and asserts Druid schemas are discovered. |
| ingestion/tests/integration/druid/init.py | Adds package marker for the new Druid integration test suite. |
75cdc25 to
ff2c114
Compare
|
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! |
|
hi @harshach , @PubChimps sir may i get a |
|
Thanks for the PR. This needs to be updated against the latest Could you please rebase on |
|
done @ayush-shah |
|
This PR has had no activity for 30 days and will be closed in 7 days if no further activity occurs. |
|
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! |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Suppressed comments (1)
openmetadata-spec/src/main/resources/json/schema/entity/services/connections/database/druidConnection.json:20
- The schema enum has been expanded, but the committed UI generated TypeScript still defines
DruidSchemeas only"druid"(seeopenmetadata-ui/src/main/resources/ui/src/generated/entity/services/connections/database/druidConnection.ts). Please regenerate and commit the updated UI generated types so the UI can represent/selectdruid+httpanddruid+httpsconsistently with the schema.
"druidScheme": {
"description": "SQLAlchemy driver scheme options.",
"type": "string",
"enum": ["druid", "druid+http", "druid+https"],
"default": "druid"
}
| config=DruidConnection( | ||
| scheme=DruidScheme.druid, | ||
| hostPort=f"{druid_container.get_container_host_ip()}:{druid_container.get_exposed_port(8082)}", | ||
| ) |
|
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! |
Code Review ✅ Approved 1 resolved / 1 findingsExpands the Druid connection schema and URL builder to support HTTP and HTTPS schemes with comprehensive unit and integration tests. No issues found. ✅ 1 resolved✅ Quality: Tests use string literals instead of DruidScheme enum members
OptionsDisplay: compact → Showing less information. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Suppressed comments (2)
ingestion/tests/unit/test_source_connection.py:483
metadata.ingestion.source.database.pinotdb.connectionsimilarly does not export a module-levelget_connection_urlfunction; it only definesPinotDBConnection.get_connection_url(...)as a staticmethod. Importingget_connection_urlhere will fail. Update the test to call the handler’s staticmethod (or import the handler class) instead.
from metadata.ingestion.source.database.pinotdb.connection import (
get_connection_url,
)
expected_url = "pinot://localhost:8099/query/sql?controller=http://localhost:9000/"
pinot_conn_obj = PinotDBConnection(
scheme=PinotDBScheme.pinot,
hostPort="localhost:8099",
openmetadata-spec/src/main/resources/json/schema/entity/services/connections/database/druidConnection.json:19
- The schema enum was expanded, but the committed UI generated type for Druid still only allows
"druid"(see openmetadata-ui/src/main/resources/ui/src/generated/entity/services/connections/database/druidConnection.ts:172-174). Please regenerate and commit the updated UI generated types so the UI and schema stay in sync and the new scheme values are selectable.
"description": "SQLAlchemy driver scheme options.",
"type": "string",
"enum": ["druid", "druid+http", "druid+https"],
"default": "druid"
| from metadata.ingestion.source.database.druid.connection import ( | ||
| get_connection_url, | ||
| ) | ||
|
|
||
| expected_url = "druid://localhost:8082/druid/v2/sql" | ||
| druid_conn_obj = DruidConnection(scheme=DruidScheme.druid, hostPort="localhost:8082") | ||
| assert expected_url == get_connection_url(druid_conn_obj) | ||
|
|
||
| expected_url = "druid+http://localhost:8082/druid/v2/sql" | ||
| druid_conn_obj = DruidConnection(scheme=DruidScheme.druid_http, hostPort="localhost:8082") | ||
| assert expected_url == get_connection_url(druid_conn_obj) | ||
|
|
||
| expected_url = "druid+https://localhost:8082/druid/v2/sql" | ||
| druid_conn_obj = DruidConnection(scheme=DruidScheme.druid_https, hostPort="localhost:8082") | ||
| assert expected_url == get_connection_url(druid_conn_obj) |
| def test_vertica_url(self): | ||
| expected_url = "vertica+vertica_python://username:password@localhost:5443/database" | ||
| vertica_conn_obj = VerticaConnection( |
|
The Python checkstyle failed. Please run You can install the pre-commit hooks with |
|
|
Thanks a lot for this @mohitjeswani01 — the schema change is right, and it's now on its way in. Since this PR comes from a fork we can't push to, I've cherry-picked your commits into #32120 with your authorship preserved and finished the remaining work on top:
Closing in favour of #32120. Thanks again for the contribution and for sticking with the review! |
|
Merged it here #32120 |


Description:
Fixes #25991
I worked on expanding the Druid connection JSON schema to officially support the
druid+httpanddruid+httpsschemes because the connector previously lacked the ability to connect to secured endpoints.What changes did you make?
druidConnection.jsonto expand thedruidSchemeenum from["druid"]to["druid", "druid+http", "druid+https"].defaultvalue as"druid". Therefore, no JSON migration scripts are necessary since existing connections will default correctly and remain completely unaffected.How did I test my changes?
make generate.make install_test).ingestion/tests/unit/test_source_connection.pyto assert that the URL builder correctly consumesdruid+httpanddruid+https.pytestlocally which successfully passed.Screenshots proving local test success:
Result

Type of change:
Checklist:
Fixes 25991: Enable https scheme support for Druid connectorSummary by Gitar
DatabricksConnectionandUnityCatalogConnectionto verify connection URL generation.DatabricksPipelineConnectionpatterns.Druidintegration tests usingtestcontainersandpytestfixtures to verify metadata discovery.This will update automatically on new commits.
Greptile Summary
This PR adds HTTP and HTTPS scheme support to the Druid connector. The main changes are:
druid+httpanddruid+httpsto the connection schema.Confidence Score: 4/5
The updated code introduces no additional blocking issue that requires a separate change.
Important Files Changed
Reviews (3): Last reviewed commit: "Merge branch 'main' into fix/25991-druid..." | Re-trigger Greptile
Context used: