Skip to content

Respect remote_url_allow_hosts in the Hive metastore catalog - #119353

Merged
SmitaRKulkarni merged 7 commits into
masterfrom
Fix_hive_catalog_remotehostfilter
Oct 18, 2026
Merged

SmitaRKulkarni merged 7 commits into
masterfrom
Fix_hive_catalog_remotehostfilter

Conversation

@SmitaRKulkarni

@SmitaRKulkarni SmitaRKulkarni commented Sep 10, 2026 •

Copy link
Copy Markdown
Member

Changelog category (leave one):

  • Bug Fix (user-visible misbehavior in an official stable release)

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

Respect remote_url_allow_hosts in the Hive metastore catalog


Workflow [PR]
Sync PR [sync-upstream/pr/119353]

Version info

  • Merged into: 26.11.1.149-master (included in 26.11 and later)
  • Backported to: 26.10.3.13, 26.9.26.23, 26.8.35.23, 26.3.61.16

…l_allow_hosts` when connecting to the metastore, as the other catalog types already do.
@SmitaRKulkarni
SmitaRKulkarni marked this pull request as draft September 10, 2026 21:23
@clickhouse-gh

clickhouse-gh Bot commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [a5f230e]

Summary: ❌

job_name test_name status info comment
Stateless tests (arm_binary, ParallelReplicas, s3 storage, sequential) FAIL
03821_drop_workload_during_query_race FAIL cidb IGNORED

AI Review

Summary

HiveCatalog now enforces remote_url_allow_hosts before initial connections and reconnects, rejects control characters in hostnames, and propagates host-filter exceptions. The earlier NUL-hostname bypass is addressed. No actionable findings remain.

Missing context / blind spots
  • ⚠️ Integration results for head a5f230e1f900766af156d2949504821b9ccda4bf are still pending. No local ClickHouse build was available to run the tests; confirm test_hive_catalog_host_filter and test_hive_catalog_host_filter_rejects_nul pass in a build with Hive support.
Final Verdict

Status: ✅ Approve. No code changes requested; normal CI must complete.

@clickhouse-gh clickhouse-gh Bot added the comp-datalake Data lake table formats (Iceberg/Delta/Hudi) integration. label Sep 10, 2026
@clickhouse-gh clickhouse-gh Bot added the pr-bugfix Pull request with bugfix, not backported by default label Sep 11, 2026
@SmitaRKulkarni
SmitaRKulkarni marked this pull request as ready for review September 11, 2026 08:39
@SmitaRKulkarni
SmitaRKulkarni requested review from scanhex12 and a lite review from Copilot September 11, 2026 08:40

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Note

Copilot was unable to run its full agentic suite in this review.

Pull request overview

This PR fixes Hive metastore catalog behavior to honor remote_url_allow_hosts, preventing disallowed HMS endpoints from being contacted.

Changes:

  • Add a RemoteHostFilter check before opening the Thrift socket in HiveCatalog.
  • Update HiveCatalog to use Context so it can access the configured host filter.
  • Add an integration test covering both “no filter configured” and “empty allow-list” cases.

Reviewed changes

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

File Description
tests/integration/test_allowed_url_from_config/test.py Adds an integration test validating host filtering behavior for the Hive catalog.
src/Databases/DataLake/HiveCatalog.cpp Enforces remote_url_allow_hosts by checking host/port via Context before connecting to HMS.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/Databases/DataLake/HiveCatalog.cpp Resolved
@clickhouse-gh

clickhouse-gh Bot commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

Build profile diff (arm_release)

Commit a5f230e1f900766af156d2949504821b9ccda4bf was not compared: the CI logs cluster did not answer (every POST attempt failed with an exception).

See the job log for details.

Comment thread src/Databases/DataLake/HiveCatalog.cpp Resolved
Comment thread src/Databases/DataLake/HiveCatalog.cpp Resolved
@SmitaRKulkarni

Copy link
Copy Markdown
Member Author

03821_drop_workload_during_query_race fail is not related to this pr

@SmitaRKulkarni
SmitaRKulkarni added this pull request to the merge queue Oct 18, 2026
Merged via the queue into master with commit e2b718e Oct 18, 2026
176 of 178 checks passed
@SmitaRKulkarni
SmitaRKulkarni deleted the Fix_hive_catalog_remotehostfilter branch October 18, 2026 13:03
@robot-clickhouse robot-clickhouse added the pr-synced-to-cloud The PR is synced to the cloud repo label Oct 18, 2026
@SmitaRKulkarni SmitaRKulkarni added the pr-must-backport Pull request should be backported intentionally. Use this label with great care! label Oct 27, 2026
@robot-ch-test-poll robot-ch-test-poll added the pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR label Oct 27, 2026
clickhouse-gh Bot added a commit that referenced this pull request Oct 27, 2026
Backport #119353 to 26.10: Respect `remote_url_allow_hosts` in the Hive metastore catalog
clickhouse-gh Bot added a commit that referenced this pull request Oct 27, 2026
Backport #119353 to 26.9: Respect `remote_url_allow_hosts` in the Hive metastore catalog
robot-ch-test-poll4 added a commit that referenced this pull request Oct 27, 2026
Cherry pick #119353 to 26.3: Respect `remote_url_allow_hosts` in the Hive metastore catalog
robot-clickhouse added a commit that referenced this pull request Oct 27, 2026
robot-ch-test-poll2 added a commit that referenced this pull request Oct 27, 2026
Cherry pick #119353 to 26.8: Respect `remote_url_allow_hosts` in the Hive metastore catalog
robot-clickhouse added a commit that referenced this pull request Oct 27, 2026
@robot-clickhouse robot-clickhouse added the pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore label Oct 27, 2026
clickhouse-gh Bot added a commit that referenced this pull request Oct 28, 2026
Backport #119353 to 26.8: Respect `remote_url_allow_hosts` in the Hive metastore catalog
SmitaRKulkarni added a commit that referenced this pull request Oct 28, 2026
Backport #119353 to 26.3: Respect `remote_url_allow_hosts` in the Hive metastore catalog
leshikus pushed a commit that referenced this pull request Nov 13, 2026
leshikus pushed a commit that referenced this pull request Nov 13, 2026
leshikus pushed a commit that referenced this pull request Nov 13, 2026
leshikus pushed a commit that referenced this pull request Nov 13, 2026
@clickhouse-gh clickhouse-gh Bot added comp-datalake-catalogs Data lake catalogs: the DataLakeCatalog database engine and its catalog clients - Iceberg REST, A... and removed comp-datalake Data lake table formats (Iceberg/Delta/Hudi) integration. labels Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp-datalake-catalogs Data lake catalogs: the DataLakeCatalog database engine and its catalog clients - Iceberg REST, A... pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore pr-bugfix Pull request with bugfix, not backported by default pr-must-backport Pull request should be backported intentionally. Use this label with great care! pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants