Skip to content

[pull] master from ClickHouse:master - #5

Merged
pull[bot] merged 35 commits into
sowelswl:masterfrom
ClickHouse:master
May 24, 2026
Merged

pull[bot] merged 35 commits into
sowelswl:masterfrom
ClickHouse:master

Conversation

@pull

@pull pull Bot commented May 24, 2026 •

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

sugaf1204 and others added 30 commits March 29, 2026 02:39
…tion assignment

waited_for_assignment was not reset on partition assign, causing the
shortened poll interval to persist even after a successful assignment.
This also increases the fetch rate, leading to more empty poll results
and smaller data parts due to fewer records per fetch, which increases
merge overhead and degrades performance. Reset the counter on assign
to restore the configured poll interval.
Walk every job in ci/workflows/pull_request.py and rewrite each runs_on
label with a pr- prefix, leaving self-hosted untouched. Jobs are
deep-copied via job.copy() before mutation so shared JobConfigs
instances used by other workflows are not affected.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Set SCCACHE_S3_READ_ONLY=true in build_clickhouse.py when
info.pr_number > 0 so PR builds do not write entries into the shared
sccache bucket; master/release builds (pr_number == 0) keep write
access.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Add S3.assert_read_access that probes the cache bucket via head_object
and raises on anything other than 404/NoSuchKey/NotFound. Call it at the
top of the Cache Lookup block in native_jobs, so an AccessDenied from a
misconfigured runner fleet surfaces as an explicit failure instead of
masquerading as a workflow with zero cache hits.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Apply the same SCCACHE_S3_READ_ONLY guard to ci/jobs/fast_test.py that
build_clickhouse.py already has, so PR builds cannot pollute the shared
sccache bucket via the Fast test compile path.

