Repository navigation
Conversation
`start_clickhouse` took its deadline at entry, so time spent in the harness's own `docker exec` calls before the launch counted against the server. On a CI host where dockerd stalled, the first `pgrep` probe took 60.5 s, the server was launched with the 60 s budget already gone, the loop slept 1 s, hit the deadline and raised "Cannot start ClickHouse" without ever checking the launched server, which was ready 1 s later (MasterCI 7f13980, Integration tests (amd_asan_ubsan, db disk, 3/8), test_lazy_load_tables_replica_status). Reset `start_time` right after the first launch exec of the call returns. Only the first launch resets it, so a server that dies at startup is still relaunched within one budget. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Internal second-model review (click to expand)Independent review of 4c4f1ed plus a cold Gate B pass: 0 blockers, 0 majors.
Session id: cron:clickhouse-review-slot-8:20261119-045300 |
|
cc @Felixoid, could you review this? start_clickhouse took its deadline at entry, so a 60 s docker exec stall in the first pgrep probe used up the whole start budget and the harness raised on a healthy server; the budget now starts when the first launch exec returns. |
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-impl-slot-40:20261119-041600 |
|
Workflow [PR], commit [4c4f1ed] Summary: ❌
AI ReviewSummaryThe change starts the Final VerdictStatus: ✅ Approve |
CI finish ledger - 4c4f1edEvery failure below has an owner: a fixing PR (mine or external), or a full-effort fix task
The other CIDB Session id: cron:our-pr-ci-monitor:20261119-073024 |
| **({"workdir": DOLOR_CORE_DIR} if self.cluster.with_dolor else {}), | ||
| ) | ||
| # The budget counts from the first launch, not from slow docker calls before it | ||
| if first_launch: |
There was a problem hiding this comment.
the upper start_time looks redundant then
There was a problem hiding this comment.
It is still read before any launch: by the while condition on the first iteration, and by wait_start(start_wait_sec + start_time - time.time()) when a server is already running at entry (no launch there, so the reset never runs; e.g. after a stop_clickhouse whose kill exec raised, which it only logs). Without it the first iteration raises UnboundLocalError, so I'd keep it.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Description
test_lazy_load_tables_replica_status/test.py::test_lazy_loaded_replica_is_not_reported_up_to_datefailed on master withCannot start ClickHouse, see additional info in logswhile the server was healthy. No related issue.Failing job: report
start_clickhousetakes its deadline at entry. Its first probe,docker exec ... pgrep, waited 60.5 s in dockerd (exec-added01:41:28.666,exec-started01:42:29.193, while other tests' containers were being force-killed), so the 60 s budget was gone before the server existed. The harness launched it, slept 1 s, saw the deadline passed and raised without checking it. The server loggedReady for connectionsone second later, and the next test used it.The budget now starts when the first launch
docker execreturns. Only the first launch of a call resets it, so a server that dies at startup is still relaunched within one budget. When a server that was already running fails its check, its relaunch gets a full budget, so such a call can take up to about twicestart_wait_sec.restart_with_original_version/restart_with_latest_versionshare the shape but use a combined 300 s stop and start budget with no CI occurrence, so they are unchanged.Validation (local; no test, since this is test infrastructure): in a scratch module whose in-container
pgrepstalls 22 s once beforestart_clickhouse(start_wait_sec=20), the call raised 3/3 before the change with the CI log sequence and passes 3/3 after. A server with a broken config still raises within the budget, also with the stall;expected_to_fail=Truestill returns; resetting on every launch instead hangs.test_lazy_load_tables_replica_status,test_system_logs_commentandtest_keeper_incorrect_configpass.Workflow [PR]
Sync PR [sync-upstream/pr/132882]