Skip to content

CI: add CI Tests job to PR workflow - #102529

Merged
leshikus merged 40 commits into
ClickHouse:masterfrom
leshikus:add-testworkflow
Apr 20, 2026
Merged

leshikus merged 40 commits into
ClickHouse:masterfrom
leshikus:add-testworkflow

Conversation

@leshikus

@leshikus leshikus commented Apr 13, 2026 •

Copy link
Copy Markdown
Collaborator

Add a CI Tests job that runs ci/tests/ via pytest on every PR as an early gate alongside Style check and Fast test — builds cannot start until it passes.

What changed

New CI Tests job (ci/jobs/ci_tests_job.py, ci/defs/, ci/workflows/pull_request.py): starts Docker-in-Docker, then runs pytest against ci/tests/ via Result.from_pytest_run. Runs on ARM large inside clickhouse/integration-tests-runner (privileged, with a dedicated Docker volume) so tests that need a real ClickHouse server can work. Multi-pattern --test filtering uses shlex.quote so the full pytest -k expression is passed as a single shell token.

New ClickHouseService (ci/jobs/scripts/clickhouse_service.py): a plain context manager that downloads the ClickHouse binary from S3 master builds on first use, copies the default server config, recreates the data directory (avoids the MISMATCHING_USERS_FOR_PROCESS_AND_DATA error when UID changes between runs), starts the server in a new session, polls for readiness, and shuts it down via SIGTERM / SIGKILL.

praktika fixes:

  • Added --init to every docker run invocation so Docker's init process reaps zombies and forwards signals correctly.
  • Fixed PermissionError on result_ci_tests.json: when a job runs as root inside Docker, the result file is root-owned; the host process then can't overwrite it. Fixed by running chown immediately after process.wait(), before Result.from_fs and result.dump().
  • Added stopwatch to ResultTranslator.from_pytest_jsonl so the reported duration covers the full parse, not just teardown.

Test fixture (ci/tests/0_stateless/01_parallel_sleep.sh): replaced the old 00058_select_sleep_3.sh-based approach with a self-contained script that spawns 5 sleep subprocesses and writes output via echo, eliminating the SELECT 1 race and the dependency on a running ClickHouse server.

Test fix (ci/tests/test_cleanup_test_groups.py): extended the stdout-file deadline to 15 s; polls for a stable process count before asserting; updated all comments to match the current fixture and write_text_atomic-based PGID tracking.

Changelog category (leave one):

  • CI Fix or Improvement (changelog entry is not required)

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

...

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

Version info

  • Merged into: 26.4.1.1090

leshikus and others added 2 commits April 13, 2026 11:43
Adds a new praktika workflow (`ci/workflows/ci_tests.py`) that runs the
tests under `ci/tests/` on every pull request against `master`.

The job script (`ci/jobs/ci_tests_job.py`) uses `Result.from_pytest_run`
to execute pytest against `ci/tests/`, capture a `--report-log` JSONL
file, and call `complete_job()` — the same pattern used by
`integration_test_job.py`.

The GitHub Actions YAML (`.github/workflows/ci_tests.yml`) was generated
by `python3 -m ci.praktika yaml`.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Adds a `CI Tests` job that runs `ci/tests/` via pytest on every PR
against `master`. The job uses `Result.from_pytest_run` and
`complete_job()`, following the same pattern as `integration_test_job.py`.

The standalone `ci/workflows/ci_tests.py` and its generated
`.github/workflows/ci_tests.yml` are removed in favour of placing the
job directly in the `PR` workflow alongside the other early-stage jobs
(`Style check`, `Fast test`, etc.).

`python3 -m ci.praktika yaml` was re-run to regenerate
`.github/workflows/pull_request.yml`.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@clickhouse-gh

clickhouse-gh Bot commented Apr 13, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [27b0f93]

Summary: ✅

@clickhouse-gh clickhouse-gh Bot added the pr-ci label Apr 13, 2026
Comment thread ci/workflows/pull_request.py Resolved
@leshikus
leshikus marked this pull request as draft April 13, 2026 10:00
- Fix `ci_tests_job.py` to invoke `python3 -m pytest` instead of
  bare `pytest` (which was not in PATH on the runner, causing
  `pytest: command not found` and a missing JSONL report)
- Add `digest_config` to `JobConfigs.ci_tests` with
  `include_paths=["./ci/"]` so the job is skipped on PRs that
  do not touch `ci/`
