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

Test analytics seats checking #623

Merged
merged 6 commits into from
Aug 28, 2024
Merged

Conversation

joseph-sentry
Copy link
Contributor

Depends on: #622
Fixes: codecov/engineering-team#2264

we want to check if a pr author's seat needs to be activated when
we're notifying test results

also refactors some BaseNotifier stuff so the seat checking is easier

This function will determine whether the PR author needs to have
their seat activation given an EnrichedPull object.

This function is being added because we want to add seat activation
checking for bundle analysis and test analytics.
I want to be able to optionally pass the pull and repo_service to the
classes extending BaseNotifier during construction and I also want the
notifiers to not run the functions to get the pull and repo_service
if they already exist on the object.
we want to check if a pr author's seat needs to be activated when
we're notifying test results
@codecov-notifications
Copy link

codecov-notifications bot commented Aug 14, 2024

Codecov Report

Attention: Patch coverage is 92.14286% with 11 lines in your changes missing coverage. Please review.

✅ All tests successful. No failed tests found.

Files Patch % Lines
tasks/test_results_finisher.py 79.31% 6 Missing ⚠️
services/test_results.py 81.48% 5 Missing ⚠️

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #623      +/-   ##
==========================================
- Coverage   98.11%   98.08%   -0.04%     
==========================================
  Files         437      437              
  Lines       36727    36826      +99     
==========================================
+ Hits        36034    36120      +86     
- Misses        693      706      +13     
Flag Coverage Δ
integration 98.08% <92.14%> (-0.04%) ⬇️
latest-uploader-overall 98.08% <92.14%> (-0.04%) ⬇️
unit 98.08% <92.14%> (-0.04%) ⬇️

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

Components Coverage Δ
NonTestCode 95.97% <86.41%> (-0.07%) ⬇️
OutsideTasks 98.06% <93.50%> (-0.03%) ⬇️
Files Coverage Δ
helpers/notifier.py 98.14% <100.00%> (+0.47%) ⬆️
services/tests/test_test_results.py 100.00% <100.00%> (ø)
tasks/notify_error.py 100.00% <100.00%> (ø)
tasks/tests/unit/test_notify_error_task.py 100.00% <100.00%> (ø)
tasks/tests/unit/test_test_results_finisher.py 100.00% <100.00%> (ø)
services/test_results.py 90.10% <81.48%> (-1.71%) ⬇️
tasks/test_results_finisher.py 94.08% <79.31%> (-3.09%) ⬇️

... and 1 file with indirect coverage changes

@codecov-qa
Copy link

codecov-qa bot commented Aug 14, 2024

Codecov Report

Attention: Patch coverage is 92.14286% with 11 lines in your changes missing coverage. Please review.

Project coverage is 98.08%. Comparing base (2faadcf) to head (4c0eb7a).
Report is 4 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
tasks/test_results_finisher.py 79.31% 6 Missing ⚠️
services/test_results.py 81.48% 5 Missing ⚠️

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #623      +/-   ##
==========================================
- Coverage   98.11%   98.08%   -0.04%     
==========================================
  Files         437      437              
  Lines       36727    36826      +99     
==========================================
+ Hits        36034    36120      +86     
- Misses        693      706      +13     
Flag Coverage Δ
integration 98.08% <92.14%> (-0.04%) ⬇️
latest-uploader-overall 98.08% <92.14%> (-0.04%) ⬇️
unit 98.08% <92.14%> (-0.04%) ⬇️

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

Components Coverage Δ
NonTestCode 95.97% <86.41%> (-0.07%) ⬇️
OutsideTasks 98.06% <93.50%> (-0.03%) ⬇️
Files with missing lines Coverage Δ
helpers/notifier.py 98.14% <100.00%> (+0.47%) ⬆️
services/tests/test_test_results.py 100.00% <100.00%> (ø)
tasks/notify_error.py 100.00% <100.00%> (ø)
tasks/tests/unit/test_notify_error_task.py 100.00% <100.00%> (ø)
tasks/tests/unit/test_test_results_finisher.py 100.00% <100.00%> (ø)
services/test_results.py 90.10% <81.48%> (-1.71%) ⬇️
tasks/test_results_finisher.py 94.08% <79.31%> (-3.09%) ⬇️

