Skip to content

Conversation

aliu39
Copy link
Member

@aliu39 aliu39 commented Aug 6, 2025

Part of REPLAY-538: Delete async summaries when replay is deleted. Sends a seer request to delete summaries when a replay is deleted from bulk delete or replay details endpoints. Seer deletes were not added to the delete_replays script.

Seer endpoint: https://github.com/getsentry/seer/pull/3101

Copy link

linear bot commented Aug 6, 2025

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Aug 6, 2025
Copy link

codecov bot commented Aug 6, 2025

Codecov Report

❌ Patch coverage is 85.00000% with 6 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/sentry/replays/usecases/delete.py 77.27% 5 Missing ⚠️
src/sentry/replays/tasks.py 92.30% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master   #97279   +/-   ##
=======================================
  Coverage   80.61%   80.61%           
=======================================
  Files        8559     8559           
  Lines      376667   376755   +88     
  Branches    24492    24491    -1     
=======================================
+ Hits       303660   303731   +71     
- Misses      72637    72654   +17     
  Partials      370      370           

@aliu39 aliu39 marked this pull request as ready for review August 6, 2025 22:11
@aliu39 aliu39 requested review from a team as code owners August 6, 2025 22:11
cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

@@ -43,32 +47,17 @@
),
),
)
def delete_recording_segments(project_id: int, replay_id: str, **kwargs: Any) -> None:
def delete_replay(
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed this to match its purpose of deleting a single replay - archive event, del recording segments, and request seer. Maybe this can later be replaced by this task I removed recently, since they seem to be very similar?

"""Asynchronously delete a replay."""
metrics.incr("replays.delete_recording_segments", amount=1, tags={"status": "started"})
metrics.incr("replays.delete_replay", amount=1, tags={"status": "started"})
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if we're using this metric anywhere, I can restore if needed

@aliu39 aliu39 requested a review from cmanallen August 8, 2025 17:11
@aliu39 aliu39 requested a review from cmanallen August 8, 2025 17:29
@aliu39
Copy link
Member Author

aliu39 commented Aug 8, 2025

The shared util was removed because now we want to migrate to the existing make_signed_seer_api_request with connection pooling. This will be done separately and is being tracked on linear

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

@aliu39 aliu39 merged commit 8aa73f0 into master Aug 8, 2025
64 checks passed
@aliu39 aliu39 deleted the aliu/del-summaries branch August 8, 2025 18:21
andrewshie-sentry pushed a commit that referenced this pull request Aug 12, 2025
Part of [REPLAY-538: Delete async summaries when replay is
deleted](https://linear.app/getsentry/issue/REPLAY-538/delete-async-summaries-when-replay-is-deleted).
Sends a seer request to delete summaries when a replay is deleted from
bulk delete or replay details endpoints. Seer deletes were not added to
the delete_replays script.

---------

Co-authored-by: getsantry[bot] <66042841+getsantry[bot]@users.noreply.github.com>
@github-actions github-actions bot locked and limited conversation to collaborators Aug 24, 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.

3 participants