Skip to content

fix(Replay): Normalize Project ID Typing To Int For Frontend#104358

Merged
cliffordxing merged 1 commit intomasterfrom
normalize-eap-response-data
Dec 4, 2025
Merged

fix(Replay): Normalize Project ID Typing To Int For Frontend#104358
cliffordxing merged 1 commit intomasterfrom
normalize-eap-response-data

Conversation

@cliffordxing
Copy link
Copy Markdown
Contributor

EAP returns agg_project_id column as a float, which we eventually convert to a string in post_process.py:

ret_item["project_id"] = str(item["agg_project_id"])

Since agg_project_id is a float, the conversion to a string results in a ".0" trailling the ID, which results in an unknown project when passed to the frontend.

After asserting that the agg_project_id is indeed a float, this PR updates the normalization function to also convert the agg_project_id to an int first (to truncate the decimals) to account for the above issue.

Relates to: https://linear.app/getsentry/issue/REPLAY-824/create-query-function-for-replay-details

@cliffordxing cliffordxing requested a review from a team as a code owner December 3, 2025 23:05
@linear
Copy link
Copy Markdown

linear bot commented Dec 3, 2025

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Dec 3, 2025
@codecov
Copy link
Copy Markdown

codecov bot commented Dec 3, 2025

Codecov Report

❌ Patch coverage is 85.71429% with 1 line in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...y/replays/endpoints/organization_replay_details.py 85.71% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           master   #104358       +/-   ##
============================================
+ Coverage   66.03%    80.57%   +14.54%     
============================================
  Files        9338      9347        +9     
  Lines      399132    399699      +567     
  Branches    25599     25599               
============================================
+ Hits       263550    322067    +58517     
+ Misses     135129     77179    -57950     
  Partials      453       453               

@cliffordxing cliffordxing merged commit 0caebb4 into master Dec 4, 2025
68 checks passed
@cliffordxing cliffordxing deleted the normalize-eap-response-data branch December 4, 2025 17:41
@github-actions github-actions bot locked and limited conversation to collaborators Dec 20, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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