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: better handle missing static analysis info #141

Merged
merged 1 commit into from
Oct 6, 2023

Conversation

giovanni-guidini
Copy link
Contributor

Fix codecov/engineering-team#650

Recently we made changes to static analysis process of the CLI so it doesn't fails completely
if there are issues analysing a file or uploading it to GCS.

I think this inadvertedly broke the expectation of label analysis that all files in the static analysis
are uploaded and ready to be used. Or some other misterious bug is causing some snapshots to be missing

This is causing issues that the label analysis is not processing correctly. So we are now guarding
against missing snapshots in HEAD or BASE.

Sadly for ats, it only as good as the data it has. And being conservative (and safe) is important to us.
So if we can't make an educated guess about a change, the procedure so far is to just run everything.
That's the fallback, assume the entire file is compromised and needs to be tested again

closes codecov/engineering-team#650

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.

Fix codecov/engineering-team#650

Recently we made changes to static analysis process of the CLI so it doesn't fails completely
if there are issues analysing a file or uploading it to GCS.

I think this inadvertedly broke the expectation of label analysis that all files in the static analysis
are uploaded and ready to be used. Or some other misterious bug is causing some snapshots to be missing

This is causing issues that the label analysis is not processing correctly. So we are now guarding
against missing snapshots in HEAD or BASE.

Sadly for ats, it only as good as the data it has. And being conservative (and safe) is important to us.
So if we can't make an educated guess about a change, the procedure so far is to just run everything.
That's the fallback, assume the entire file is compromised and needs to be tested again

closes codecov/engineering-team#650
@codecov-qa
Copy link

codecov-qa bot commented Oct 5, 2023

Codecov Report

Merging #141 (7a70b5a) into main (dd4d0eb) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #141   +/-   ##
=======================================
  Coverage   93.30%   93.30%           
=======================================
  Files         347      347           
  Lines       27091    27113   +22     
=======================================
+ Hits        25276    25298   +22     
  Misses       1815     1815           
Flag Coverage Δ
integration 93.30% <100.00%> (+<0.01%) ⬆️
latest-uploader-overall 93.30% <100.00%> (+<0.01%) ⬆️
unit 93.30% <100.00%> (+<0.01%) ⬆️

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

Components Coverage Δ
NonTestCode 94.01% <100.00%> (+<0.01%) ⬆️
OutsideTasks 96.74% <100.00%> (+<0.01%) ⬆️
Files Coverage Δ
services/static_analysis/__init__.py 97.33% <100.00%> (+0.11%) ⬆️
...ysis/tests/unit/test_static_analysis_comparison.py 100.00% <100.00%> (ø)

@codecov-public-qa
Copy link

codecov-public-qa bot commented Oct 5, 2023

Codecov Report

Merging #141 (7a70b5a) into main (dd4d0eb) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #141   +/-   ##
=======================================
  Coverage   93.30%   93.30%           
=======================================
  Files         347      347           
  Lines       27091    27113   +22     
=======================================
+ Hits        25276    25298   +22     
  Misses       1815     1815           
Flag Coverage Δ
integration 93.30% <100.00%> (+<0.01%) ⬆️
latest-uploader-overall 93.30% <100.00%> (+<0.01%) ⬆️
unit 93.30% <100.00%> (+<0.01%) ⬆️

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

Components Coverage Δ
NonTestCode 94.01% <100.00%> (+<0.01%) ⬆️
OutsideTasks 96.74% <100.00%> (+<0.01%) ⬆️
Files Coverage Δ
services/static_analysis/__init__.py 97.33% <100.00%> (+0.11%) ⬆️
...ysis/tests/unit/test_static_analysis_comparison.py 100.00% <100.00%> (ø)

@codecov
Copy link

codecov bot commented Oct 5, 2023

Codecov Report

Merging #141 (7a70b5a) into main (dd4d0eb) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #141   +/-   ##
=======================================
  Coverage   98.46%   98.46%           
=======================================
  Files         371      371           
  Lines       27500    27522   +22     
=======================================
+ Hits        27078    27100   +22     
  Misses        422      422           
Flag Coverage Δ
integration 98.43% <100.00%> (+<0.01%) ⬆️
latest-uploader-overall 98.43% <100.00%> (+<0.01%) ⬆️
unit 98.43% <100.00%> (+<0.01%) ⬆️

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

Components Coverage Δ
NonTestCode 97.07% <100.00%> (+<0.01%) ⬆️
OutsideTasks 98.23% <100.00%> (+<0.01%) ⬆️
Files Coverage Δ
services/static_analysis/__init__.py 97.33% <100.00%> (+0.11%) ⬆️
...ysis/tests/unit/test_static_analysis_comparison.py 100.00% <100.00%> (ø)

This change has been scanned for critical changes. Learn more

@giovanni-guidini giovanni-guidini merged commit f18b8e7 into main Oct 6, 2023
30 of 32 checks passed
@giovanni-guidini giovanni-guidini deleted the gio/fix-missing-snapshot branch October 6, 2023 13:24
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.

Fix failed to calculate error - label_analysis task
2 participants