Skip to content

Cherry pick #120376 to 26.3: Enforce settings constraints installed by a profile in the same statement - #122265

Merged
robot-ch-test-poll2 merged 11 commits into
backport/26.3/120376from
cherrypick/26.3/120376
Sep 28, 2026
Merged

robot-ch-test-poll2 merged 11 commits into
backport/26.3/120376from
cherrypick/26.3/120376

Conversation

@robot-clickhouse-ci-1

Copy link
Copy Markdown
Contributor

Original pull-request #120376

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

Algunenano and others added 10 commits September 16, 2026 13:08
…b.com:Algunenano/ClickHouse into enforce-profile-constraints-in-same-statement
Checking every change against the final profile let a later, looser `profile` lift the constraint of an earlier one in the same `SET`. Go back to segment by segment checking, and move `profile` first only in HTTP and gRPC, whose input has no order. Fix the gRPC tests, whose `display_text` has no error name.

Related: #120376 (comment)

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Moving `profile` first changed which assignment wins, e.g. `run_query_in_background=1&profile=p` let the explicit value override the profile (`04666_run_query_in_background_http`). Apply the list in its own order, and check each change against the constraints both before and after the profile, since these sources have no order.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The check against the constraints before the profile erased changes equal to the current value, so `?profile=p&max_result_rows=0` lost the explicit value and the profile won. Check that pass on a `const` view.

Related: #120376 (comment)

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…ces put profile first

gRPC now puts `profile` first when building the list from the protobuf map, so the other settings are bound by it and override its values deterministically. `checkSettingsConstraintsInAnyOrder` is removed and HTTP keeps master's handling: Poco groups a repeated URL parameter with its first occurrence before the handler runs, so there is no later position to restore. Tests are batched into few client calls.

Related: #120376 (comment)

Co-Authored-By: Claude Fable 5.1 <[email protected]>
…s-in-same-statement

Enforce settings constraints installed by a profile in the same statement
@robot-clickhouse-ci-1 robot-clickhouse-ci-1 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-critical-bugfix labels Sep 25, 2026
…rypick/26.3/120376

# Conflicts:
#	src/Interpreters/InterpreterSetQuery.cpp
#	src/Server/ArrowFlight/ArrowFlightServer.cpp
@robot-ch-test-poll2
robot-ch-test-poll2 merged commit 20f42e9 into backport/26.3/120376 Sep 28, 2026
1 check passed
@robot-ch-test-poll2
robot-ch-test-poll2 deleted the cherrypick/26.3/120376 branch September 28, 2026 09:15
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-cherrypick Cherry-pick of merge-commit before backporting. Do not use manually - automated use only! pr-critical-bugfix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants