Skip to content

Remove ci/tests (attempt 2) - #115650

Merged
alexey-milovidov merged 7 commits into
masterfrom
remove-unused-tests
Aug 30, 2026
Merged

alexey-milovidov merged 7 commits into
masterfrom
remove-unused-tests

Conversation

@alexey-milovidov

@alexey-milovidov alexey-milovidov commented Aug 20, 2026 •

Copy link
Copy Markdown
Member

Remove the ci/tests/ suite, which is not worth its maintenance cost: it pins the internals of CI scripts rather than their observable behavior, so it mostly obstructs changes to CI instead of protecting them. In previous attempts, AI bots fought back on some of the tests.

The CI Tests job that ran this suite is removed in the same change: ci/jobs/ci_tests_job.py, JobConfigs.ci_tests, JobNames.CI_TESTS, the job entry in ci/workflows/pull_request.py, and the regenerated ci_tests lane in .github/workflows/pull_request.yml. Comments and the clickhouse_spelling ignore list that referred to the deleted files are updated as well, so nothing points at a missing path.

Changelog category (leave one):

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

Workflow [PR]
Sync PR [sync-upstream/pr/115650]

Version info

  • Merged into: 26.9.1.366 (included in 26.9 and later)

@clickhouse-gh

clickhouse-gh Bot commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [e38896f]

Summary: ✅


AI Review

Summary

This PR removes the ci/tests suite and the CI Tests job that ran it. The mechanical cleanup is mostly complete, but I do not think the suite can be retired as-is: it also deletes the only focused coverage for several still-live merge, release, and compatibility guardrails whose uncommon branches are not exercised by ordinary PRs.

PR Metadata

Changelog category is correct: CI Fix or Improvement. A Changelog entry is not required for that category.

Findings

⚠️ Majors

  • [ci/jobs/check_style.py:1128] check_settings_changes_history is the merge-blocking guard that enforces current-version records for setting-default changes, and deleting the test_settings_history_* files removes the only focused coverage for its fail-closed branches: parse_settings_history_changes, settings_history_fetch_error, and declared_setting_names. If any of those drift, required SettingsChangesHistory.cpp updates are silently skipped instead of failing CI.
  • [ci/tests/test_auto_releases.py:1] ci/jobs/auto_release_job.py is a live daily workflow that chooses a green commit and dispatches create_release.yml with a repo-mutating token. This file is the only focused coverage for its candidate-selection and dispatch contract (_latest_release_tag, _find_release_candidate, newest-status selection, dry-run, type=patch), and ordinary PR CI never exercises those paths.
  • [ci/tests/test_create_release.py:1] [dismissed by author -- https://github.com/Remove ci/tests (attempt 2) #115650#discussion_r3823491080] Removing the release-side tests leaves release_job.py, create_release.py, and the backport target-selection helpers without focused regression coverage. Those paths create tags, branches, and PRs and are only exercised when the release machinery is already mutating the repository.
  • [ci/tests/test_functional_tests_results.py:1] Deleting this file together with test_hung_check_exit_code.py removes the only focused proof of the aborted-run, liveness, and --max-failures contract that spans tests/clickhouse-test and FTResultsProcessor.run. Those exit-code distinctions decide whether a run becomes Server died, Server liveness check failed, Too many test failures, or a real per-test failure, and the uncommon branches are not covered by normal happy-path CI runs.
  • [ci/tests/test_new_tests_check.py:1] [dismissed by author -- https://github.com/Remove ci/tests (attempt 2) #115650#discussion_r3835548887] Deleting this file together with test_bugfix_validation_inverter.py removes the only focused proof that the merge-blocking bugfix-validation state machine interprets per-arch OK, SKIPPED, and ERROR results correctly. A regression there can silently count an inconclusive or non-reproducing run as a validation and let an unproven Bug Fix merge.
  • [ci/tests/test_job_filtering.py:1] [dismissed by author -- https://github.com/Remove ci/tests (attempt 2) #115650#discussion_r3835548889] _filter_unaffected_jobs decides which required jobs may be skipped at all. The deleted truth-table cases are the only focused coverage for dependency rescue and transitive requirement propagation, and a regression here is specifically the kind that production cannot self-report because the missing job simply never runs.
  • [ci/tests/test_revert_ci_regressions.py:1] [dismissed by author -- https://github.com/Remove ci/tests (attempt 2) #115650#discussion_r3824555379] revert_ci_regressions.py is a live hourly automation that can revert merged PRs on master. Deleting its only focused coverage for repeated-failure selection and signature narrowing leaves a destructive path guarded only by production incidents.
Tests
  • ⚠️ If the intent is still to retire ci/tests, this needs replacement coverage for the still-live rare-path automations above rather than a blanket deletion of their only focused tests.
Final Verdict

⚠️ Not ready. The suite retirement still removes focused proof for active release, merge-gating, and compatibility guardrails.

@clickhouse-gh clickhouse-gh Bot added the pr-ci label Aug 20, 2026
Comment thread ci/tests/test_result.py Resolved
@@ -1,1583 +0,0 @@
"""

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ci/jobs/scripts/release_checks.py explicitly says the release-decision helpers were split out so the ci/tests/ suite could exercise them hermetically, and the release machinery is still live in ci/jobs/release_job.py, ci/jobs/auto_release_job.py, and ci/jobs/scripts/create_release.py.

Removing this file drops the only regression suite that pins the release orchestrator contract: CLI flags consumed by release_job.py, workflow-dispatch inputs, concurrency safety, and version arithmetic. For code that can dispatch releases and push tags or PRs, deleting the only executable proof without a replacement is too risky.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🕵 Removing this coverage is the intent of the pull request. The docstring in ci/jobs/scripts/release_checks.py that referred to the ci/tests/ suite is updated in the same change, so no stale contract is left pointing at a deleted file.

@clickhouse-gh

clickhouse-gh Bot commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor

Build profile diff (arm_release)

Comparing 8ff372064 with master 0b1c827dc (stripped binary size, per-symbol sizes and ThinLTO time; compile times per translation unit against the most recent warmup build that recompiled it).

✅ No significant changes.

Binary sizes
Binary Master PR Δ
programs/clickhouse-stripped 705.37 MiB 702.34 MiB -3.02 MiB (-0.43%)

Only the stripped binary is compared: the official master build keeps debug symbols while PR builds strip them, so the other binaries differ by construction.

Compile time of recompiled translation units

6 translation units recompiled, 4 s compile time in total, 6 of them have a recent master baseline.

Job report

@@ -1,2876 +0,0 @@
import json

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ci/jobs/revert_ci_regressions.py is still a live hourly job (ci/workflows/hourly.py, .github/workflows/hourly.yml) that can revert merged PRs on master. This deleted file is its only hermetic regression suite for the anti-flake selection, already-fixed suppression, and revert-budget guards, so removing it without a replacement means the next refactor can drift into reverting healthy PRs or skipping real regressions with no PR-time signal. Please keep this coverage or move an equivalent suite next to the job in the same change.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🕵 Same as the other threads: retiring ci/tests/ is the intent of the pull request, and the job that ran it is removed in the same change so nothing points at a missing path anymore.

# Conflicts:
#	ci/tests/test_functional_tests_results.py
#	ci/tests/test_job_image_pull_retry.py
#	ci/tests/test_llvm_coverage_gate.py
The `CI Tests` job (`ci/jobs/ci_tests_job.py`, `JobConfigs.ci_tests` and the
`ci_tests` lane in `.github/workflows/pull_request.yml`) ran `pytest` over
`ci/tests/`, so it would fail immediately once that directory is gone.
Remove the job, regenerate the workflow YAML, and drop the now-stale
references to the deleted suite from comments and from the
`clickhouse_spelling` ignore list.
@@ -1,505 +0,0 @@
"""

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deleting this suite removes the only focused truth-table coverage for ci/jobs/scripts/workflow_hooks/new_tests_check.py, which is the merge-blocking hook that decides whether a Bug Fix PR with new regression tests actually validated on at least one arch.

That hook already had two bypasses found only in review, and the deleted tests pin exactly those branch combinations. Without an equivalent replacement, a future change to has_new_* or the check() branching can silently let an unvalidated regression test merge or block a valid fix. Please keep targeted coverage for this hook before removing the file.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🕵 Removing this coverage is the explicit intent of the pull request (this is attempt 2 of retiring the ci/tests/ suite). The new_tests_check hook itself stays; its behavior is exercised on every pull request in production, and the hermetic suite that pinned it down is being retired wholesale along with the CI Tests job.

@@ -1,332 +0,0 @@
"""

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deleting this suite removes the only focused coverage for _filter_unaffected_jobs / Job.is_affected_by, the workflow-filtering logic that every PR, master, and release workflow uses to decide which jobs may be skipped.

The deleted cases are not cosmetic; they exercise dependency-rescue and path-matching edge cases that directly determine whether a required build or test runs at all. Without an equivalent replacement, a refactor here can silently skip necessary jobs or keep the wrong dependency chain alive with no PR-time signal. Please keep targeted coverage for this logic before removing the file.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🕵 Same as the sibling threads: retiring the whole ci/tests/ suite is the intent of the pull request, so the job-filtering coverage goes with it. _filter_unaffected_jobs and Job.is_affected_by remain in place and are exercised by every workflow run.

huldarchen pushed a commit to huldarchen/ClickHouse that referenced this pull request Aug 23, 2026
The ci/tests directory is being removed along with the CI Tests job that runs
it (ClickHouse#115650 deletes all 57 files, ci/jobs/ci_tests_job.py, the job_configs
entry and the workflow step; ClickHouse#114675 already removed an earlier batch), so an
arm placed there would not execute. The two files this branch added are dropped
rather than relocated: the whole CI-script unit-test category is being retired,
and tests/integration has no harness-self-test venue.

_is_docker_compose_timeout and _timed_out_orchestration_verbs go with them.
Neither is on the live path -- _is_infrastructure_error reaches
_is_orchestration_lifecycle_timeout, which calls _orchestration_verb,
_argv_lists and _raising_exception_lines directly -- so their only callers were
the deleted asserts.

Verdicts are unchanged: replaying 198 deduped real Integration tests results
through the pre-deletion and post-deletion predicates gives byte-identical
verdict vectors at the recorded status and at both forced statuses, and both
differ from origin/master in exactly the same way.

The change is validated by replaying results from the CI database instead;
see the pull request description.
pull Bot pushed a commit to TCeason/ClickHouse that referenced this pull request Aug 23, 2026
DockerImage.pull_image() issued a bare `docker pull` with no retries and no
per-attempt timeout, under strict=True. One transient registry or resolver
error therefore aborted an entire AST fuzzer / Stress / Upgrade / Install /
libFuzzer job with 0 tests run: Shell.run's retry loop executed once, the
allowlist branch was never consulted, and the RuntimeError it raised is caught
by none of the five call sites. Observed on 7 distinct PRs over 4 days across
3 job families, reported as check_status = error with no test row.

PR ClickHouse#113611 already added exactly this policy for the implicit pull that
`docker run` performs, and its allowlist already classifies the observed
`connection refused` and its SERVFAIL sibling `server misbehaving` as
retryable while deliberately excluding the permanent `no such host`. That
policy was simply unreachable from pull_image(), which ClickHouse#113611 explicitly
scoped out of its own change.

Move the pull policy into Docker.pull_image() in ci/praktika/docker.py, which
already owns Docker-operation retry classification (Docker.build passes its own
retry_errors), and route both callers through it. The constants move verbatim,
comments included, so there is no second copy of the allowlist that could drift
and silently turn a permanent failure into three slow retries.

The two callers legitimately differ and the wrapper takes the difference as
parameters rather than flattening it: Runner._run stays non-strict, because a
locally built image has no registry copy to pull and its pull must not be
fatal, and keeps its env-closure callback; DockerImage.pull_image passes
strict=True so it still raises once the retries are exhausted. The latter also
gains its own on_retry, because a path with no retries had nothing to report
before, and a silent retry would be a new blind spot now that retries exist.
It reports through Info().add_workflow_warning rather than copying the runner's
closure: a job script holds no frame-local env, and Info()'s write is dumped
immediately.

Verified against the real Shell.run loop with a counting fake command. Before
this change the verbatim production DNS failure burns one attempt and aborts;
after it, three, while a permanent `pull access denied` still burns exactly
one. The 25 existing tests in ci/tests/test_job_image_pull_retry.py pass
unchanged, including the assertion that the allowlist reaching Shell.run is the
same object, which guards the re-routed ClickHouse#113611 path.

No test is added: PR ClickHouse#115650 removes ci/tests entirely, including
test_job_image_pull_retry.py, so that suite is used here as a regression
control rather than extended.

The remaining unretried `docker pull` invocations in changelog_nightly.py,
release_job.py and artifactory.py are left alone; none of them appears in the
30-day failure window.
# Conflicts:
#	.github/workflows/pull_request.yml
#	ci/tests/test_selected_tests_run.py
#	ci/tests/test_settings_history_source_gate.py
#	ci/tests/test_unit_tests_bugfix_validation.py
@@ -1,566 +0,0 @@
"""

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This drops the only targeted truth-table coverage for invert_bugfix_validation_status, reconcile_bugfix_crash_repro, and attach_post_verdict_artifacts in ci/jobs/functional_tests.py.

Those helpers decide whether a per-arch bugfix-validation run reports OK, SKIPPED, or preserves an inconclusive ERROR, and new_tests_check.py consumes that status to decide whether a Bug Fix PR may merge. We have already fixed several regressions in exactly this state machine; without a focused suite, a refactor here can silently turn a no-repro or infra error into a false validation. Please keep equivalent coverage for this logic.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🕵 Same as the sibling threads: removing this coverage is the explicit intent of the pull request, which retires the ci/tests/ suite wholesale together with the CI Tests job. The bugfix-validation helpers in ci/jobs/functional_tests.py remain in place and are exercised by every Bug Fix pull request in production.

pull Bot pushed a commit to Mu-L/ClickHouse that referenced this pull request Aug 25, 2026
The directory is being removed (ClickHouse#115650), and the guard added in the previous
commit had a vacuous assertion besides: it compared a constant defined in the
test file against itself, so no change to the job script could fail it.

The drop-in's coupling to `<tcp_port>` in `programs/server/embedded.xml` is
therefore unguarded by a test. It fails loudly rather than silently: a mismatched
port resolves the cluster but leaves the read failing with
`All attempts to get table structure failed`, which the nightly reports.
# Conflicts:
#	.github/workflows/pull_request.yml
#	ci/tests/test_auto_releases.py
#	ci/tests/test_create_release.py
#	ci/tests/test_docker_apt_mirror_fallback.py
#	ci/tests/test_settings_history_source_gate.py
pull Bot pushed a commit to erickirt/ClickHouse that referenced this pull request Aug 30, 2026
`ci/tests` and the `CI Tests` job that ran it were removed in ClickHouse#115650, which
merged at 2026-08-30T00:35Z. ClickHouse#109673 merged eight hours later, at 08:41Z, from a
branch cut before that removal, so it re-created the directory with the one file
it carried: `ci/tests/test_runner_docker_daemon_death_infra.py`.

Nothing runs it any more - the job, its config and its workflow lane are gone -
and nothing references it by name, so it is dead code. Removing it finishes the
removal rather than re-opening the decision.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
groeneai added a commit to groeneai/ClickHouse that referenced this pull request Aug 30, 2026
The only conflict was a modify/delete on ci/tests/test_stress_job.py:
this branch added three tests to it, and ClickHouse#115650 removed the whole
ci/tests suite together with the CI Tests job that ran it
(ci/jobs/ci_tests_job.py, JobConfigs.ci_tests, JobNames.CI_TESTS and the
pull_request.py entry). The file, the suite and the runner are all gone
on master, so the deletion is taken as-is rather than relocating the
tests to a new home: that would be re-adding coverage a maintainer had
just removed on the stated grounds that it pins CI-script internals
instead of observable behaviour.

The production fix is unchanged. Verified rather than assumed:
the added-line and removed-line sets of the four production files are
byte-identical before and after the merge (61 added, 22 removed), the
merged tree leaves zero echo -e sites that append a command-substituted
escaped payload, and master added no new site of that kind (its three
new echo -e sites in upgrade_runner.sh write a constant info). No
submodule pin moves relative to master.
groeneai added a commit to groeneai/ClickHouse that referenced this pull request Aug 30, 2026
The ci/tests suite is gone from master: ClickHouse#114675 and ClickHouse#115650 removed its
contents together with the CI Tests job that ran it (ci/jobs/ci_tests_job.py,
JobConfigs.ci_tests, JobNames.CI_TESTS and the generated ci_tests lane), on the
grounds that it pins the internals of CI scripts rather than their observable
behavior. Master keeps one unrelated file under that path, and no job executes
it, so test_diagnostics_forwards_job_options.py would merge in as 439 lines
that nothing can run.

The observable behavior it asserted is covered end to end by this PR's own CI
run: the amd_llvm_coverage DBReplicated shard reported eight deterministic
configuration-specific failures that the job had been labelling flaky and
force-setting to OK, which is the effect the change exists to produce.
groeneai added a commit to groeneai/ClickHouse that referenced this pull request Sep 5, 2026
ClickHouse#115650 removed ci/tests/ and the "CI Tests" job from master. Nothing on
master executes that directory any more: outside ci/tests/ itself the only
remaining references are the doc examples in ci/praktika/cache.py, and
ci/defs/ has no ci_tests job config at all. A file added there merges
without a conflict because this branch forked before the removal, so the
suite would have shipped as 783 lines that no job can run.

The reviewer's only request about this directory on this PR was to remove a
test file from it, which is the same disposition.

The helpers keep their coverage as the local validation arms recorded in the
PR description: each arm extracts the real wrapper block from the runner by
content anchor and drives it through the real read_test_results, and the
suite is retained out of tree as evidence rather than as coverage this
branch ships.
groeneai added a commit to groeneai/ClickHouse that referenced this pull request Sep 10, 2026
`ci/tests/test_stress_stop_server_bounded.py` can never run. The `CI Tests` job
that ran `pytest` over `ci/tests/` was removed in 8ff3720 along with
`JobConfigs.ci_tests` and the `ci_tests` lane of the generated workflow, and the
suite itself was emptied by ClickHouse#115650. Nothing in the tree invokes pytest over
`ci/` today: the only remaining `ci/tests` references are the `example_1` cache
samples in ci/praktika/cache.py, and a file landing there is deleted again
(2c10dbc). So the file was a guard that no check could turn red.

The BEGIN/END marker comments existed only so that test could extract the loop
text verbatim, so they go with it. The invariant comment stays: it is why the
`timeout` wrapper is load-bearing rather than belt-and-braces.
groeneai added a commit to groeneai/ClickHouse that referenced this pull request Sep 14, 2026
…-info-head-window

`ci/tests/test_stress_job.py` was the only conflict, and it is a
modify/modify against a file that was deleted and then restored at a
different shape: ClickHouse#115650 removed it, `bc83cbe9312d2` ("Restore live CI
regression coverage") brought it back covering `select_replica_failures`
instead, and ClickHouse#118056 has been maintaining it since. The 249-line file this
branch added its tests to no longer exists in any form on master.

Resolved by taking master's 124-line file verbatim - all five
`select_replica_failures` tests are kept byte-for-byte - and re-applying
this branch's six hung-check tests on top, with the imports merged and the
module docstring extended to name both subjects. The `pytest` import and
the `__main__` block this branch relied on are dropped rather than
restored, because master's copy does not have them.

`ci/jobs/scripts/stress/stress.py` and `tests/clickhouse-test` merged
without conflict; both were verified by hand afterwards, since the target
block in `stress.py` had moved about 190 lines (the hung-check call site is
now at :1254) and `tests/clickhouse-test` had drifted far enough that a
clean auto-merge is not by itself evidence the two added lines still landed
inside the polling loop they are meant to pace. They did, and the loop
shape the AST test pins is unchanged: one `while` containing
`get_processlist_size`, with the zero-hung `break` before the added
`sleep(1)`.
pull Bot pushed a commit to Spencerx/ClickHouse that referenced this pull request Sep 20, 2026
`ci/tests/` is being removed, so this change stops adding to it. The review that approved
ClickHouse#115825 reads, in full, "We don't use ci/tests, they will be removed.", and ClickHouse#115650
(+9/-24715) is open against that directory: its file list includes
`ci/tests/test_unit_tests_bugfix_validation.py`,
`ci/tests/test_new_tests_check_unit_gate.py` and `ci/jobs/ci_tests_job.py`, the runner that
executes them. The first tranche, ClickHouse#114675 (+0/-6543), merged on 2026-08-15. The 15 arms
added in the three earlier rounds of this change are therefore deleted rather than thinned
or relocated: thinning still adds to a directory that is going away and still leaves a
conflict to resolve. The earlier precedent for adding there, ClickHouse#114400, merged on 2026-08-13,
before both that tranche and that review, so it does not license adding there now.

What remains under `ci/tests/` is three stub signatures, and they are not arms kept by
preference. `configure_before_binary` and `compile_before_binary` take a build type in this
change, so without the adaptations 9 of that module's 97 existing cases raise `TypeError`
and the live `CI Tests` job goes red on this PR. With them the module is 97/97 and the
sibling gate module is 5/5.

The correctness argument does not depend on the deleted arms. Fourteen mutants across the
three earlier rounds each reddened only the case written for it and never a pre-existing
one, and the last three were first run against all 109 pre-existing cases and survived,
which is what established that each claim was genuinely uncovered rather than redundant.
That record is evidence about this change, not shipped coverage. The module's own docstring
already states that the build and run orchestration is validated separately in CI, so the
file returns to exactly the coverage it had rather than below it; what is given up is a live
regression guard for the escalation loop until ClickHouse#115650 lands.

Separately, the module docstring claimed this job "builds the before binary in parallel with
the build matrix (it starts as early as the functional/integration validators)". It does
not: `ci/workflows/pull_request.py:139` is
`JobConfigs.bugfix_validation_ut_job.set_run_after(CORE_BLOCKING_JOB_NAMES)`, the comment
directly above it says the job is deferred behind the core blocking jobs, and that list
includes every unit-test job. The clause was master's, but this change re-flowed the
paragraph around it, so it is corrected here. The artifact-dependency half is true and
stays: the job does not need the PR's `UNITTEST_AMD_ASAN_UBSAN` artifact, so it is not
gated behind `build_amd_asan_ubsan`.
alexey-milovidov added a commit to groeneai/ClickHouse that referenced this pull request Sep 28, 2026
… test

The `ci/tests` guards for the abort-path reap went away with that suite
(ClickHouse#115650), leaving no automated coverage. `tests/integration` is the remaining
collected pytest root, so the essential oracles move to a cluster-less module
there, `test_clickhouse_test_abort_reap`, which loads `tests/clickhouse-test` as
a module and drives real process groups:

- `reap_recorded_test_groups` reaps only records of this run's
  `_CLICKHOUSE_TEST_RUN_TOKEN` and of the named workers;
- a `spawn` worker inherits the token, so its records are in the reap scope;
- SIGTERM/SIGINT/SIGHUP during `reap_recorded_test_groups` and during the
  worker stop in `quiesce_workers_and_reap` do not raise `Terminated`;
- `quiesce_workers_and_reap` stops a worker that keeps recording groups before
  the single walk, so no record or group survives.

Each test was checked to fail against a runner with its contract broken
(token check dropped, token not seeded through the environment, signals not
masked, reap before terminate).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
groeneai added a commit to groeneai/ClickHouse that referenced this pull request Oct 7, 2026
`runner-init.py` itself runs unmodified as `__main__` against a faked
host: instance metadata through `http_proxy`, a stub `boto3`, and fake
`df`, `sudo`, `bash` and actions-runner `config.sh` / `run.sh` that only
append to an event log. Nothing is provisioned, registered, uploaded or
terminated. Five scenarios assert the recorded step sequence: a macOS host
below 20 GiB refuses before registering, a macOS job is followed by a disk
check and no Docker teardown, a macOS job that leaves the host below the
bound ends the loop, a Linux host with 10 GiB free still takes a job and
tears Docker down after it, and a full Linux host refuses and terminates.

The `CI Tests` job that ran `ci/tests/` was removed in ClickHouse#115650, so this is
a dedicated job in the PR workflow. Its digest covers only `runner-init.py`
and the job script, so it is cache-reused unless one of them changes. It
runs as root in `clickhouse/style-test` because the script writes the
runner home `/home/ubuntu/actions-runner`, and it refuses to start outside
a container.

Each of these edits to `runner-init.py` fails at least one scenario: no
pre-job disk check, Docker teardown on macOS, no Linux teardown, no 20 GiB
macOS bound, keeping the provisioning marker on exit, no post-job check.

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-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.

2 participants