- Add a tip to `.github/PULL_REQUEST_TEMPLATE.md` reminding
  contributors to open new PRs as Draft until they are ready
  for review

CI report: https://s3.amazonaws.com/clickhouse-test-reports/PRs/102529/c9b9cd4c120a5ba06bd6f694efeb4685ee58a762/ci_tests/job.log
PR: ClickHouse#102529

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Comment thread ci/defs/job_configs.py Resolved
Comment thread ci/jobs/ci_tests_job.py Resolved
leshikus and others added 5 commits April 14, 2026 09:18
The `CI Tests` job was failing with `No module named pytest` because
`clickhouse/stateless-test` does not include pytest.

Add a minimal `ci/docker/pytest-test` image (Ubuntu 22.04 + `pytest` +
`requests` + `openssl`) and register it in `ci/defs/defs.py`. Switch the
`CI Tests` job in `ci/defs/job_configs.py` to use `clickhouse/pytest-test`
instead of `clickhouse/stateless-test`, then regenerate
`.github/workflows/pull_request.yml`.

CI report: https://s3.amazonaws.com/clickhouse-test-reports/PRs/102529/85ffd04bf74fc9e43bc8accf864c2e6a1cc7301b/ci_tests/ci_tests.log
PR: ClickHouse#102529

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

Address three review comments from the automated bot:

1. Add `JobNames.CI_TESTS` to `STYLE_AND_FAST_TESTS` in `ci/workflows/pull_request.py`
   so build jobs wait for `CI Tests` to finish before starting.

2. Remove `digest_config` from `ci_tests` in `ci/defs/job_configs.py`
   so the job runs unconditionally on every PR, not only when `./ci/**` changes.

3. Add `-k 'not test_e2e'` to the `pytest` invocation in `ci/jobs/ci_tests_job.py`
   to exclude the heavy end-to-end test from the default run.

Also fix the Docker CI failure: the new `clickhouse/pytest-test` image was never
pushed to Docker Hub (the per-platform build jobs were cached from before the image
existed), causing the multiplatform manifest step to fail with "pull access denied".
Switch to the already-published `clickhouse/style-test` image and add an inline
`pip3 install pytest==8.3.5` step at the start of the job script; the installation
is ephemeral inside the container and takes only a few seconds.

Remove the now-unnecessary `ci/docker/pytest-test/` directory and its entry from
`ci/defs/defs.py`, then regenerate `.github/workflows/pull_request.yml`.

PR: ClickHouse#102529

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Comment thread ci/jobs/ci_tests_job.py Resolved
Comment thread ci/jobs/ci_tests_job.py Resolved
Comment thread ci/jobs/ci_tests_job.py Resolved
leshikus and others added 5 commits April 14, 2026 15:00
Introduce three helpers for tracking child process-group IDs:

- `_PGIDS` — module-level `set` accumulating all pgids for this process.
- `_PGID_FILE` / `_PGID_FILE_TMP` — per-process constants for the pgid
  file path and its atomic staging path.
- `_track_pgid(pgid)` — adds to `_PGIDS` then flushes.
- `_untrack_pgid(pgid)` — discards from `_PGIDS` then flushes.
- `_flush_pgid_file()` — writes the full set (one pgid per line) to
  `_PGID_FILE_TMP`, then renames it into `_PGID_FILE` so readers never
  observe a partial write.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Add `pytest==8.3.5` to `ci/docker/style-test/requirements.txt` so the
`clickhouse/style-test` container provides it directly, removing the
need for a runtime `pip install` step.

Rewrite `ci/jobs/ci_tests_job.py` to use `Result.from_pytest_run`
instead of two bare `Shell.run` calls followed by manual
`ResultTranslator.from_pytest_jsonl` — consistent with how other jobs
in the codebase report pytest results.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
…ad pytest exit code

Add `pytest-reportlog==1.0.0` to `ci/docker/style-test/requirements.txt` so that
`--report-log` works in `pytest 8.x` (the plugin was separated from the core package).
Without it, pytest exits with code 4 (unrecognized argument) and the job reports
"Pytest report file not found" instead of the real root cause.

