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

Remove refresh_from_db calls from graphs/views.py #354

Merged
merged 1 commit into from
Jan 23, 2024

Conversation

joseph-sentry
Copy link
Contributor

Purpose/Motivation

same issue as before, django uses the primary key to refresh from the db which leads to this query being run:

SELECT branches.branch, branches.repoid, branches.authors, branches.head,
       branches.base, branches.updatestamp
FROM branches
WHERE branches.branch = %s
LIMIT 21

Links to relevant tickets

Sentry issue

What does this PR do?

  • remove refresh_from_db calls

Copy link

sentry-io bot commented Jan 23, 2024

🔍 Existing Issues For Review

Your pull request is modifying functions with the following pre-existing issues:

📄 File: graphs/views.py

Function Unhandled Issue
get_coverage Branch.MultipleObjectsReturned: get() returned more than one Branch -- it returned more than 20! /{service}/{owner_usernam...
Event Count: 145
get_commit Branch.MultipleObjectsReturned: get() returned more than one Branch -- it returned more than 20! /{service}/{owner_username}...
Event Count: 1

Did you find this useful? React with a 👍 or 👎

Signed-off-by: joseph-sentry <joseph.sawaya@sentry.io>
@joseph-sentry joseph-sentry changed the title Joseph/temp branch fix Remove refresh_from_db calls from graphs/views.py Jan 23, 2024
@codecov-staging
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

@codecov-qa
Copy link

codecov-qa bot commented Jan 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (2270abf) 96.03% compared to head (d9377c0) 96.03%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #354      +/-   ##
==========================================
- Coverage   96.03%   96.03%   -0.01%     
==========================================
  Files         626      626              
  Lines       16233    16231       -2     
==========================================
- Hits        15590    15588       -2     
  Misses        643      643              
Flag Coverage Δ
unit 96.03% <100.00%> (-0.01%) ⬇️
unit-latest-uploader 96.03% <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

Codecov Report

Merging #354 (d9377c0) into main (2270abf) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #354      +/-   ##
==========================================
- Coverage   96.03%   96.03%   -0.01%     
==========================================
  Files         626      626              
  Lines       16233    16231       -2     
==========================================
- Hits        15590    15588       -2     
  Misses        643      643              
Flag Coverage Δ
unit 96.03% <100.00%> (-0.01%) ⬇️
unit-latest-uploader 96.03% <100.00%> (-0.01%) ⬇️

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

Files Coverage Δ
graphs/views.py 93.00% <100.00%> (-0.10%) ⬇️

Impacted file tree graph

@joseph-sentry joseph-sentry merged commit 8ef71e7 into main Jan 23, 2024
20 checks passed
@joseph-sentry joseph-sentry deleted the joseph/temp-branch-fix branch January 23, 2024 21:44
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.

None yet

2 participants