Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: only call commit_update task when commit is newly created #804

Merged
merged 2 commits into from
Sep 9, 2024

Conversation

joseph-sentry
Copy link
Contributor

we have to move the get_or_create call in the commits endpoint to the top level function so we can know if a commit object was newly created

we don't want to call the commit update task every time this endpoint is called because it may be the cause of lock contention in the DB for commits

we have to move the get_or_create call in the commits endpoint to the
top level function so we can know if a commit object was newly created

we don't want to call the commit update task every time this endpoint
is called because it may be the cause of lock contention in the DB
for commits
@joseph-sentry joseph-sentry requested a review from a team as a code owner September 6, 2024 15:54
@codecov-notifications
Copy link

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!

Copy link

codecov bot commented Sep 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.16%. Comparing base (29415ce) to head (e72796f).
Report is 15 commits behind head on main.

Changes have been made to critical files, which contain lines commonly executed in production. Learn more

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@               Coverage Diff                @@
##               main       #804        +/-   ##
================================================
+ Coverage   96.14000   96.16000   +0.02000     
================================================
  Files           812        812                
  Lines         18486      18730       +244     
================================================
+ Hits          17773      18011       +238     
- Misses          713        719         +6     
Flag Coverage Δ
unit 92.00% <100.00%> (+0.01%) ⬆️
unit-latest-uploader 92.00% <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.

Copy link
Contributor

@giovanni-guidini giovanni-guidini left a comment

Choose a reason for hiding this comment

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

Is this function in the serializer not used anymore?

If that's the case please remove that too.

@joseph-sentry joseph-sentry added this pull request to the merge queue Sep 9, 2024
Merged via the queue into main with commit 1b37195 Sep 9, 2024
18 of 19 checks passed
@joseph-sentry joseph-sentry deleted the joseph/fix-commits branch September 9, 2024 13:52
giovanni-guidini added a commit that referenced this pull request Sep 10, 2024
Originally I wanted to delete PreProcess task completely, but after reviewing
certain usage patterns I realized the task is necessary (for `empty-upload` and
`static-analysis` for example).

So the alternative is to reduce the amount of times it is called, to only be called
when we effectively create a new report. Similar to #804
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