In `Result.from_pytest_run`, capture the exit code from `Shell.run` and raise
immediately when pytest fails to run (exit codes other than 0 and 1): exit code 0
means all tests passed, exit code 1 means some tests failed — both are normal
outcomes. Any other code indicates that pytest itself could not start or was
interrupted, so we raise `RuntimeError` with the exit code and log path instead
of silently continuing to parse a missing report file.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
The blockquote tip "Open this PR as a Draft until it is ready for review"
was added to `.github/PULL_REQUEST_TEMPLATE.md`, but the template is checked
into the upstream repo and the tip is guidance for Claude, not for human
contributors writing PRs by hand.

Move it to `.claude/skills/clickhouse-pr-description/SKILL.md` where it is
applied by the skill when creating PRs, and revert the template to its
upstream form.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Comment thread ci/praktika/result.py Resolved
leshikus and others added 2 commits April 15, 2026 23:15
Add `ClickHouseProc.download_binary()` — a static method that fetches the
latest master binary from S3 using `urllib.request` (no external tools),
detects architecture automatically (`aarch64` / `amd64`), makes the file
executable, and skips the download if the binary is already present.

Add `ClickHouseProc.install_light()` as a public wrapper around
`_install_light` for callers that do not need job-specific config tweaks.

Rewrite `ci/jobs/ci_tests_job.py` to download the binary, install the
light config, and start the server before running `pytest ci/tests/`.
The server is stopped with `terminate(force=True)` after the tests finish.
If any setup step fails the job reports `ERROR` immediately rather than
attempting to run tests against a missing server.

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

Pass `ch_config_dir` and `ch_var_lib_dir` to `ClickHouseProc` as in the
fast test job.  Replace `start_light()` with `start()` + `wait_ready()`.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Comment thread ci/jobs/ci_tests_job.py Resolved
Comment thread tests/clickhouse-test Resolved
leshikus and others added 3 commits April 16, 2026 00:07
Add an abstract `Service` base class (`ci/praktika/service.py`) with
`start` and `shutdown` abstract methods and a context manager so
`shutdown` is called automatically on block exit.

Add `ClickHouseService` (`ci/jobs/scripts/clickhouse_service.py`) that
extends `Service` and encapsulates the full server lifecycle without
depending on `ClickHouseProc`:
- downloads the `clickhouse` binary to `ci/tmp` if absent
- creates `clickhouse-server`, `clickhouse-client`, and
  `clickhouse-local` symlinks in `ci/tmp` if absent
- copies `programs/server/config.xml` to the config directory if absent
- launches the server via `subprocess.Popen` with a configurable
  `run_path`
- waits for the pid file then polls `clickhouse-client` until ready

`shutdown` sends `SIGTERM` and falls back to `SIGKILL` after 30 s.

Update `ci_tests_job.py` to use `ClickHouseService` as a context
manager, removing the manual `download_binary` / `_install_light` /
`terminate` calls.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
The method is now implemented in `ClickHouseService._download_binary`.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Comment thread ci/praktika/runner.py Resolved
Comment thread ci/defs/job_configs.py Resolved
Comment thread ci/jobs/scripts/clickhouse_proc.py Resolved
Comment thread ci/defs/job_configs.py Resolved
@leshikus

Copy link
Copy Markdown
Collaborator Author

@maxknv I wonder if using with ClickHouseService() as service: than calling _install_light and several other methods is more elegant and pythonistic way to describe a service

leshikus and others added 2 commits April 17, 2026 19:45
… use it

Replaces the dependency on `00058_select_sleep_3` (a real stateless query test)
with a self-contained `ci/tests/0_stateless/01_parallel_sleep.sh` that writes a
known `test.stdout` file, making the cleanup test independent of the main test
suite layout.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
The new `ci/tests/0_stateless/01_parallel_sleep.sh` serves the same purpose for
the cleanup test, so the old `00058_select_sleep_3` files are no longer needed.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Comment thread ci/tests/test_cleanup_test_groups.py Resolved
Comment thread ci/tests/test_cleanup_test_groups.py Resolved
leshikus and others added 3 commits April 17, 2026 20:01
- `01_parallel_sleep.sh`: use `exec >` to redirect stdout to
  `test.stdout` so the script output matches the reference file and
  `test_cleanup_test_groups` can watch the same file
- `ClickHouseService._wait_ready`: replace hardcoded `range(30)` with
  `range(attempts)` so a custom `attempts` value is respected in the
  PID-file wait loop
