Skip to content

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

Merged
robot-ch-test-poll4 merged 61 commits into
backport/26.3/117429from
cherrypick/26.3/117429
Sep 28, 2026
Merged

robot-ch-test-poll4 merged 61 commits into
backport/26.3/117429from
cherrypick/26.3/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 8 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.
…-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
`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]>
@groeneai

Copy link
Copy Markdown
Collaborator

The furthest behind of the four: three separate prerequisites are missing

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

26.3 lacks #118674 like the others, so #117429's two display-surface tests cannot pass here regardless of how the merge is resolved. It is also missing everything the 26.7 arm is missing, and one thing more:

  • src/Backups/registerBackupEngineS3.cpp: collectCredentials is called without the ->clone() and Backups/BackupSourceAccess.h is not included. The patched site itself is still there.
  • The trailing system.query_log assertion of 04510_s3_explicit_url_named_secret_mask.sql does not exist on this branch.
  • tests/integration/test_mask_sensitive_info/test.py has no test_database_backup_engine_s3 (it is present on 26.7, 26.8 and 26.9), so Mask secrets in SHOW CREATE DATABASE of a Backup database #117429's new Azure test lands next to a function this branch never received.

Every one of those is a region 26.3 never had. Given the distance, closing this arm is the more defensible of the two options on the 26.9 thread, but the decision is not mine.

robot-clickhouse and others added 15 commits September 24, 2026 14:21
Backport #112934 to 26.3: Keep Iceberg statistics for supported columns when a field type is unsupported
Backport #117404 to 26.3: Fix out of bound in timeSeriesGroupArray()
Backport #121474 to 26.3: Hide the password of a cluster-name `remote()` call in the query log
[26.3] Disable croaring AVX-512 kernels in MSan builds (clang-21 false positive)
`ReadBufferFromAzureBlobStorage` rejected available metadata and
accessed an empty optional before the first successful request.

Negate the availability check and cover `NOT_INITIALIZED` before a
request.
Backport #108626 to 26.3: Avoid vertical TTL delete for TTLDrop merges
…al_infile` only in the configuration file
…`arrayFilter` result before limiting it
PedroTadim and others added 16 commits September 25, 2026 14:21
Backport #101462 to 26.3: Set Coordination component in PartMovesBetweenShardsOrchestrator
Backport #120036 to 26.3: Fix silent truncation at `LimitReadBuffer` limits and the multipart form budget
Backport #119585 to 26.3: Detach a patch part whose index lost its content to a zeroed block
Backport #116692 to 26.3: Prevent stale OpenSSL errors from breaking asynchronous TLS connections
…egate function is constructed without a query context
Backport #118360 to 26.3: Require the local privilege for KILL and SYSTEM statements over ON CLUSTER
Backport #114344 to 26.3: Validate a verbatim codec's declared size in the passthrough read shortcut
Backport #111287 to 26.3: Fix double free when finalizing -State aggregates under looping combinators
Backport #121894 to 26.3: Fix a server crash when the flameGraph aggregate function is constructed without a query context
Backport #119302 to 26.3: 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 3d0h3m35s. 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.

rschu1ze and others added 9 commits September 27, 2026 15:16
This stores the FPC lookup tables in a VectorWithMemoryTracking
(introduced in 26.2 with
#96235).

A similar change was made in 26.6
(#105580) - this PR only
applies it to FPC.
Codec FPC: handle large memory allocations more gracefully
Backport #122337 to 26.3: Fix Keeper crash after a failed changelog preallocation
Backport #118674 to 26.3: Keep a `Backup` database loadable after `ALTER DATABASE ... MODIFY COMMENT`
The bot's base predates the prerequisite (#122640), so 26.3 is merged in first and the
cherry-pick on top of that.

Conflicts resolved as in the already-merged 26.6 and 26.4 cherry-picks of the same change; the
delta is byte-identical to them outside the integration test:

- `registerBackupEngineS3.cpp`: kept 26.3's `collectCredentials` call without `->clone()`, and
  with it master's paragraph about `BackupImpl::writeBackupMetadata` comparing locators as text.
- `test_mask_sensitive_info/test.py` and
  `04510_s3_explicit_url_named_secret_mask.{sql,reference}`: empty release side, took the added
  blocks. 26.3 gains both new test functions, where private 26.4 gained only the Azure one
  because it already had the S3 one.

Related: #121965

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@robot-ch-test-poll4
robot-ch-test-poll4 merged commit 1eb6475 into backport/26.3/117429 Sep 28, 2026
1 check passed
@robot-ch-test-poll4
robot-ch-test-poll4 deleted the cherrypick/26.3/117429 branch September 28, 2026 12:04
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.