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

Add a metric to count carryforward_mode=labels usage #812

Merged
merged 1 commit into from
Oct 23, 2024

Conversation

Swatinem
Copy link
Contributor

This introduces a metric to count the various usages of carryforward_mode=labels. It also adds some comments to those places explaining whether the logic might be over- or undercounting the actual real-world usage.

@Swatinem Swatinem requested a review from a team October 23, 2024 10:23
@Swatinem Swatinem self-assigned this Oct 23, 2024
Copy link

codecov bot commented Oct 23, 2024

Codecov Report

Attention: Patch coverage is 88.88889% with 1 line in your changes missing coverage. Please review.

Project coverage is 97.98%. Comparing base (ad3621c) to head (973f0f1).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
services/report/raw_upload_processor.py 80.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #812      +/-   ##
==========================================
- Coverage   97.99%   97.98%   -0.01%     
==========================================
  Files         443      444       +1     
  Lines       36448    36457       +9     
==========================================
+ Hits        35716    35724       +8     
- Misses        732      733       +1     
Flag Coverage Δ
integration 97.98% <88.88%> (-0.01%) ⬇️
unit 97.98% <88.88%> (-0.01%) ⬇️

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

Components Coverage Δ
NonTestCode 95.83% <88.88%> (-0.01%) ⬇️
OutsideTasks 97.96% <85.71%> (-0.01%) ⬇️
Files with missing lines Coverage Δ
services/processing/metrics.py 100.00% <100.00%> (ø)
tasks/upload_finisher.py 97.75% <100.00%> (+0.02%) ⬆️
services/report/raw_upload_processor.py 95.29% <80.00%> (-0.47%) ⬇️

@codecov-notifications
Copy link

codecov-notifications bot commented Oct 23, 2024

Codecov Report

Attention: Patch coverage is 88.88889% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
services/report/raw_upload_processor.py 80.00% 1 Missing ⚠️

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #812      +/-   ##
==========================================
- Coverage   97.99%   97.98%   -0.01%     
==========================================
  Files         443      444       +1     
  Lines       36448    36457       +9     
==========================================
+ Hits        35716    35724       +8     
- Misses        732      733       +1     
Flag Coverage Δ
integration 97.98% <88.88%> (-0.01%) ⬇️
unit 97.98% <88.88%> (-0.01%) ⬇️

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

Components Coverage Δ
NonTestCode 95.83% <88.88%> (-0.01%) ⬇️
OutsideTasks 97.96% <85.71%> (-0.01%) ⬇️
Files with missing lines Coverage Δ
services/processing/metrics.py 100.00% <100.00%> (ø)
tasks/upload_finisher.py 97.75% <100.00%> (+0.02%) ⬆️
services/report/raw_upload_processor.py 95.29% <80.00%> (-0.47%) ⬇️

@codecov-qa
Copy link

codecov-qa bot commented Oct 23, 2024

Codecov Report

Attention: Patch coverage is 88.88889% with 1 line in your changes missing coverage. Please review.

Project coverage is 97.98%. Comparing base (ad3621c) to head (973f0f1).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
services/report/raw_upload_processor.py 80.00% 1 Missing ⚠️

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #812      +/-   ##
==========================================
- Coverage   97.99%   97.98%   -0.01%     
==========================================
  Files         443      444       +1     
  Lines       36448    36457       +9     
==========================================
+ Hits        35716    35724       +8     
- Misses        732      733       +1     
Flag Coverage Δ
integration 97.98% <88.88%> (-0.01%) ⬇️
unit 97.98% <88.88%> (-0.01%) ⬇️

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

Components Coverage Δ
NonTestCode 95.83% <88.88%> (-0.01%) ⬇️
OutsideTasks 97.96% <85.71%> (-0.01%) ⬇️
Files with missing lines Coverage Δ
services/processing/metrics.py 100.00% <100.00%> (ø)
tasks/upload_finisher.py 97.75% <100.00%> (+0.02%) ⬆️
services/report/raw_upload_processor.py 95.29% <80.00%> (-0.47%) ⬇️

Copy link

codecov-public-qa bot commented Oct 23, 2024

Codecov Report

Attention: Patch coverage is 88.88889% with 1 line in your changes missing coverage. Please review.

Project coverage is 97.98%. Comparing base (ad3621c) to head (973f0f1).

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #812      +/-   ##
==========================================
- Coverage   97.99%   97.98%   -0.01%     
==========================================
  Files         443      444       +1     
  Lines       36448    36457       +9     
==========================================
+ Hits        35716    35724       +8     
- Misses        732      733       +1     
Flag Coverage Δ
integration 97.98% <88.88%> (-0.01%) ⬇️
unit 97.98% <88.88%> (-0.01%) ⬇️

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

Components Coverage Δ
NonTestCode 95.83% <88.88%> (-0.01%) ⬇️
OutsideTasks 97.96% <85.71%> (-0.01%) ⬇️
Files Coverage Δ
services/processing/metrics.py 100.00% <100.00%> (ø)
tasks/upload_finisher.py 97.75% <100.00%> (+0.02%) ⬆️
services/report/raw_upload_processor.py 95.29% <80.00%> (-0.47%) ⬇️

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.

Excited to see how this turns out

@@ -401,6 +402,10 @@ def finish_reports_processing(
commit.state = "skipped"

if self.should_clean_labels_index(commit_yaml, processing_results):
# NOTE: according to tracing, the cleanup task is never actually run.
# reasons for that might be that we indeed *never* have any flags
# configured for `carryforward_mode=labels`, or the logic is somehow wrong?
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it might be because no repos use the label index at all
(see here)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

well yes, though the conditional above in UploadFinisher is not looking at that feature flag at all.

This introduces a metric to count the various usages of `carryforward_mode=labels`.
It also adds some comments to those places explaining whether the logic might be over- or undercounting the actual real-world usage.
@Swatinem Swatinem force-pushed the swatinem/labels-metric branch from caf0ab1 to 973f0f1 Compare October 23, 2024 10:58
@Swatinem Swatinem enabled auto-merge October 23, 2024 10:59
@Swatinem Swatinem added this pull request to the merge queue Oct 23, 2024
Merged via the queue into main with commit 8217e96 Oct 23, 2024
24 of 27 checks passed
@Swatinem Swatinem deleted the swatinem/labels-metric branch October 23, 2024 11:12
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