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

Reduce db queries coming from health endpoint #311

Merged
merged 1 commit into from
Dec 18, 2023

Conversation

scott-codecov
Copy link
Contributor

Purpose/Motivation

Our number 1 query by volume is our own health check endpoint

What does this PR do?

  • Cache the result of the version query for the lifetime of the process.
  • Perform a check on the db connection state so that the health endpoint returns 500 when the db is down.

@codecov-staging
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

Copy link

Codecov Report

Merging #311 (cf95d9d) into main (67398dc) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #311   +/-   ##
=======================================
  Coverage   95.95%   95.95%           
=======================================
  Files         611      611           
  Lines       15722    15729    +7     
=======================================
+ Hits        15086    15093    +7     
  Misses        636      636           
Flag Coverage Δ
unit 95.95% <100.00%> (+<0.01%) ⬆️
unit-latest-uploader 95.95% <100.00%> (+<0.01%) ⬆️

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

Files Coverage Δ
codecov/views.py 100.00% <100.00%> (ø)

Impacted file tree graph

@codecov-qa
Copy link

codecov-qa bot commented Dec 18, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (67398dc) 95.95% compared to head (cf95d9d) 95.95%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #311   +/-   ##
=======================================
  Coverage   95.95%   95.95%           
=======================================
  Files         611      611           
  Lines       15722    15729    +7     
=======================================
+ Hits        15086    15093    +7     
  Misses        636      636           
Flag Coverage Δ
unit 95.95% <100.00%> (+<0.01%) ⬆️
unit-latest-uploader 95.95% <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.

@scott-codecov scott-codecov merged commit 614bc00 into main Dec 18, 2023
18 of 19 checks passed
@scott-codecov scott-codecov deleted the scott/health-query branch December 18, 2023 16:23
scott-codecov added a commit that referenced this pull request Dec 21, 2023
* main:
  feat: tokenless auth (part II) (#308)
  feat: tokenless auth (part I) (#304)
  fix: stop returning 400 code when user installs github app (#314)
  Always send to mkto (#313)
  feat: Bundle analysis upload endpoint (#299)
  Reduce db queries coming from health endpoint (#311)
scott-codecov added a commit that referenced this pull request Dec 21, 2023
* main:
  feat: tokenless auth (part II) (#308)
  feat: tokenless auth (part I) (#304)
  fix: stop returning 400 code when user installs github app (#314)
  Always send to mkto (#313)
  feat: Bundle analysis upload endpoint (#299)
  Reduce db queries coming from health endpoint (#311)
scott-codecov added a commit that referenced this pull request Dec 21, 2023
* main:
  feat: tokenless auth (part II) (#308)
  feat: tokenless auth (part I) (#304)
  fix: stop returning 400 code when user installs github app (#314)
  Always send to mkto (#313)
  feat: Bundle analysis upload endpoint (#299)
  Reduce db queries coming from health endpoint (#311)
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