Skip to content

Backport #127180 to 26.3: Check grants and allowed hosts for the move destination of S3Queue and AzureQueue - #128960

Merged
antonio2368 merged 3 commits into
26.3from
backport/26.3/127180
Nov 4, 2026
Merged

antonio2368 merged 3 commits into
26.3from
backport/26.3/127180

Conversation

@robot-ch-test-poll4

Copy link
Copy Markdown
Contributor

Original pull-request #127180
Cherry-pick pull-request #128941

This pull-request is a last step of an automated backporting.
Treat it as a standard pull-request: look at the checks and resolve conflicts.
Merge it only if you intend to backport changes to the target branch, otherwise just close it.

The PR source

The PR is created in the CI job

@robot-ch-test-poll4 robot-ch-test-poll4 added the pr-backport Changes, backported to release branch. Do not use manually - automated use only! label Nov 3, 2026
@clickhouse-gh

clickhouse-gh Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [BackportPR], commit [991a73a]

Summary: ✅

antonio2368 and others added 2 commits November 3, 2026 14:08
`StorageAlias.cpp` calls `StorageFactory::getExportAccessOfAnyEngine`, which
returns `AccessRightsElements`. `StorageFactory.h` only forward-declares this
class. On master the full type comes in through `Access/ContextAccess.h`, but
this include is not on the release branch, so the build fails with
"calling 'getExportAccessOfAnyEngine' with incomplete return type".

CI report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=128960&sha=eeb775babd57857a345a6b3c3b409aa708286fab&name_0=BackportPR
PR: #128960

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Two parts of the test depend on behavior that exists only on master:

1. `GRANT READ ON DISK` fails with a syntax error, because the `DISK` source
   does not exist on 26.3. On 26.3, `RESTORE` from a `Disk` backup checks no
   source grant, so the grant is not needed and is removed.

2. On 26.3, `CREATE TABLE ... AS <table>` inherits the engine and the settings
   of the source only when the query has no storage clause. With `SETTINGS`,
   `setEngine` sets `default_table_engine` (`MergeTree`), so the queries failed
   with `TABLE ENGINE ON MergeTree` instead of `WRITE ON S3`, and the cases with
   the grant did not create the table. The `CREATE AS` cases now copy a source
   table `t_as_src` that has the move destination itself, so the check still sees
   the destination through `AS`. The source has no `keeper_path`, so each copy
   gets its own default path.

CI report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=128960&sha=7c7b3627595760152ca05ade9ea77c6d65d1841b&name_0=BackportPR&name_1=Stateless%20tests%20%28amd_asan%2C%20distributed%20plan%2C%20parallel%2C%201%2F2%29
PR: #128960

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@antonio2368
antonio2368 merged commit db4bfe4 into 26.3 Nov 4, 2026
36 checks passed
@antonio2368
antonio2368 deleted the backport/26.3/127180 branch November 4, 2026 08:21
leshikus pushed a commit that referenced this pull request Nov 13, 2026
`StorageAlias.cpp` calls `StorageFactory::getExportAccessOfAnyEngine`, which
returns `AccessRightsElements`. `StorageFactory.h` only forward-declares this
class. On master the full type comes in through `Access/ContextAccess.h`, but
this include is not on the release branch, so the build fails with
"calling 'getExportAccessOfAnyEngine' with incomplete return type".

CI report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=128960&sha=eeb775babd57857a345a6b3c3b409aa708286fab&name_0=BackportPR
PR: #128960

Co-Authored-By: Claude Opus 5.5 <[email protected]>
leshikus pushed a commit that referenced this pull request Nov 13, 2026
Two parts of the test depend on behavior that exists only on master:

1. `GRANT READ ON DISK` fails with a syntax error, because the `DISK` source
   does not exist on 26.3. On 26.3, `RESTORE` from a `Disk` backup checks no
   source grant, so the grant is not needed and is removed.

2. On 26.3, `CREATE TABLE ... AS <table>` inherits the engine and the settings
   of the source only when the query has no storage clause. With `SETTINGS`,
   `setEngine` sets `default_table_engine` (`MergeTree`), so the queries failed
   with `TABLE ENGINE ON MergeTree` instead of `WRITE ON S3`, and the cases with
   the grant did not create the table. The `CREATE AS` cases now copy a source
   table `t_as_src` that has the move destination itself, so the check still sees
   the destination through `AS`. The source has no `keeper_path`, so each copy
   gets its own default path.

CI report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=128960&sha=7c7b3627595760152ca05ade9ea77c6d65d1841b&name_0=BackportPR&name_1=Stateless%20tests%20%28amd_asan%2C%20distributed%20plan%2C%20parallel%2C%201%2F2%29
PR: #128960

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

Labels

pr-backport Changes, backported to release branch. Do not use manually - automated use only!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants