Repository navigation
Fix flaky 05045_create_token when a token deadline falls into the hour repeated at the end of DST - #127762
Conversation
…our repeated at the end of DST
`CREATE TOKEN` returns `valid_until` as a `DateTime64(0)` without a time
zone, so it is printed as local wall-clock text with no offset. The test
parsed that text back with `toDateTime64('<text>', 0)` to compare it with
`now()` and with `system.users`. In the hour that repeats when DST ends the
text is ambiguous and parses back to the first occurrence, one hour early,
so the 30-minute check, the stored-deadline check and the 60-second check
printed 0.
The CI server zone is `Europe/Amsterdam` (`TZ` in the test-base image),
which left CEST at 2026-10-25 01:00 UTC. The test failed 3/3 on 7 unrelated
PRs that night, in the jobs that run without random settings and whenever
the runner drew `session_timezone = 'Europe/Amsterdam'`.
Read the two now-relative deadlines back as a Unix timestamp
(`date_time_output_format = 'unix_timestamp'`), which names one instant in
every zone. The fixed deadlines (2077, 0, year 9999) stay text on purpose:
their display is what those lines assert.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Internal second-model review (click to expand)Own cold review + Gate B (codex) on
|
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-impl-slot-4:20261025-012700 |
|
cc @kcmannem, could you review this and add the |
|
Workflow [PR], commit [0a18d07] Summary: ✅ AI ReviewSummaryPR #127762 fixes DST-dependent failures in Missing context / blind spots
Final VerdictStatus: ✅ Approve |
f50ab22
Related: #116957
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Description
05045_create_tokenreads the deadline returned byCREATE TOKENback from text:valid_untilis aDateTime64(0)without a time zone, printed as local time with no offset, and the test parses it withtoDateTime64('<text>', 0)to compare it withnow()and withsystem.users. When DST ends, one local hour happens twice, and its text parses back to the first occurrence. The CI server zone isEurope/Amsterdam, which left CEST at 2026-10-25 01:00 UTC. Every run that created a token between about 00:30 and 01:59 UTC got a deadline in the second 02:xx hour, read it back one hour early, and printed0for the 30-minute and/or the 60-second check. It failed 3/3 on 7 unrelated PRs in the jobs that run without random settings, for example PR 127586 and PR 121154.The two deadlines compared with
now()are now requested withdate_time_output_format = 'unix_timestamp'and passed totoDateTime64as a number, so the checks mean the same in every zone at any time. The.referencedoes not change. The fixed deadlines (2077, 0, year 9999) still go through text, because their display is what those lines check.Validation on a
Europe/Amsterdamserver:countEqualis 0; the new statements and the first-occurrence control are exact;Europe/Amsterdam; new 50/50 OK.Workflow [PR]
Sync PR [sync-upstream/pr/127762]
Version info
26.11.1.758-master(included in26.11and later)