Skip to content

Cherry pick #125515 to 26.7: Keep the user's settings in the embedded client of the web terminal and SSH - #125682

Merged
robot-ch-test-poll merged 5 commits into
backport/26.7/125515from
cherrypick/26.7/125515
Oct 14, 2026
Merged

robot-ch-test-poll merged 5 commits into
backport/26.7/125515from
cherrypick/26.7/125515

Conversation

@robot-clickhouse-ci-1

Copy link
Copy Markdown
Contributor

Original pull-request #125515

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

alexey-milovidov and others added 4 commits October 12, 2026 21:43
…nd SSH

`ClientEmbedded` replaced the settings of the authenticated session with
default values via `setSettings`, dropping everything that came from the
user's profiles, roles and `CREATE USER ... SETTINGS`: `readonly`, resource
limits, `additional_table_filters`, etc. Apply only the changed settings
after checking them against the constraints.

Also check the settings sent with a query against the constraints in
`LocalConnection::sendQuery`, like `TCPHandler` does.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…e next query

The second query was sent while the embedded client was still finishing the first one.
During a query the client reads the keyboard (to toggle the progress table), so the
typed query was swallowed and never executed, and the test timed out waiting for `READONLY`.

CI report: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=125515&sha=latest&name_0=PR
PR: #125515

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…gs-reset

Keep the user's settings in the embedded client of the web terminal and SSH
@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 Oct 13, 2026
…ypick/26.7/125515

# Conflicts:
#	src/Client/LocalConnection.cpp
#	tests/integration/test_webterminal/test.py
@alexey-milovidov

Copy link
Copy Markdown
Member

🕵 Resolved the conflicts by merging backport/26.7/125515:

  • src/Client/LocalConnection.cpp: kept the 26.7 version. In 26.7, LocalConnection::sendQuery ignores the settings the client sends with a query, so there is nothing to check against the constraints there. The query's own SETTINGS clause is still checked by executeQuery.
  • src/Server/ClientEmbedded/ClientEmbedded.cpp: the main fix (apply only the changed settings and check them against the constraints, instead of setSettings) applied cleanly.
  • tests/integration/test_webterminal/test.py: added test_session_keeps_user_settings and the helpers it needs (_ws_send_frame, _ws_send_binary, _read_pty_until). Left out test_tab_completion_respects_session_user, which comes from another PR that is not in 26.7.

@robot-ch-test-poll
robot-ch-test-poll merged commit 2cff96d into backport/26.7/125515 Oct 14, 2026
1 check passed
@robot-ch-test-poll
robot-ch-test-poll deleted the cherrypick/26.7/125515 branch October 14, 2026 03:47
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.

3 participants