- `ClickHouseProc`: remove unused `install_light` public wrapper
- `ci_tests` job config: add `digest_config=["./ci"]`

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
- Use `shlex.quote` to properly quote the `pytest -k` expression so
  multi-pattern `--test foo bar` is not split by the shell into separate
  tokens
- Update stale comments in `test_cleanup_test_groups` that referenced
  `_track_pgid`, `_untrack_pgid`, `SELECT 1 client`, and the old test
  fixture `00058_select_sleep_3.sh`; align them with the current
  `01_parallel_sleep.sh` fixture and inline `write_text_atomic` call

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@leshikus
leshikus requested a review from maxknv April 17, 2026 18:18
leshikus and others added 2 commits April 20, 2026 10:52
The test redirects its stdout via `exec >` to a sentinel file used for
synchronisation in `test_cleanup_test_groups.py`, so `clickhouse-test`
never sees any output to compare.  The reference file was therefore
misleading and would cause a failure if the test ever ran to completion.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Use `Job.CacheDigestConfig` instead of a plain list, consistent with all
other job configs in the file.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@leshikus
leshikus added this pull request to the merge queue Apr 20, 2026
Merged via the queue into ClickHouse:master with commit 319b7aa Apr 20, 2026
162 checks passed
@leshikus
leshikus deleted the add-testworkflow branch April 20, 2026 22:36
@robot-ch-test-poll1 robot-ch-test-poll1 added the pr-synced-to-cloud The PR is synced to the cloud repo label Apr 20, 2026
euvre pushed a commit to euvre/ClickHouse that referenced this pull request Apr 24, 2026
…oup cleanup test

Re-adds the `CI Tests` job after revert in ClickHouse#103251.

Two root causes are fixed:
- `--init` is removed from the `docker run` invocation in `runner.py`; the
  `tini` init process it injects conflicts with the privileged Docker-in-Docker
  environment used by the job.
- `ci_tests_job.py` gains a `--skip` option (pytest `-k not <pattern>`) so
  individual tests can be excluded without modifying test files.  The job config
  now skips `test_cleanup_kills_orphaned_test_process`, which requires
  process-group bookkeeping symbols (`pgrep`, `_GROUP_PID_PATH`) that are not
  yet present on all runners.

Closes ClickHouse#103251 (revert), re-introduces ClickHouse#102529.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
leshikus added a commit to leshikus/ClickHouse that referenced this pull request May 2, 2026
commit 600be4aa8a8613d0a4ba9b7e8ad846f789dc93ba
Merge: febefb0 4e4a4c0
Author: Alexei Fedotov <[email protected]>
Date:   Sat May 2 13:48:18 2026 +0200

    Merge branch 'master' into add-ci-tests-init

commit febefb0
Author: Alexei Fedotov <[email protected]>
Date:   Fri May 1 01:13:37 2026 +0200

    Remove unimplemented `job_filter_bypass_labels` field from `Workflow.Config`

    The field was declared but never consumed by the job filtering logic in
    `native_jobs.py`, so `"ci-all-jobs"` label would have had no effect.
    Also reverts the `BUILD_TOOLCHAIN (amd64)` timeout override that was
    included in the same commit by mistake.

commit bca4a1f
Merge: fa4ec08 a0aae2a
Author: Alexei Fedotov <[email protected]>
Date:   Fri May 1 01:03:46 2026 +0200

    Merge branch 'master' into add-ci-tests-init

commit fa4ec08
Merge: 062b466 d3573bd
Author: Alexei Fedotov <[email protected]>
Date:   Tue Apr 28 07:59:44 2026 +0200

    Merge branch 'master' into add-ci-tests-init

commit 062b466
Author: Alexei Fedotov <[email protected]>
Date:   Mon Apr 27 15:12:22 2026 +0200

    Revert "Address review: keep release-PR guard unconditional when `ci-all-jobs` label is set"

    This reverts commit e9f8a95.

commit e9f8a95
Author: Alexei Fedotov <[email protected]>
Date:   Mon Apr 27 15:07:34 2026 +0200

    Address review: keep release-PR guard unconditional when `ci-all-jobs` label is set

    Add `job_filter_bypass_exclude_labels` to `Workflow.Config`. When any of those
    labels are present, `job_filter_bypass_labels` is ignored so `workflow_filter_hooks`
    and file-based job filtering both run normally.

    Configure `pull_request.py` with `job_filter_bypass_exclude_labels=["release",
    "release-lts"]` so a PR carrying both `ci-all-jobs` and a release label still has
    every job skipped by the `should_skip_job` release guard, consistent with the PR
    description ("Release labels still take priority").

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

