Repository navigation
The adoption snapshot test keeps fixture rows within retention - #1740
Merged
Merged
Conversation
The view's clock is fixed during the test, but the snapshot TTL uses real UTC. Derive the two fixture dates from one UTC day so the rows stay in the table and keep their original ages relative to the view's clock. Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was referenced Nov 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog category
Why
The adoption directory test uses a fixed view clock and fixed snapshot dates. ClickHouse applies the two-day snapshot retention period against real UTC. Once those fixture rows expire, the directory loses expected entries.
Scope and risk
Derive the two fixture days from one UTC date. Preserve the view clock's time of day, the relative ages and ordering of the rows, and the directory and account assertions.
Compatibility, rollout and rollback
This is a test fixture change. It rolls back by reverting the test file.
Tests
python -m pytest tests/unit/test_adoption_telemetry.pywith ClickHouse local on PATH.make format,make lint, andmake typecheckpassed.AI assistance in the code
Checklist
Note
Low Risk
Test-only change to adoption telemetry ClickHouse fixtures; no production behavior.
Overview
Fixes a flaky CI failure in
test_public_domain_directory_uses_latest_snapshot_until_daily_reportby replacing hardcoded2026-11-26/2026-11-27fixture dates withtodayandyesterdaycomputed fromdatetime.now(UTC).The warehouse query still pins
now('UTC')to a controllable clock (todayat 01:30), but snapshot TTL is evaluated against real UTC, so fixed rows eventually aged out and the directory assertions stopped matching. Assertions onlive.example’sday,first_seen, andlast_seennow use the same dynamic dates.Reviewed by Cursor Bugbot for commit 0791f72. Bugbot is set up for automated code reviews on this repo. Configure here.