... and 1 file with indirect coverage changes

Copy link

codecov-public-qa bot commented Aug 14, 2024

Codecov Report

Attention: Patch coverage is 92.14286% with 11 lines in your changes missing coverage. Please review.

Project coverage is 98.08%. Comparing base (2faadcf) to head (4c0eb7a).
Report is 2 commits behind head on main.

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #623      +/-   ##
==========================================
- Coverage   98.11%   98.08%   -0.04%     
==========================================
  Files         437      437              
  Lines       36727    36826      +99     
==========================================
+ Hits        36034    36120      +86     
- Misses        693      706      +13     
Flag Coverage Δ
integration 98.08% <92.14%> (-0.04%) ⬇️
latest-uploader-overall 98.08% <92.14%> (-0.04%) ⬇️
unit 98.08% <92.14%> (-0.04%) ⬇️

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

Components Coverage Δ
NonTestCode 95.97% <86.41%> (-0.07%) ⬇️
OutsideTasks 98.06% <93.50%> (-0.03%) ⬇️
Files Coverage Δ
helpers/notifier.py 98.14% <100.00%> (+0.47%) ⬆️
services/tests/test_test_results.py 100.00% <100.00%> (ø)
tasks/notify_error.py 100.00% <100.00%> (ø)
tasks/tests/unit/test_notify_error_task.py 100.00% <100.00%> (ø)
tasks/tests/unit/test_test_results_finisher.py 100.00% <100.00%> (ø)
services/test_results.py 90.10% <81.48%> (-1.71%) ⬇️
tasks/test_results_finisher.py 94.08% <79.31%> (-3.09%) ⬇️

... and 1 file with indirect coverage changes

Copy link

codecov bot commented Aug 14, 2024

Codecov Report

Attention: Patch coverage is 92.14286% with 11 lines in your changes missing coverage. Please review.

Project coverage is 98.13%. Comparing base (2faadcf) to head (4c0eb7a).
Report is 4 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
tasks/test_results_finisher.py 79.31% 6 Missing ⚠️
services/test_results.py 81.48% 5 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #623      +/-   ##
==========================================
- Coverage   98.15%   98.13%   -0.03%     
==========================================
  Files         476      476              
  Lines       38048    38158     +110     
==========================================
+ Hits        37347    37445      +98     
- Misses        701      713      +12     
Flag Coverage Δ
integration 98.08% <92.14%> (-0.04%) ⬇️
latest-uploader-overall 98.08% <92.14%> (-0.04%) ⬇️
unit 98.08% <92.14%> (-0.04%) ⬇️

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

Components Coverage Δ
NonTestCode 96.08% <86.41%> (-0.06%) ⬇️
OutsideTasks 98.06% <93.50%> (-0.03%) ⬇️
Files with missing lines Coverage Δ
helpers/notifier.py 98.14% <100.00%> (+0.47%) ⬆️
services/tests/test_test_results.py 100.00% <100.00%> (ø)
tasks/notify_error.py 100.00% <100.00%> (ø)
tasks/tests/unit/test_notify_error_task.py 100.00% <100.00%> (ø)
tasks/tests/unit/test_test_results_finisher.py 100.00% <100.00%> (ø)
services/test_results.py 90.10% <81.48%> (-1.71%) ⬇️
tasks/test_results_finisher.py 94.67% <79.31%> (-3.20%) ⬇️

... and 1 file with indirect coverage changes

This change has been scanned for critical changes. Learn more

@joseph-sentry joseph-sentry marked this pull request as draft August 15, 2024 13:20
@joseph-sentry joseph-sentry requested a review from a team August 27, 2024 14:59
@joseph-sentry joseph-sentry marked this pull request as ready for review August 27, 2024 14:59
@joseph-sentry joseph-sentry added this pull request to the merge queue Aug 28, 2024
Merged via the queue into main with commit 612dd94 Aug 28, 2024
13 of 26 checks passed
@joseph-sentry joseph-sentry deleted the joseph/test-analytics-seats branch August 28, 2024 16:54
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.

{GA Launch Prep} Add seat enforce logic to TestResultFinisher
2 participants