Skip to content

fix: combine ClickHouse app user grants into single query (HDX-3832)#198

Merged
dhable merged 2 commits intomainfrom
hdx-3832-fix-clickhouse-operator-only-applies-first-grant-for-app
Mar 25, 2026
Merged

fix: combine ClickHouse app user grants into single query (HDX-3832)#198
dhable merged 2 commits intomainfrom
hdx-3832-fix-clickhouse-operator-only-applies-first-grant-for-app

Conversation

@wrn14897
Copy link
Copy Markdown
Collaborator

@wrn14897 wrn14897 commented Mar 25, 2026

Summary

  • The ClickHouse operator only applies the first grants entry when multiple are listed separately
  • The app user was missing SELECT ON system.* and SELECT ON default.* permissions — only GRANT SHOW ON *.* was applied
  • Combined all grants into a single query, matching the pattern that works for the otelcollector user

Test plan

  • helm unittest charts/clickstack — all 146 tests pass
  • Deploy and verify with SHOW GRANTS FOR app in ClickHouse — should show all 3 permissions

Linear: HDX-3832

The ClickHouse operator only applies the first grant entry when multiple
are listed separately. Combine all app user grants into a single query,
matching the pattern that works for the otelcollector user.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 25, 2026

🦋 Changeset detected

Latest commit: a0799a2

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
helm-charts Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Comment on lines -308 to -310
- query: "GRANT SHOW ON *.*"
- query: "GRANT SELECT ON system.*"
- query: "GRANT SELECT ON default.*"
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

the operator doesn't support multi queries for some reason

@dhable dhable merged commit 6f29e73 into main Mar 25, 2026
3 checks passed
@dhable dhable deleted the hdx-3832-fix-clickhouse-operator-only-applies-first-grant-for-app branch March 25, 2026 17:47
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.

2 participants