Skip to content

Cherry pick #117429 to 26.7: Mask secrets in SHOW CREATE DATABASE of a Backup database - #121966

Merged
PedroTadim merged 63 commits into
backport/26.7/117429from
cherrypick/26.7/117429
Sep 28, 2026
Merged

PedroTadim merged 63 commits into
backport/26.7/117429from
cherrypick/26.7/117429

Conversation

@robot-ch-test-poll4

Copy link
Copy Markdown
Contributor

Original pull-request #117429

Do not merge this PR manually

This pull-request is a first step of an automated backporting.
It contains changes similar to calling git cherry-pick locally.
If you intend to continue backporting the changes, then resolve all conflicts if any.
Otherwise, if you do not want to backport them, then just close this pull-request.

The check results does not matter at this step - you can safely ignore them.

Before you resolve anything

Conflicts are often caused by a prerequisite change that has not been backported yet, rather than by a real divergence. The bot re-tries this cherry-pick against the release branch on every run, so if that is the case here it will merge itself as soon as the prerequisite lands, and you will see a comment saying so. Manual resolution is only needed while the conflict persists.

Troubleshooting

If the conflicts were resolved in a wrong way

If this cherry-pick PR is completely screwed by a wrong conflicts resolution, and you want to recreate it:

  • delete the pr-cherrypick label from the PR
  • delete this branch from the repository

You also need to check the Original pull-request for pr-backports-created label, and delete if it's presented there

The PR source

The PR is created in the CI job

groeneai and others added 11 commits September 21, 2026 06:17
`SHOW CREATE DATABASE` of a `Backup` database renders the locator as the function
it is since #118674, so the pre-existing nested-`S3` rule redacts it. What is left
are the shapes that rule does not model, and the messages that reject a locator:

- A `Backup` engine with an arity other than two, or with a first argument that is
  no literal, hides every argument: a locator can be written in either position,
  and the statement is formatted for logging before validation rejects it.
- A locator whose engine is not `S3` keeps its engine name and argument count and
  hides every argument, unless the engine reads exactly the literal arguments it
  accepts, which name a destination and no credential (`File`, `Disk`, `Memory`,
  `Null`).
- An `AzureBlobStorage` backup destination reads a different signature than the
  table engine of the same name: a shared access signature beside a two-argument
  url, an `account_key` in the longer forms, named-collection overrides. It gets
  its own rule, and both rules now fail closed on an argument that neither
  `maskAzureConnectionString` nor the plain-account-url check can read, instead of
  leaving it visible.
- `BackupInfo::fromAST`, `checkAndGetLiteralArgument` for `database_name`,
  `StorageS3Configuration::collectCredentials` and the two duplicate-definition
  checks of `BackupMetadataFinder` formatted the argument they reject into their
  messages, which reach the error log and `query_log.exception`. A nested map such
  as `headers(..)` is masked only by its enclosing formatter, so one formatted on
  its own prints its values: none of these echoes the argument now.

Rebased on #118674 and reduced to the above. The definition rendering, the
acceptance of a locator held in a string literal on the metadata-replay paths and
the preflight refusal of one elsewhere are that PR's, and its own tests cover them.
…ng>' patterns for LIKE/ILIKE optimization
…-secret