Addresses #104870 (comment)

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
`EC2Instance.Config`, `AutoScalingGroup.Config`, and `LaunchTemplate.Config`
now take `runner_labels: List[str]` instead of `runner_type: str`. The AWS
tag key `github:runner-type` is preserved (legacy `runner-init.py` in
clickhouse-private reads it and inlines its value verbatim into the GitHub
Actions runner's `--labels` list), so multiple comma-joined labels register
naturally as separate runner labels.

Switch macOS instances to the pre-existing `runner_oss_prs` instance
profile and drop the in-repo `praktika-ec2-instance-profile` definition.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
`EC2Instance.deploy()` now reconciles state on already-running instances
instead of leaving it stale:

- `_sync_tags`: upserts the merged tag set and deletes any other
  non-`aws:*` tag found on the instances, so the config is the source
  of truth.
- `_sync_iam_instance_profile`: replaces / associates / disassociates
  the IAM instance profile to match the config. Skips instances that
  are not `running`/`pending` — `ReplaceIamInstanceProfileAssociation`
  fails with `IncorrectState` on stopped instances.
- `start_instances` failures (e.g. `InsufficientHostCapacity` on mac
  dedicated hosts) no longer abort the whole deploy: they're logged
  as warnings so subsequent instance configs are still processed.

Also defines `EC2_INSTANCE_PROFILE_NAME` in `ci/infra/cloud.py` and
points both mac configs at `runner_oss_prs`.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Hive partition value extraction is conceptually a string-to-type cast,
but the code in `HivePartitioningUtils` was building a fresh
`FormatSettings` with only `allow_number_leading_zeros = true` and
ignoring the user's settings. As a result, parsing of `DateTime` and
`DateTime64` partition values defaulted to the strict `Basic` parser
and rejected ISO 8601 timestamps with timezone suffixes such as
`+0000`, `+00:00`, or `Z`. Setting either
`cast_string_to_date_time_mode = 'best_effort'` or
`date_time_input_format = 'best_effort'` had no effect.

Thread `format_settings` and the context through `addPartitionColumnsToChunk`,
and centralize the construction of hive-specific `FormatSettings` in a
helper that overrides `date_time_input_format` with
`cast_string_to_date_time_mode`. The setting defaults to `best_effort`,
so by default Hive-partitioned data lakes with ISO 8601 timestamp keys
(including Python `pandas` `isoformat` output and similar) now read
without an exception.

Fixes #105368.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
The flaky check runs each query with a random `session_timezone` (e.g.
`Mexico/BajaSur`). For the inferred-type case the column type is
`DateTime` with no explicit timezone, so the displayed value depends on
the session timezone and the reference would not match when the
session timezone is shifted. Pin `session_timezone = 'UTC'` so the
output is deterministic across configurations.

See #105584 CI flaky-check
failures on commit be09afa.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
When _hold_server_fds returns, the kernel has completed all 1500 TCP
handshakes, but Poco's TCPServer has only one accept thread that does
accept()+dispatch() per iteration. The remaining connections sit in
the kernel accept queue with no userspace fd allocated, so an
immediate /proc/<pid>/fd count sees only those accepted so far (~700
in the failing run). Verified with pdb: pausing after the failure and
re-checking the count shows it grew to the expected ~1500.

Poll the fd count until it crosses the threshold instead of reading
it once, so the test does not race Poco's accept loop.
…he hook

The `check_report_messages` post-hook now posts a GH commit status with a
short summary (e.g. `2 error(s), 1 warning(s)`) when the workflow report
contains errors or warnings, instead of exiting with a non-zero code.
The hook itself never fails, so it does not block the post-hook step
unnecessarily. A try/except guards against any unexpected errors.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Address review comment
#105584 (comment).

The previous commit made `HivePartitioningUtils` honour
`cast_string_to_date_time_mode` for schema-backed hive partition columns,
but the same invariant was still broken for hive keys materialized as
virtual columns. In `prepareReadingFromFormat`, missing schema columns
are classified as `requested_virtual_columns`, and then
`VirtualColumnUtils::addRequestedFileLikeStorageVirtualsToChunk` parsed
them with a fresh `FormatSettings` that only set
`allow_number_leading_zeros`. The path filter evaluation in
`addPathAndFileToVirtualColumns` had the same problem.

Expose `HivePartitioningUtils::buildHiveFormatSettings` as a public helper
and route both `addRequestedFileLikeStorageVirtualsToChunk` and
`getFilterByPathAndFileIndexes` through it, threading the storage's
`format_settings` from all call sites so all hive partition value
conversions honour `cast_string_to_date_time_mode` consistently.

Extend `04259_hive_partitioning_datetime_timezones.sh` with two new cases
covering the virtual-column path (schema declares only `id`) and a `WHERE`
filter on the virtual column.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
- `native_jobs.py`: gate `S3.assert_read_access` behind the same
  `skip_lookup` condition as actual remote cache lookup, so
  `Config Workflow` does not fail when cache is intentionally bypassed
  via `ci-force-all` label
- `s3.py`: wrap `head_object` in `_retry_on_no_credentials` so a
  transient IMDS credential miss does not permanently fail the probe
- `ec2_instance.py`: propagate `start_instances` failure instead of
  silently swallowing it; re-run IAM profile reconciliation on freshly
  started instances (previously skipped because `_sync_iam_instance_profile`
  ignores stopped instances)

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
… instances

`InsufficientHostCapacity` means no dedicated host is available — an
external capacity constraint we cannot fix programmatically. Treat it
as a warning and continue; re-raise all other `ClientError`s.

IAM profile re-reconciliation after start is now in the `else` branch
so it only runs when `start_instances` actually succeeds.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
…rtualsToChunk` loop

`buildHiveFormatSettings` was constructed once per matched hive virtual column,
but the result is identical for every iteration and the `getFormatSettings(context)`
fallback reads many settings.

This matches the hoisting pattern already used by `addPartitionColumnsToChunk` in
`HivePartitioningUtils.cpp` and `getFilterByPathAndFileIndexes` in
`VirtualColumnUtils.cpp`, and addresses the Cursor Bugbot review on commit
1b969c5.
… test

The PR description notes that prior to this fix, neither `cast_string_to_date_time_mode`
nor `date_time_input_format` had any effect on hive partition value parsing. Test
coverage existed for `cast_string_to_date_time_mode` but not for the
`date_time_input_format` variant referenced in the description.

Hive partition value extraction is conceptually a cast, so `cast_string_to_date_time_mode`
is the authoritative setting and overrides `date_time_input_format` inside
`buildHiveFormatSettings`. The new query exercises the setting referenced in the PR
description; since `cast_string_to_date_time_mode` defaults to `best_effort`, the
timezone-suffixed paths parse successfully.

Addresses review feedback from @Ergus on PR #105584.
alexey-milovidov and others added 5 commits May 24, 2026 03:57
…ment-on-assign

Fix polling interval adjustment logic when KafkaConsumer has no partition assignment
CI: Route PR workflows to isolated runner fleet — zero-trust OSS CI, milestone 2
Fix crash in replxx due to hitting FD_SETSIZE limitation of select() (replace with poll())
…time-tz

Honor cast_string_to_date_time_mode for hive partition values
@pull pull Bot locked and limited conversation to collaborators May 24, 2026
@pull pull Bot added the ⤵️ pull label May 24, 2026
@pull
pull Bot merged commit fac6aa2 into sowelswl:master May 24, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants