Skip to content

fix(preprod): Return null for empty mobile build size buckets - #132034

Open
sentry-junior[bot] wants to merge 3 commits into
masterfrom
fix/preprod-size-timeseries-null-empty-buckets
Open

sentry-junior[bot] wants to merge 3 commits into
masterfrom
fix/preprod-size-timeseries-null-empty-buckets

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

/events-timeseries/ zerofilled the preprodSize dataset, so a bucket with no build reported a size of 0. Anything reading the API directly, such as an agent or an MCP tool, sees the app drop to 0 bytes between builds and has no way to tell that apart from real data. Empty buckets now return null, which correctly means there was no build in that bucket.

  • organization_events_timeseries.py: the PreprodSize resolver config sets zerofill_timeseries=False. Buckets where data_present is false then serialize as null, for both plain and top-events (grouped) queries.
  • rpc_dataset_common.py: if a query returns no results at all, run_timeseries_query still builds the empty buckets and sets them to null when zerofill is off, so the series still covers the requested range. Before, that branch was skipped when zerofill was off, which would have returned values: []. The only other caller with zerofill off is the heatmap y-bounds query, and its result stays (0, 0) either way.

The dashboard doesn't change. The mobile builds line transform (#131681) already treats null and 0 as empty buckets, and empty bars render the same. After this lands, the frontend === 0 check can be removed.

This is step one. Step two is applying fill(locf) by default for size aggregates, with filled flags, so API consumers get the carried-forward size the dashboard shows.

Decisions

  • Only events-timeseries: /events-stats/ still zerofills preprodSize, and test_zerofill_no_data there asserts on it. Conclusion : This is fine, Nothing in the frontend reads preprodSize through events-stats and that's the old api
  • count() is affected too: empty buckets for count() on this dataset also become null instead of 0. Conclusion: This is fine, but not as ideal, have 0 counts probably makes more sense, but that's much smaller of a problem then showing 0 instead of null for other aggregates like max

Refs DAIN-1504

via @DominikB2014.

--

View Session [Sentry]

@linear-code

linear-code Bot commented Nov 20, 2026

Copy link
Copy Markdown

DAIN-1504

@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Nov 20, 2026
@DominikB2014
DominikB2014 marked this pull request as ready for review November 20, 2026 17:43
@DominikB2014
DominikB2014 requested review from a team as code owners November 20, 2026 17:43
@sentry-junior
sentry-junior Bot requested a review from DominikB2014 November 20, 2026 17:43
Comment thread src/sentry/snuba/rpc_dataset_common.py Resolved
sentry-junior Bot and others added 2 commits November 20, 2026 18:03
events-timeseries zerofilled the preprodSize dataset, so a bucket with no build reported a size of 0. Callers that read the API directly saw the app shrink to nothing between builds and could not tell that apart from real data. Empty buckets now return null.

When a query has no results at all, the empty buckets are still built so the series covers the requested range, with null values when zerofill is off.

Refs DAIN-1504

Co-Authored-By: Dominik Buszowiecki <44422760+DominikB2014@users.noreply.github.com>
@sentry-junior
sentry-junior Bot force-pushed the fix/preprod-size-timeseries-null-empty-buckets branch from 5ef1f89 to 3289f4e Compare November 20, 2026 18:03
@DominikB2014

Copy link
Copy Markdown
Contributor

@trevor-e i'm curious if you have any opinions on this change

This branch was successfully deployed

1 active deployment
Preview — 807ac0fa Deployed Nov 20, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants