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

Only delete tmp files relating to the right request #419

Merged
merged 6 commits into from
Feb 28, 2024
Merged

Conversation

JerrySentry
Copy link
Contributor

@JerrySentry JerrySentry commented Feb 26, 2024

Purpose/Motivation

Instead of having any request clean up all bundle analysis SQLite files during the teardown step of the request handling, this change will only delete the exact SQLite file that a bundle analysis GQL request has created.

The issue this fixes is that on certain race conditions, a BA request in process (ie created a SQLite file created in /tmp, but haven't finished querying) might be paused for another request, and when the other request is finished it would delete the BA request that's in process. Finally when the context is switched back to the BA request it can no longer query the SQLite DB file because its not there now.

Links to relevant tickets

codecov/engineering-team#1268

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.

@JerrySentry JerrySentry requested a review from a team as a code owner February 26, 2024 21:05
@codecov-staging
Copy link

codecov-staging bot commented Feb 26, 2024

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 Feb 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.95%. Comparing base (5b05170) to head (80f839a).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #419   +/-   ##
=======================================
  Coverage   95.94%   95.95%           
=======================================
  Files         641      641           
  Lines       16954    16964   +10     
=======================================
+ Hits        16267    16277   +10     
  Misses        687      687           
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.

Copy link

codecov-public-qa bot commented Feb 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (5b05170) 95.94% compared to head (80f839a) 95.95%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #419   +/-   ##
=======================================
  Coverage   95.94%   95.95%           
=======================================
  Files         641      641           
  Lines       16954    16964   +10     
=======================================
+ Hits        16267    16277   +10     
  Misses        687      687           
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 Δ
graphql_api/types/commit/commit.py 100.00% <100.00%> (ø)
graphql_api/types/pull/pull.py 100.00% <100.00%> (ø)
graphql_api/views.py 96.20% <100.00%> (-0.10%) ⬇️

Impacted file tree graph

Copy link

codecov bot commented Feb 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.82%. Comparing base (ccd3fee) to head (a301fae).

Additional details and impacted files
@@          Coverage Diff          @@
##            main    #419   +/-   ##
=====================================
  Coverage   95.82   95.82           
=====================================
  Files        757     757           
  Lines      17406   17416   +10     
=====================================
+ Hits       16678   16688   +10     
  Misses       728     728           
Flag Coverage Δ
unit 96.11% <100.00%> (+<0.01%) ⬆️
unit-latest-uploader 96.11% <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.

@JerrySentry JerrySentry merged commit 8461595 into main Feb 28, 2024
17 of 18 checks passed
@JerrySentry JerrySentry deleted the feb_26_1268 branch February 28, 2024 21:27
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