Mask secrets in SHOW CREATE DATABASE of a Backup database
Backport of the 03737 part of f432f74 (#105859). With #108626 a
TTLDrop merge is always Horizontal, so a background TTLDrop merge that
races OPTIMIZE FINAL flips test1_algo, and test2 (all rows expired) is a
TTLDrop merge whose algorithm is no longer Vertical.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@robot-ch-test-poll4 robot-ch-test-poll4 added pr-cherrypick Cherry-pick of merge-commit before backporting. Do not use manually - automated use only! do not test disable testing on pull request pr-bugfix Pull request with bugfix, not backported by default labels Sep 24, 2026
clickhouse-gh Bot and others added 3 commits September 24, 2026 12:37
Backport #117404 to 26.7: Fix out of bound in timeSeriesGroupArray()
`croaring` v5.1.1 was backported to release branches that are still built
with clang-21. clang-21 MemorySanitizer checks the value instead of the
shadow of the index operand of AVX-512 `vpermi2var` intrinsics
(llvm/llvm-project#148785, fixed in clang-22), so
`avx512_emit_unique16` (reached from `MergeTextIndexesTask::executeStep`)
triggers `use-of-uninitialized-value` on runners with AVX-512 VBMI2, and
the server dies in every MSan stateless job.

Define `CROARING_COMPILER_SUPPORTS_AVX512=0` for MSan builds; croaring's
`isadetection.h` honours a predefined value. Non-MSan builds are unchanged.

Related: ClickHouse/clickhouse-private#76949

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…-index-like-affix

Backport text index like affix optimization into 26.7
@groeneai

Copy link
Copy Markdown
Collaborator

Same prerequisite as the 26.9 arm, plus a second one in registerBackupEngineS3.cpp

Full analysis on the 26.9 arm: #121968 (comment)

26.7 lacks #118674 exactly as 26.9 does, so the two display-surface tests of #117429 cannot pass here either, whatever the conflict resolution looks like.

It also lacks a second prerequisite that 26.8 and 26.9 already carry, which is why this arm has one conflict more than they do:

Both are regions this branch never had, not damage from the cherry-pick.

yariks5s and others added 10 commits September 24, 2026 15:45
Backport #116099 to 26.7: Honour `date_time_overflow_behavior` on parsing Date[Time] from text
Backport #108626 to 26.7: Avoid vertical TTL delete for TTLDrop merges
[26.7] Disable croaring AVX-512 kernels in MSan builds (clang-21 false positive)
Backport to 26.7: Fix a bug that MySQL/Postgres queries may run in an expired session
clickhouse-gh Bot and others added 15 commits September 25, 2026 11:52
Backport #120972 to 26.7: MySQL dictionary source: accept `enable_local_infile` only in the configuration file
Backport #111953 to 26.7: Fix the flaky pre-PAUSE checkpoint in test_pause_stops_after_current_batch
Backport #120036 to 26.7: Fix silent truncation at `LimitReadBuffer` limits and the multipart form budget
Backport #119585 to 26.7: Detach a patch part whose index lost its content to a zeroed block
… transform_null_in = 1 (Human alternative for #112785)
…egate function is constructed without a query context
Backport #111287 to 26.7: Fix double free when finalizing -State aggregates under looping combinators
Backport #121894 to 26.7: Fix a server crash when the flameGraph aggregate function is constructed without a query context
Backport #121375 to 26.7: Use text and token skip indexes for IN with transform_null_in = 1 (Human alternative for #112785)
Backport #119302 to 26.7: Revert "Revert "Proper partition pruning with dates""
@robot-clickhouse

Copy link
Copy Markdown
Member

Dear @jkartseva, @groeneai, this cherry-pick PR has not been updated for 3d0h3m38s. Please resolve the conflicts to backport #117429, or close this PR if the backport is no longer needed. This PR will be automatically closed after 7 days of inactivity.

robot-clickhouse and others added 10 commits September 27, 2026 15:36
Backport #117387 to 26.7: Reload TLS CA certificates (caConfig) without restart
Backport #122337 to 26.7: Fix Keeper crash after a failed changelog preallocation
Backport #120376 to 26.7: Enforce settings constraints installed by a profile in the same statement
Backport #118674 to 26.7: Keep a `Backup` database loadable after `ALTER DATABASE ... MODIFY COMMENT`
The bot's base predates the prerequisite (#122641), so 26.7 is merged in first and the
cherry-pick on top of that.

Conflicts resolved as in the already-merged 26.6 cherry-pick and the 26.4/26.3 ones; the applied
delta is byte-identical to them:

- `registerBackupEngineS3.cpp`: kept 26.7's `collectCredentials` call without `->clone()`, and
  with it master's paragraph about `BackupImpl::writeBackupMetadata` comparing locators as text.
- `04510_s3_explicit_url_named_secret_mask.{sql,reference}`: empty release side, took the added
  `system.query_log` masking assertion.

Related: #121966

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do not test disable testing on pull request pr-bugfix Pull request with bugfix, not backported by default pr-cherrypick Cherry-pick of merge-commit before backporting. Do not use manually - automated use only!

Projects

None yet

Development

Successfully merging this pull request may close these issues.