Skip to content

Cherry pick #114357 to 26.3: Validate S3 and Azure URLs before client creation and schema inference - #119546

Merged
PedroTadim merged 54 commits into
backport/26.3/114357from
cherrypick/26.3/114357
Sep 14, 2026
Merged

PedroTadim merged 54 commits into
backport/26.3/114357from
cherrypick/26.3/114357

Conversation

@robot-clickhouse-ci-2

Copy link
Copy Markdown
Contributor

Original pull-request #114357

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

rorylshanks and others added 30 commits August 11, 2026 18:03
Run the object-storage configuration check before `DESCRIBE s3` infers a schema, so `remote_url_allow_hosts` rejects the initial URL before any request.
# Conflicts:
#	tests/integration/test_storage_s3/test.py
Run configuration checks before `resolveSchemaAndFormat` in `StorageObjectStorageCluster`, preventing blocked hosts from being contacted by `s3Cluster` during schema inference.
Configured disks are explicitly approved by the operator and bypass remote host filtering at request time. Keep format validation, but do not revalidate their endpoints as SQL-provided URLs.
Disk-backed data-lake configurations only need the shared format check. Expose that check as a non-virtual helper so the path does not bypass an overridden virtual method.
Keep the construction-time header normalization, but validate a copy during repeated S3 and Web configuration updates. Preserve the existing data-lake check lifecycle.

PR: #114357
rorylshanks and others added 22 commits August 31, 2026 10:00
…ot-20260831

# Conflicts:
#	src/Storages/ObjectStorage/DataLakes/DataLakeConfiguration.h
The existing Iceberg disk integration cases now run without allowlisting Azurite, proving that configured Azure disks bypass both the data lake configuration pre-check and the request transport filter.
Remove config-reload, request-time, background metadata, `HDFS`, and Azure expansion from earlier automated review rounds. Keep validation before first access for SQL-supplied URLs while configured `S3` disks remain trusted.
Run the configuration check before `getContainerClient` can probe or create
a container for a SQL-supplied endpoint. Cover both `CREATE TABLE` and
`INSERT INTO TABLE FUNCTION` and assert that rejected URLs make no Azure
container API calls.

The same integration test cases observe one API call each before the fix
and zero after it with the patched Debug binary.

#114357 (comment)
…ost-validation

Validate S3 and Azure URLs before client creation and schema inference
@robot-clickhouse-ci-2 robot-clickhouse-ci-2 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 11, 2026
Keep master's `format != "auto"` guard in `checkFormat`. It is unchanged context
in #114357's diff, but it comes from a commit that is not on 26.3, and this change
moves `check()` ahead of schema inference where `format` is still `auto`; without
it every `format = auto` table would fail with UNKNOWN_FORMAT.

Drop the post-inference `configuration->check(context)` the merge left behind in
StorageObjectStorage.cpp. 26.3 has no comment above that call, so the removal
hunk did not match and the new early call was simply added alongside it.

In the tests, take only what belongs to this change: `remote_servers.xml` for
`restricted_dummy` (not `allow_server_credentials.xml`, which does not exist on
26.3) and the new `remote_url_allow_hosts` block in test_storage_iceberg_disks.

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.

5 participants