Skip to content

Docs: don't use passwordless default user in ClickHouse dictionary source example - #122348

Merged
Blargian merged 1 commit into
ClickHouse:masterfrom
SamWolfberg:fix-docs-clickhouse-dictionary-source-credentials
Sep 28, 2026
Merged

Blargian merged 1 commit into
ClickHouse:masterfrom
SamWolfberg:fix-docs-clickhouse-dictionary-source-credentials

Conversation

@SamWolfberg

@SamWolfberg SamWolfberg commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Changelog category (leave one):

  • Documentation (changelog entry is not required)

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

...

The ClickHouse dictionary source page (/sql-reference/statements/create/dictionary/sources/clickhouse) shows user 'default' / password '' in both the DDL and XML examples. In ClickHouse Cloud, copying that example fails for any user other than default:

Code: 36. DB::Exception: A non-default user cannot create a dictionary that connects as passwordless dictionary source user `default`. Specify your own credentials in the dictionary source configuration.

Cloud requires a non-default creator to specify both user and password in a CLICKHOUSE source, and since 26.6 it also rejects default as the source user, whatever the password.

This change updates the generated page's source of truth, the Documentation registration in src/Dictionaries/ClickHouseDictionarySource.cpp:

  • The DDL and XML examples use a dedicated dict_reader user with a password.
  • The syntax field uses placeholder credentials instead of default / ''.
  • A <Note> describes the Cloud requirement and the error.

It changes only the documentation strings. 04306_dictionary_sources_documentation and 05023_dictionary_source_descriptions check that descriptions and syntax are non-empty and never compare this text. The .mdx page is left to the docs autogeneration workflow, per docs/reference/AGENTS.md.

🤖 Generated with Claude Code

https://claude.ai/code/session_01SENCmXWTjAn19AR5ShAVLM


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

Version info

  • Merged into: 26.10.1.895-master (included in 26.10 and later)

…urce example

The CLICKHOUSE dictionary source examples used user 'default' / password '',
which ClickHouse Cloud rejects when a non-default user creates the dictionary.
Use a dedicated user in the examples and syntax, and note the Cloud requirement.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01SENCmXWTjAn19AR5ShAVLM
@clickhouse-gh

clickhouse-gh Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [c7e4578]

Summary: ❌

job_name test_name status info comment
Performance Comparison (arm_release, master_head, 2/6) FAIL Performance dashboard
read_in_reverse_order_final #1 FAIL dashboard

AI Review

Summary

This PR updates the CLICKHOUSE dictionary source documentation to stop recommending passwordless default credentials in examples and to add a ClickHouse Cloud note. The example change itself is sensible, but the PR leaves shared Cloud dictionary guidance elsewhere in the tree saying users must create dictionaries as default, so the documentation becomes internally contradictory.

Findings

⚠️ Majors

  • [src/Dictionaries/ClickHouseDictionarySource.cpp:424] This page now tells Cloud users that a non-default creator can use a CLICKHOUSE source as long as the source specifies dedicated credentials, but the shared guidance in docs/snippets/_snippet_dictionary_in_cloud.mdx:2 and src/Parsers/ParserCreateQuery.cpp:3680 still tells users to create dictionaries as the default user. Those surfaces are part of the same dictionary documentation flow, so after this PR users will see mutually exclusive instructions depending on which page they follow. Suggested fix: update the shared dictionary-in-Cloud snippet and the generated CREATE DICTIONARY note in the same change, or narrow this new note so it does not claim support that the rest of the docs still deny.
Final Verdict

Changes requested: keep the ClickHouse Cloud dictionary guidance consistent across the shared snippets and the source-specific page.

LLVM Coverage Report

Measured on commit c7e4578.

Metric Baseline Current Δ
Lines 88.20% 88.20% +0.00%
Functions 91.80% 91.70% -0.10%
Branches 79.40% 79.50% +0.10%

Changed lines: Changed C/C++ lines covered: 25/25 (100.00%) · Uncovered code

Full report · Diff report

@clickhouse-gh clickhouse-gh Bot added pr-documentation Documentation PRs for the specific code PR comp-documentation Documentation (docs, examples, READMEs). labels Sep 25, 2026
@Blargian Blargian self-assigned this Sep 26, 2026
@Blargian Blargian added the can be tested Allows running workflows for external contributors label Sep 26, 2026
</Note>

<Note>
In ClickHouse Cloud, when a user other than `default` creates the dictionary, the source must specify both `user` and `password`, and `user` cannot be `default`. Otherwise `CREATE DICTIONARY` fails with a `BAD_ARGUMENTS` error. Use a dedicated user that has `SELECT` on the source table.

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.

The new note changes the Cloud guidance on this page from “create dictionaries as default” to “non-default creators are fine if the source uses dedicated credentials”, but the shared dictionary-in-Cloud guidance still says the opposite in docs/snippets/_snippet_dictionary_in_cloud.mdx:2 and src/Parsers/ParserCreateQuery.cpp:3680. That snippet is imported across the dictionary docs, so after this change users will get contradictory instructions depending on which page they read. Please update the shared Cloud guidance in the same PR, or narrow this note so it does not claim support that the rest of the docs still deny.

@SamWolfberg

Copy link
Copy Markdown
Contributor Author

The only failure is read_in_reverse_order_final #1 in Performance Comparison (arm_release, master_head, 2/6), and I believe it's unrelated to this PR. The change only edits the documentation string and syntax field in the clickhouse dictionary source registration, and neither is on any query execution path. The other five arm shards and all functional checks pass. Could someone rerun that shard or override it?

@Blargian
Blargian added this pull request to the merge queue Sep 28, 2026
Merged via the queue into ClickHouse:master with commit 6627627 Sep 28, 2026
518 of 522 checks passed
@robot-clickhouse robot-clickhouse added the pr-synced-to-cloud The PR is synced to the cloud repo label Sep 28, 2026
zoomxi pushed a commit to zoomxi/ClickHouse that referenced this pull request Oct 30, 2026
Document the backward-incompatible credential restriction in 26.6.1.240
and replace outdated Cloud dictionary guidance with dedicated source-user
instructions and links to the `dict_reader` example. Update the generated
`CREATE DICTIONARY` documentation in its source registration.

Related: ClickHouse#122348
Related: ClickHouse/clickhouse-private#54834
Example: https://clickhouse.com/docs/reference/statements/create/dictionary/sources/clickhouse
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

can be tested Allows running workflows for external contributors comp-documentation Documentation (docs, examples, READMEs). pr-documentation Documentation PRs for the specific code 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.

3 participants