Skip to content

taking pks from filter#769

Merged
jason-ford-codecov merged 2 commits intomainfrom
feature/delete-users
Mar 13, 2026
Merged

taking pks from filter#769
jason-ford-codecov merged 2 commits intomainfrom
feature/delete-users

Conversation

@jason-ford-codecov
Copy link
Copy Markdown
Contributor

@jason-ford-codecov jason-ford-codecov commented Mar 13, 2026

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. In 2022 this entity acquired Codecov and as result Sentry is going to need some rights from me in order to utilize my contributions in this PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.


Note

Medium Risk
Alters cleanup deletion query construction for ReportSession, which could impact which rows are deleted if the ID materialization/chunking behavior differs from the prior FK-based filters. Main risk is around large-delete performance/correctness on reports_upload.

Overview
Improves cleanup deletion performance for ReportSession (reports_upload) by rewriting relation-graph querysets from FK-based __in filters to PK-based pk__in filters when the parent IDs have been materialized, aiming to force index scans instead of sequential scans.

Adds a regression test to assert build_relation_graph produces ReportSession delete querysets that filter on the primary key.

Written by Cursor Bugbot for commit 0423209. This will update automatically on new commits. Configure here.

@sentry
Copy link
Copy Markdown
Contributor

sentry bot commented Mar 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.26%. Comparing base (dcdfd9c) to head (0423209).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #769   +/-   ##
=======================================
  Coverage   92.26%   92.26%           
=======================================
  Files        1304     1304           
  Lines       47924    47927    +3     
  Branches     1628     1628           
=======================================
+ Hits        44219    44222    +3     
  Misses       3396     3396           
  Partials      309      309           
Flag Coverage Δ
workerintegration 58.56% <33.33%> (-0.01%) ⬇️
workerunit 90.39% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@codecov-notifications
Copy link
Copy Markdown

codecov-notifications bot commented Mar 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@jason-ford-codecov jason-ford-codecov added this pull request to the merge queue Mar 13, 2026
Merged via the queue into main with commit 721aa64 Mar 13, 2026
40 checks passed
@jason-ford-codecov jason-ford-codecov deleted the feature/delete-users branch March 13, 2026 16:40
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.

2 participants