Skip to content

Pin the scratch store session to UTC in live tests - #4645

Merged
erikdarlingdata merged 2 commits into
devfrom
fix/4639-scratch-postgres-utc
Sep 28, 2026
Merged

erikdarlingdata merged 2 commits into
devfrom
fix/4639-scratch-postgres-utc

Conversation

@erikdarlingdata

@erikdarlingdata erikdarlingdata commented Sep 28, 2026 •

Copy link
Copy Markdown
Owner

Fixes #4639

What changed

ScratchPostgres now builds its connection string through DarlingStoreConnection.PinSessionTimeZoneUtc, the same pin the product applies. Every scratch-store live test (97 files) now runs in a UTC session whatever the cluster default is.

Why

RollupFloorCacheLiveTests reads a chunk's range_end and passes it back as $1::timestamp. In a session behind UTC that cast moves the cutoff earlier, so drop_chunks keeps the chunk and the test fails.

Test-only, not product

Every non-test store connection (NpgsqlConnection, NpgsqlDataSource.Create, NpgsqlDataSourceBuilder) in Service, Storage and Viewer goes through PinSessionTimeZoneUtc. Two Service connections in DarlingWorker (about lines 4327 and 9872) open runtime.ConnectionString without it. Both belong to monitored-target paths, not the store, so I left them alone.

Verification (local TimescaleDB rig, cluster and OS zone America/New_York)

  • RED, RollupFloorCacheLiveTests on dev: 1 failed.
  • GREEN, same class with the fix: 1 passed.
  • Other scratch live classes on the same rig, 0 failed: IntervalFirstExecIndexRungTests (6), RollupCoverageCeilingLiveTests (1), RefreshCeilingStalenessTests (18), TempDbCeilingStoreTests (12).
  • 0 failed: DocCommentHygieneTests (77), CommentFilterAdoptionTests (4), McpPayloadContractCensusTests (68), StorageCommandTimeoutTests (19), StartupCommandTimeoutTests (15). 0 build warnings.
  • Not confirmed: a wildcard run of the other *Census* classes printed no totals, so CI decides those.

CHANGELOG

None: test-only change (the scratch-store test fixture pins its session to UTC).

@erikdarlingdata
erikdarlingdata marked this pull request as ready for review September 28, 2026 20:42
@erikdarlingdata
erikdarlingdata merged commit 8910301 into dev Sep 28, 2026
15 of 16 checks passed
@erikdarlingdata
erikdarlingdata deleted the fix/4639-scratch-postgres-utc branch September 28, 2026 20:42
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