Skip to content

Prevent ClickHouse tenant database name collisions by keeping the resource ID from being truncated - #9683

Merged
begelundmuller merged 1 commit into
mainfrom
begelundmuller/clickhouse-db-name-id-first
Jul 15, 2026
Merged

Prevent ClickHouse tenant database name collisions by keeping the resource ID from being truncated#9683
begelundmuller merged 1 commit into
mainfrom
begelundmuller/clickhouse-db-name-id-first

Conversation

@begelundmuller

@begelundmuller begelundmuller commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@begelundmuller begelundmuller self-assigned this Jul 14, 2026
// Format: rill_<id>_<org>_<project> truncated to 63 characters.
// Note that we add the ID first to prevent it from being truncated (it adds 32 characters), which would be a security risk.
name := "rill"
name += "_" + nonAlphanumericRegexp.ReplaceAllString(resourceID, "")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I am assuming this change would be backwards compatible and existing projects will not be affected ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, the name is persisted, so it will only affect new provisions going forward

@nishantmonu51

Copy link
Copy Markdown
Collaborator

@codex: review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: 92ae774225

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@nishantmonu51 nishantmonu51 added Type:Bug Something isn't working Team:Platform Platform Working Group Area:ClickHouse Size:S Small change: under 100 lines labels Jul 15, 2026
@begelundmuller
begelundmuller merged commit fbcb248 into main Jul 15, 2026
19 checks passed
@begelundmuller
begelundmuller deleted the begelundmuller/clickhouse-db-name-id-first branch July 15, 2026 12:11
nishantmonu51 pushed a commit that referenced this pull request Jul 15, 2026
…ource ID from being truncated (#9683)

(cherry picked from commit fbcb248)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area:ClickHouse Size:S Small change: under 100 lines Team:Platform Platform Working Group Type:Bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants