Skip to content

target: track explicit test cache counts#11948

Open
sluongng wants to merge 1 commit intomasterfrom
sluongng/target-cache-counts
Open

target: track explicit test cache counts#11948
sluongng wants to merge 1 commit intomasterfrom
sluongng/target-cache-counts

Conversation

@sluongng
Copy link
Copy Markdown
Contributor

A user reported that the test grid could show cached tests as
non-cached. That happened because test target history inferred cache
state from timestamps and flattened multiple test attempts down to a
lossy bool.

This change keeps target history test-only, adds explicit local,
remote, and total cached attempt counts to ClickHouse-backed test
history, and updates the TAP grid to derive full versus partial
cache state from those fields. The primary DB path stays on the legacy
bool, and cached remains in TargetStatus as a fallback for older
ClickHouse rows that do not have the new count columns yet.

This requires an additive ClickHouse migration for TestTargetStatuses.
Older rows still render via the legacy bool and timestamp heuristic
until they are rewritten, while new rows carry the full cache-attempt
semantics.

A user reported that the test grid could show cached tests as
non-cached. That happened because test target history inferred cache
state from timestamps and flattened multiple test attempts down to a
lossy bool.

This change keeps target history test-only, adds explicit local,
remote, and total cached attempt counts to ClickHouse-backed test
history, and updates the TAP grid to derive full versus partial
cache state from those fields. The primary DB path stays on the legacy
bool, and cached remains in TargetStatus as a fallback for older
ClickHouse rows that do not have the new count columns yet.

This requires an additive ClickHouse migration for TestTargetStatuses.
Older rows still render via the legacy bool and timestamp heuristic
until they are rewritten, while new rows carry the full cache-attempt
semantics.
@sluongng sluongng requested review from bduffany and luluz66 April 22, 2026 14:41
@sluongng sluongng marked this pull request as ready for review April 22, 2026 14:41
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