commit c07de66
Author: Alexei Fedotov <[email protected]>
Date:   Mon Apr 27 13:09:24 2026 +0200

    Fix `04122_serialization_time64_formats` test after `yarik/fix-time64-serialization`

    PR ClickHouse#102596 (`yarik/fix-time64-serialization`) added a trailing-garbage
    check in `deserializeTextCSV`: after parsing the unquoted field as a
    time string, it now throws `UNEXPECTED_DATA_AFTER_PARSED_VALUE` if the
    buffer is not fully consumed.

    The test was using `45045123` as an unquoted CSV value. `readTime64Text`
    parsed only `45` (SS format) and left `045123` as "trailing garbage",
    causing the test to fail across all stateless-test configurations.

    Fix: replace the raw integer with `12:30:45.123`, a proper unquoted time
    string, and rename the section header accordingly. The expected output
    (`00:00:00.000` / `12:30:45.123`) is unchanged since the quoted-CSV and
    unquoted time-string paths both normalise correctly.

    Ref: ClickHouse#103307

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

commit 0ebb9c7
Author: Alexei Fedotov <[email protected]>
Date:   Mon Apr 27 13:09:14 2026 +0200

    Move `ci-all-jobs` bypass out of filter hooks into the call site

    `job_filter_bypass_labels` was only checked in the file-based filtering
    phase of `_config_workflow`, so `workflow_filter_hooks` (e.g.
    `private_job_filter`) still ran and skipped jobs even when the
    `ci-all-jobs` label was set.

    Fix: check `job_filter_bypass_labels` before iterating
    `workflow_filter_hooks` in `native_jobs.py` so the bypass is applied
    uniformly to all hook-based filtering, not just file-based filtering.

    The now-redundant early-return for `Labels.CI_ALL_JOBS` inside
    `should_skip_job` is removed — it is dead code once the call site
    handles the bypass.

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

commit dc35478
Author: Alexei Fedotov <[email protected]>
Date:   Mon Apr 27 08:54:44 2026 +0200

    Fix race condition and error masking in `test_accept_invalid_certificate`

    `execute_query_native` wrote all test configurations to the same
    `configs/client.xml` path, causing parallel test invocations to
    clobber each other's config and produce inconsistent TLS behaviour.
    Additionally, calling `remove()` inside the `except` block could raise
    `FileNotFoundError`, which replaced the real SSL exception and broke
    the `assert "certificate verify failed"` checks.

    Fix: write each config to a unique temp file via `tempfile.mkstemp` and
    clean it up in a `finally` block that swallows `FileNotFoundError`.

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

commit 263d43a
Merge: 5176553 c37e307
Author: Alexei Fedotov <[email protected]>
Date:   Mon Apr 27 08:50:41 2026 +0200

    Merge branch 'master' into add-ci-tests-init

commit 5176553
Author: Alexei Fedotov <[email protected]>
Date:   Sun Apr 26 09:48:31 2026 +0200

    CI: fix `LLVM Profile Warning: Running out of static counters` in PGO build

    The Stage 1 instrumented clang was compiled with the default value-profiling
    counter limit of 3 slots per indirect call site. During ClickHouse profile
    collection, the instrumented binary emitted:

      LLVM Profile Warning: Unable to track new values: Running out of static
      counters.  Consider using option -mllvm -vp-counters-per-site=<n> to
      allocate more value profile counters at compile time

    This saturates call-site counters and loses indirect-call frequency data
    needed by the PGO optimizer in Stage 2, reducing the quality of the final
    toolchain.

    Fix: pass `-mllvm -vp-counters-per-site=8` via `CMAKE_C_FLAGS` /
    `CMAKE_CXX_FLAGS` when building Stage 1. The flag is baked into the
    instrumented binary at compile time, so the running binary can track up to
    8 distinct callees per indirect call site instead of 3.

    Seen in: ClickHouse#103307

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

commit 22a4eb5
Author: Alexei Fedotov <[email protected]>
Date:   Sun Apr 26 00:17:19 2026 +0200

    Update workflows

commit e281776
Merge: 807b47f 7fc29dc
Author: Alexei Fedotov <[email protected]>
Date:   Sun Apr 26 00:16:47 2026 +0200

    Merge branch 'master' into add-ci-tests-init

commit 807b47f
Author: Alexei Fedotov <[email protected]>
Date:   Sun Apr 26 00:08:57 2026 +0200

    CI: increase `Build Toolchain (PGO, BOLT) (amd64)` timeout to 8 h on PR

    3 h was too tight; raise to 8 h to match the previous default.

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

commit eb73037
Author: Alexei Fedotov <[email protected]>
Date:   Sat Apr 25 10:55:39 2026 +0200

    Update workflows

commit 30ba815
Merge: 8154744 04bd709
Author: Alexei Fedotov <[email protected]>
Date:   Sat Apr 25 10:54:58 2026 +0200

    Merge branch 'master' into add-ci-tests-init

commit 8154744
Author: Alexei Fedotov <[email protected]>
Date:   Sat Apr 25 10:22:14 2026 +0200

    CI: fix flaky check assertion and toolchain timeout on PR

    - In `integration_test_job.py`, fall back to a sanity test when `is_flaky_check` is True, no changed integration test modules are found, and `ci-all-jobs` label is set (which bypasses job skips and would otherwise hit the assertion)
    - In `pull_request.py`, override timeout to 3 hours for `Build Toolchain (PGO, BOLT) (amd64)` in the PR workflow

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

commit 040de15
Author: Alexei Fedotov <[email protected]>
Date:   Fri Apr 24 19:51:10 2026 +0200

    CI: fix `_log_fd` leak in `ClickHouseService` when `Popen` raises

    Use a `with` block so the log file descriptor is always closed after
    `subprocess.Popen` returns, whether it raises or not. The child process
    holds its own dup'd fd, so closing Python's copy is safe. Removes the
    now-unnecessary `_log_fd` instance variable and its associated
    `flush`/`close` calls.

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

commit 1eeef90
Author: Alexei Fedotov <[email protected]>
Date:   Fri Apr 24 19:38:55 2026 +0200

    CI: add `ci-all-jobs` label to bypass all job skips

    Add a new `ci-all-jobs` PR label that disables both filter-hook skips
    and file-based job filtering, so every job in the workflow runs
    regardless of changed files or other label-based conditions. Release
    labels still take priority.

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

commit f265406
Author: Alexei Fedotov <[email protected]>
Date:   Fri Apr 24 19:25:35 2026 +0200

    Restore --init

commit 72fda4b
Merge: 7fcb083 cf81ad1
Author: Alexei Fedotov <[email protected]>
Date:   Fri Apr 24 19:24:06 2026 +0200

    Merge branch 'master' into add-ci-tests-init

commit 7fcb083
Author: Alexei Fedotov <[email protected]>
Date:   Wed Apr 22 22:05:03 2026 +0200

    ci: resolve merge conflict in `ci_tests_job.py`

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

commit 5cac837
Merge: 8d8f5a1 3f97d3d
Author: Alexei Fedotov <[email protected]>
Date:   Wed Apr 22 12:07:22 2026 +0200

    Merge branch 'master' into add-ci-tests-init

commit 8d8f5a1
Author: Alexei Fedotov <[email protected]>
Date:   Tue Apr 21 23:42:06 2026 +0200

    CI: fix perf-test SIGTERM by using start_new_session=True, restore --init

    The performance test driver was being killed by its own `SIGTERM` because
    `Utils.terminate_process_group` called `os.killpg(os.getpgid(child_pid), SIGTERM)`,
    but the child server inherited the driver's own process group (since `subprocess.Popen`
    was called with `shell=True` and no session isolation).  With `--init` injecting
    `tini` as PID 1 the driver was no longer immune to `SIGTERM`, so the bogus
    `killpg` killed it — producing "Job killed, exit code [143]".

    Root-cause fix: add `start_new_session=True` to both `Popen` calls in
    `ci/jobs/performance_tests.py` (`start_preconfig` and `start`).  This gives
    the server its own process group, so `os.killpg` can only reach server
    processes and the driver is safe.

    With the real fix in place:
    - `--init` is restored in `ci/praktika/runner.py` (it provides correct zombie
      reaping and was correct to add in ClickHouse#102529).
    - The temporary `--skip test_cleanup_kills_orphaned_test_process` workaround
      is removed from the `CI Tests` job config; the test can now run normally.

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

Labels

pr-ci pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants