Skip to content

add user agent header to onelake catalog - #108117

Merged
scanhex12 merged 1 commit into
ClickHouse:masterfrom
scanhex12:onelake_user_agent_header
Jun 26, 2026
Merged

scanhex12 merged 1 commit into
ClickHouse:masterfrom
scanhex12:onelake_user_agent_header

Conversation

@scanhex12

@scanhex12 scanhex12 commented Jun 22, 2026 •

Copy link
Copy Markdown
Member

Changelog category (leave one):

  • Improvement

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

Add user-agent label on requests

Version info

  • Merged into: 26.7.1.110

@clickhouse-gh

clickhouse-gh Bot commented Jun 22, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [3ccd5e7]

Summary: ❌

job_name test_name status info comment
Stateless tests (amd_debug, distributed plan, s3 storage, parallel) FAIL
03203_system_query_metric_log FAIL cidb
03096_order_by_system_tables FAIL cidb
Stateless tests (amd_tsan, s3 storage, parallel, 2/2) FAIL
Server died FAIL cidb, issue
Stress test (amd_msan) FAIL
Hung check failed, possible deadlock found FAIL cidb, issue

AI Review

Summary
  • This PR customizes OneLakeCatalog catalog requests to send User-Agent: ClickHouse/<version> OneLake-Catalog instead of the generic default ClickHouse/<version> header. The changed request path is narrow and consistent with the existing RestCatalog header plumbing; I did not find a correctness issue that warrants an inline comment.
Missing context / blind spots
  • ⚠️ The PR body does not state the motivation beyond the title. A short note linking this to a specific OneLake/Fabric requirement or observed rejection would close the context gap.
  • ⚠️ Full CI was still in progress while reviewing. The Praktika report available at review time showed no failed jobs, and the completed GitHub checks included Config Workflow and Style check.
Final Verdict
  • Status: ✅ Approve

@clickhouse-gh clickhouse-gh Bot added the pr-not-for-changelog This PR should not be mentioned in the changelog label Jun 22, 2026
@clickhouse-gh

clickhouse-gh Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

LLVM Coverage Report

Metric Baseline Current Δ
Lines 85.30% 85.30% +0.00%
Functions 92.60% 92.60% +0.00%
Branches 77.50% 77.50% +0.00%

Changed lines: Changed C/C++ lines covered by tests: 0/6 (0.00%) | Lost baseline coverage: none · Uncovered code

Full report · Diff report

@SmitaRKulkarni SmitaRKulkarni self-assigned this Jun 26, 2026

@SmitaRKulkarni SmitaRKulkarni left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Maybe we can make it improvement in PR Catgeory (instead of Not for Chaneglog) as it does add new header for Onelake.
Rest all LGTM

@scanhex12 scanhex12 added pr-improvement Pull request with some product improvements and removed pr-not-for-changelog This PR should not be mentioned in the changelog labels Jun 26, 2026
@scanhex12
scanhex12 enabled auto-merge June 26, 2026 14:57
@scanhex12
scanhex12 added this pull request to the merge queue Jun 26, 2026
Merged via the queue into ClickHouse:master with commit 2155840 Jun 26, 2026
163 of 167 checks passed
@scanhex12
scanhex12 deleted the onelake_user_agent_header branch June 26, 2026 15:26
@robot-ch-test-poll robot-ch-test-poll added the pr-synced-to-cloud The PR is synced to the cloud repo label Jun 26, 2026
asya-ch added a commit that referenced this pull request Aug 3, 2026
…for internal create

Resolve conflicts against 26.6:

- Keep `getBearerToken`; the `OneLakeCatalog::getAuthHeaders` user-agent
  override (#108117) is not in 26.6 and is unrelated to this fix.
- Drop `allow_server_credentials_in_user_queries` and
  `is_loading_from_existing_metadata` from the `DatabaseDataLake`
  constructor call; both come from #106855, which is not backported to
  26.6 and whose credential restriction is deliberately left out.
- Thread the existing `internal` flag from `InterpreterCreateQuery`
  through `DatabaseFactory` (the plumbing from 274f167, without the
  S3 credential restriction). Required by `lazy_init` for internal
  creates; both 26.6 call sites, `loadMetadata` and `RestorerFromBackup`,
  already set the flag.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
asya-ch added a commit that referenced this pull request Aug 4, 2026
Resolve conflicts for the 26.3 backport of #109724, keeping only the
`onelake_bearer_token` half.

- `RestCatalog.h`/`.cpp`: keep `getBearerToken` and the bearer-token branch of the
  `OneLakeCatalog` constructor; drop the `OneLakeCatalog::getAuthHeaders` override
  (from #108117, not backported). On 26.3 `access_token` is `std::optional<AccessToken>`,
  so assign it directly.
- `DatabaseDataLake.cpp`: drop the lazy-init half. 26.3 predates eager catalog
  initialization -- the constructor only calls `validateSettings` and `getCatalog` builds
  the catalog on first access, so every path is already lazy.
- Drop the e2e test changes: `tests/integration/test_e2e_catalogs/` and
  `tests/integration/helpers/catalog_manager_onelake.py` do not exist on 26.3.

The resulting C++ change is identical to the merged 26.5 resolution (137209f).
zeekay pushed a commit to hanzoai/datastore that referenced this pull request Sep 11, 2026
…t_header

add user agent header to onelake catalog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-improvement Pull request with some product improvements 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.

3 participants