Repository navigation
Conversation
…ansiently Since 2026-09-13 20:00 UTC this check has 45 error legs over 42 pull requests against 380 successes, and 27 of those errors, over 24 pull requests, are one read failing in compare_compile_times. The read is not refused. On 091c46e a single LogCluster.select call lost all eight attempts between 20:01:53 and 20:09:59, five to a 60 s client read timeout and three to an HTTP 500, the last carrying Code: 241. DB::Exception: (total) memory limit exceeded: would use 212.51 GiB ... maximum: 212.40 GiB. OvercommitTracker decision: Query was selected to stop by OvercommitTracker. (MEMORY_LIMIT_EXCEEDED) That is the shared read-only endpoint's server-wide limit rather than this query's own, so the query was the OvercommitTracker's victim, and the check still reported the failure against the pull request's commit. is_ready's SELECT 1 passed before each of the eight attempts, so the endpoint was reachable throughout. select already separates the two failure classes inside its retry loop: it retries >= 500 and request exceptions with a growing backoff, and breaks immediately on any other non-ok status, which is the branch a 403 ACCESS_DENIED takes. It then collapses both terminal states into one return None, so Db.query cannot tell a query the server will refuse again from a cluster that was over its memory limit for the ten minutes it kept asking, and main's single except Exception turns both into a red check whose pinned comment names the commit. The classification exists at the seam; it does not travel. It now does, as TransientReadFailure, raised only when every observed failure of the loop was a >= 500 or a requests.exceptions.Timeout. The predicate is fail-closed rather than "a 5xx was seen somewhere": two write-once flags are tracked, one for the authorised outcomes and one for every other observed failure, and the raise is guarded on the second being unset. A 403, any other non-5xx refusal, a connection reset, a failed readiness probe, and any mixture of those with a 5xx therefore all keep the job red. The readiness failure is deliberately in that group even though the ruling does not require it: is_ready also returns False for a refused SELECT 1, so admitting it would green a credential failure. That costs the observed case nothing, since the job log carries no readiness failure at all. main presents that one class as a comparison that did not run: SKIPPED, which maps to a successful GH status, is skipped by the mergeable aggregation, and lands in cidb as check_status = 'skipped', so how often it fires is countable from outside. The skip is conditional on the pinned comment actually saying so, and that is enforced rather than assumed. The skip path does not pass only_update, because post_updateable_comment posts nothing when it is set and no tagged comment exists, and this job is the only writer of that tag; update_comment now reports whether the comment is in place, and the skip re-raises when it is not, so a SKIPPED leg with nothing explaining it is unreachable. A local run re-raises with its traceback as before. Authorised in ClickHouse#115706 (comment) , where a 403 was ruled to stay red and a 5xx or a timeout was allowed to skip the comparison as long as the pinned comment says the comparison did not run, with no unconditional skip. I said in that thread that I would add it the first time a transient read actually exhausted the retries; this is that case. Out of scope on purpose: the query is unchanged, Db.query is untouched, and do_query, the INSERT transport, keeps failing closed, because its callers assert on its return value and a silently dropped upload corrupts every later baseline. Validated with a throwaway harness rather than a committed test, since nothing in the tree executes ci/tests: thirteen cases over scripted transport outcomes, including the recorded eight-attempt sequence of the failing call, each case killed by at least one of eleven mutation controls. Both directions were measured with the same harness, which resolves the new exception dynamically so that it also runs against master. Co-Authored-By: Claude Opus 5 <[email protected]>
…it observes Result.Status.SKIPPED is inside Result.is_ok(), and the runner posts a praktika cache success record for any is_ok() result that does not ask it not to. That record is keyed on (job name, job digest), a later run with the same digest finds it in cache_success_base64, and the generated workflow condition then drops the job from the run entirely. So the previous commit's skip, which is a verdict about the health of a shared read-only endpoint, would have been stored as a verdict about the content: one memory-pressure spike would have skipped the comparison permanently for that digest, no re-run could have recovered it, no cidb row would have recorded it, and the pinned comment would have kept saying the comparison did not run for a commit nobody tried to compare again. On master the same failure is red, uncached, and recoverable by re-run, so that was a regression rather than a gap, and it contradicted the word transient. The skip therefore completes with do_not_cache=True. The other three completions of this job stay cacheable: not-a-pull-request, no profile data, and a real comparison are all verdicts about the content, and reusing them for an identical digest is the existing design. A digest hashes the checkout and the submodule revisions; it cannot hash whether a shared cluster was over its memory limit ten minutes ago, which is the same reasoning the bugfix-validation job records for its own do_not_cache. The classifier's second flag is renamed from unapproved to non_transient. Nothing in this file approves anything, so the old name only parsed if the reader already knew which outcomes a maintainer had authorised elsewhere; its sibling is named for what it observes and this one now is too. Pure rename: same two write-once flags, same fail-closed AND, same behaviour. Co-Authored-By: Claude Opus 5 <[email protected]>
Internal second-model review: adjudication log (click to expand)Two rounds. Round 1 on
Severity: ❌ blocker / Session id: cron:clickhouse-review-slot-8:20260915-051700 |
|
Workflow [PR], commit [fad3849] Summary: ✅
AI ReviewSummaryThis PR teaches Final VerdictStatus: ✅ Approve LLVM Coverage Report |
| if not posted: | ||
| # The skip is only legitimate while the comment says the comparison | ||
| # did not run, so an unposted comment stays a failure. | ||
| raise |
There was a problem hiding this comment.
If GH.post_updateable_comment fails here after a previous run already wrote the tagged build-profile-diff comment, this raise exits main before the generic except Exception block below can refresh that existing comment. The check goes red, but the pinned PR comment can still show the previous commit's comparison, which is the same stale-comment case the red path is otherwise trying to prevent. Can this fall through to the failure-comment update (or update the existing tagged comment with the failure text) before re-raising?
There was a problem hiding this comment.
The control-flow reading is right: a bare raise inside one except clause never enters a sibling clause of the same try, so the generic updater below does not run. What it misses is that the refresh has already been attempted one call earlier, at the same seam.
The arm calls update_comment(...) with no only_update, so post_updateable_comment lists the PR comments, finds the tagged one left by the earlier commit and PATCHes it (ci/praktika/gh.py:1167-1174). posted is falsy only when that attempt failed, and by the failure classes in that file a fall-through repeats the attempt rather than adding a missing one:
- the listing came back empty or unparseable (
gh.py:1097-1110): the fall-through lists again through the same helper; - credentials, permissions or validation (
gh.py:573-581):do_command_with_retriesbreaks out early, so repeating it changes nothing; - a transport error: that call already spent
MAX_RETRIES_GH= 3 retries with a 4/8/16 s backoff (ci/praktika/settings.py:43); - no tagged comment exists:
only_update=Truefinds nothing, warns and returnsNone(gh.py:1182-1185), and there is no stale comparison to replace either.
So the extra call helps only when a transport error clears in the seconds between the two writes. It is also not a regression: on master the same read raises at build_profile_diff_job.py:234, and that arm makes exactly one write attempt too, so the count is unchanged and only the text differs. I am keeping the single attempt. If a reviewer prefers the second one regardless, it is three lines and I will add it.
Build profile diff (arm_release)The comparison did not run: every attempt of the read failed with a server error or a timeout. Commit See the job log for details. |
CI finish ledger - 85a8590Every failure below has an owner: a fixing PR (mine or external), or a full-effort fix task whose fixing-PR link will be posted here when it opens. Only
Session id: cron:our-pr-ci-monitor:20260915-103126 |
The previous commit put every readiness failure in the non-transient group and said that cost the observed case nothing, since the job log of the failing call carried no readiness failure at all. That clause is now false, and it was the weakest part of the classifier. On 22a8733 of pull request 117375 the readiness gate is the only thing that failed. The log holds eight "ERROR: No connection to LogCluster", eight "LogCluster not ready", zero select-level failures and zero connection exceptions, from 13:57:28 to 13:59:48 with gaps of 5, 10, 15, 20, 25, 30 and 35 s: one select call losing all eight attempts at the gate, so the query itself was never sent. Then RuntimeError: CI logs cluster query failed: SELECT count() AS c FROM binary_sizes at 14:00:30, on a commit whose CI was otherwise green. 39e4658 of 119335 and 1b0371b of 113506 are that shape to the count, in the same hour. The three remaining failing legs of that hour, 0e6a31d of 76867, 2f40e4c of 104510 and 3a708dc of 116569, carry both shapes at once, and a single readiness failure vetoes the skip, so the classifier as it stands would have skipped none of the six. is_ready cannot say which failure it saw. It returns a bare False for six different outcomes, and on a non-ok response prints "No connection to LogCluster" with neither the status nor the body, naming a failure that did not happen: with zero connection exceptions in those logs the endpoint answered every probe inside the 3 s timeout, and answered it with an error status. Which status is exactly what the classifier needs. MEMORY_LIMIT_EXCEEDED does not appear in exceptionCodeToHTTPStatus at all, so it falls through to HTTP_INTERNAL_SERVER_ERROR, while ACCESS_DENIED and AUTHENTICATION_FAILED are in the HTTP_FORBIDDEN block and SOCKET_TIMEOUT maps to HTTP_SERVICE_UNAVAILABLE. The pressure that refuses SELECT 1 is therefore a 5xx and the grant failure that must stay red is a 403; one integer separates them, and it was being discarded. is_ready now returns Readiness(ready, transient) and select routes a readiness failure by that flag, which is the rule it already applies to the POST. This stays inside the ruling in 115706, which is phrased on the failure class rather than on which request carried it: a 403 stays red, a 5xx or a timeout may skip as long as the pinned comment says the comparison did not run, and there is still no unconditional skip. Nothing else moves. A missing url or password stays red, because a configuration break recurs on every retry; an ok status whose body is not 1 stays red, because the server answered; a non-Timeout exception stays red, symmetric with select's own POST arm; and any mixture containing one of those still vetoes the skip. The return type is a frozen dataclass with __bool__ rather than a tuple, because do_query's "if not self.is_ready()" is deliberately untouched. Writes must fail closed, its callers assert on the result, and a non-empty tuple is always truthy, so a tuple would silently invert that gate and upload into a cluster that had just refused the probe. do_query gains the better diagnostic for free, since the print lives in is_ready. The probe's body is printed bounded to 500 characters. A ClickHouse error puts the code and the message first, so the bound hides no cause: the probe-shaped Code 241 body is 697 characters and its maximum: clause is inside the first 500. A proxy error page is bounded by nothing, and this prints once per attempt, up to eight times, into a job log that is 50 kB in total. The comment saying a readiness failure cannot be attributed to pressure is deleted along with the limitation it described. Verified against a fake endpoint driven through the CI_LOGS_HOST seam and run against both this file and its parent commit's: seven scenarios, of which exactly the two this change claims flip, every request answering 500 and a probe stalling past its 3 s timeout, and five do not, a 403, a read 500, a read 400, a healthy endpoint, and a probe answering 500 then 403. Db.query raises RuntimeError before and TransientReadFailure after. At the production retries=8 the loop spends 180 s and records 8 of 8, matching the artifact. Co-Authored-By: Claude Opus 5 <[email protected]>
Internal second-model review: adjudication log (click to expand)Third round, on the readiness-probe commit. An independent model (engine: codex) reviewed the
Severity: ❌ blocker / Checked in the tree rather than assumed, because each one could have made the change inert: Session id: cron:clickhouse-review-slot-10:20260915-174000 |
TYPE_MISMATCH for a LowCardinality join key under join_use_nulls with full_sorting_merge
#120469
|
Closed in favor of #118708 |
…ails, and skip if it is unavailable `LogCluster.select` returned None for every kind of read failure and printed only the last response's text, so its one caller could say no more than "CI logs cluster query failed: <SQL>" and the reader had to open the job log to find that the endpoint had answered `Code: 241 ... (MEMORY_LIMIT_EXCEEDED)`. One shape was worse than a bad message. A failure raised after the status line is already on the wire arrives in the body, in an `exception` field next to the rows produced before it, and `response.ok` is true. Against a stub endpoint answering `200` with that field and an empty `data`, master's `has_pr_data` gets `[]`, the job posts "No arm_release build profile data for commit ..." and completes OK: a failed read is a green check. `select` now classifies every response with one module-level predicate - a body that is a JSON object with a non-empty `exception`, otherwise a status that is not ok - retries such an in-band failure like a 5xx, and raises `ReadFailure` with the status and the cluster's own error. `Db.query` keeps no failure branch. A cluster that cannot answer at all is not the commit's fault, so when every observed failure was a `>= 500` or a `requests` timeout, `select` raises `TransientReadFailure` and the job is SKIPPED with a pinned comment saying the comparison did not run. One non-5xx refusal, a probe answering something other than `1`, or a comment that did not post keeps the check red, so a 403 is still a failure. The skip is not cached: the verdict is the cluster's health, which no digest input captures, and a cached success would turn one pressure spike into a permanent skip. The readiness probe is classified the same way. It used to return a bare False after printing `No connection to LogCluster` with neither status nor body, so a run that failed there was red with nothing to attribute it to; it now prints both, and a `>= 500` or a timeout there is transient like the read itself. Requested in ClickHouse#115706 (comment) and ClickHouse#118708 (review) . Supersedes ClickHouse#120121 , closed in favour of this one. Co-Authored-By: Claude Opus 5 <[email protected]>
…ails, and skip if it is unavailable `LogCluster.select` returned None for every kind of read failure and printed only the last response's text, so its one caller could say no more than "CI logs cluster query failed: <SQL>" and the reader had to open the job log to find that the endpoint had answered `Code: 241 ... (MEMORY_LIMIT_EXCEEDED)`. One shape was worse than a bad message. A failure raised after the status line is already on the wire arrives in the body, in an `exception` field next to the rows produced before it, and `response.ok` is true. Against a stub endpoint answering `200` with that field and an empty `data`, master's `has_pr_data` gets `[]`, the job posts "No arm_release build profile data for commit ..." and completes OK: a failed read is a green check. `select` now classifies every response with one module-level predicate - a body that is a JSON object with a non-empty `exception`, otherwise a status that is not ok - and raises `ReadFailure` with the status and the cluster's own error. `Db.query` keeps no failure branch. A cluster that could not serve the read is not the commit's fault, so in that case `select` raises `TransientReadFailure` and the job is SKIPPED with a pinned comment saying the comparison did not run. Three observations mean the read was not served: a `>= 500`, a `requests` timeout, and an error the server reports after it has already committed an ok status, which is the condition a `>= 500` reports when it happens before the status goes out. The two are the same event seen at different points of one answer, so they are classified alike. Anything else keeps the check red: a 403 or any other refusal (an `exception` field does not make one transient, the committed ok status does), a probe answering something other than `1`, a non-timeout connection failure, or a comment that did not post. One such observation is enough, which is why the classification needs no more than the one flag that records it. The skip is not cached: the verdict is the cluster's health, which no digest input captures, and a cached success would turn one pressure spike into a permanent skip. The readiness probe is classified the same way. It used to return a bare False after printing `No connection to LogCluster` with neither status nor body, so a run that failed there was red with nothing to attribute it to; it now prints both, and a `>= 500` or a timeout there is transient like the read itself. Requested in ClickHouse#115706 (comment) , ClickHouse#118708 (review) and ClickHouse#118708 (comment) . Supersedes ClickHouse#120121 , closed in favour of this one. Co-Authored-By: Claude Opus 5 <[email protected]>
Related: #117375
Related: #119039
Related: #115706
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
A
Build profile diffread that fails only with server errors or timeouts is now a skipped comparison with a pinned comment saying it did not run.Description
Authorised in #115706 (comment) .
Build profile diffreds a commit when the shared CI logs cluster cannot answer, sending a contributor to an uninvolved diff. The endpoint's own memory limit refuses the query:Code: 241 ... OvercommitTracker decision: Query was selected to stop.Job-level rows on the public CI database today, through 17:50 UTC: 79 failures against 141 successes over 75 pull requests, with no success after 13:46:49. Earlier: 160 against 167 on 09-07, and 16 to 25 a day on 09-08, 09-13 and 09-14.selectraisesTransientReadFailurewhen every observed failure was a>= 500or arequests.exceptions.Timeout;mainturns that intoSKIPPEDwith a pinned comment saying so. The result is not cached, so a later run retries, and skips stay countable:checksrows withcheck_name = 'Build profile diff' AND check_status = 'skipped', 0 over 30 days.The readiness probe is now classified the same way. It used to return a bare
Falseand printNo connection to LogClusterwith neither status nor body, so a run that failed there was red with nothing to attribute it to. It prints both now, and a>= 500or a timeout there is transient. One readiness failure vetoes the skip, so of today's six failing legs none would have skipped before this round.1Db.queryuntouched,do_querystill fail-closed. Overlaps my open #118708 , which rewritesselect's tail; whichever merges second rebases.The two failure shapes, from the job logs
Three of today's six failing legs between 13:50 and 14:30 UTC lost all eight attempts at the probe, and three mixed both shapes. After this round a leg skips once its probe is seen to answer a
>= 500, which is what this pressure returns.091c46e6of pull request 119039: the probe passed and oneselectcall lost all 8 attempts.22a87338of pull request 117375: the shape this round adds. All 8 attempts died at the probe, so the query was never sent, and the log says nothing about why.Counted in that log: 8 readiness failures, 0 select-level failures, 0 connection exceptions. The gaps are the
5*(retry+1)backoff. Source: https://s3.amazonaws.com/clickhouse-test-reports/PRs/117375/22a87338ef8d1310b668becc4d00e9121f07d157/pr/build_profile_diff/job.logWorkflow [PR]
Sync PR [sync-upstream/pr/120121]