Skip to content

The adoption snapshot test keeps fixture rows within retention - #1740

Merged
zlareb1 merged 1 commit into
mainfrom
fix/ci-adoption-snapshot-fixture-expiry-20261129
Nov 30, 2026
Merged

zlareb1 merged 1 commit into
mainfrom
fix/ci-adoption-snapshot-fixture-expiry-20261129

Conversation

@zlareb1

@zlareb1 zlareb1 commented Nov 29, 2026 •

Copy link
Copy Markdown
Member

Changelog category

  • CI Fix or Improvement

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

  • The directory case failed on clean main with the same missing domains as the hosted test. The whole adoption telemetry test file passed after the change, with 18 tests on ClickHouse local 26.11.4.11.
  • Reproduce with python -m pytest tests/unit/test_adoption_telemetry.py with ClickHouse local on PATH.
  • make format, make lint, and make typecheck passed.
  • The full-tree formatter also found the adoption page hunk tracked in #1706.
  • Failing main job

AI assistance in the code

  • AI-generated. Codex changed the test dates, checked the fixture offsets and ran the regression test before and after the edit.

Checklist

  • Local format, lint, type checks and focused tests pass.
  • Commits are signed off.

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_report by replacing hardcoded 2026-11-26 / 2026-11-27 fixture dates with today and yesterday computed from datetime.now(UTC).

The warehouse query still pins now('UTC') to a controllable clock (today at 01:30), but snapshot TTL is evaluated against real UTC, so fixed rows eventually aged out and the directory assertions stopped matching. Assertions on live.example’s day, first_seen, and last_seen now 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.

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>
@vercel

vercel Bot commented Nov 29, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
loom-docs Ready Ready Preview Nov 29, 2026 3:16am UTC
loom-telemetry Ready Ready Preview Nov 29, 2026 3:16am UTC

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant