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

Update flaky shadow mode #677

Merged
merged 3 commits into from
Sep 3, 2024
Merged

Conversation

joseph-sentry
Copy link
Contributor

This PR does 2 things:

  • makes it so the flaky shadow mode feature flag also enables the read path for flake detection, meaning when that feature flag resolves to true users will also get notified of any flaky tests that they fail on in their PRs
  • change the behaviour of sync pulls to avoid calling the process flakes task when a repo isn't uploading test results

@joseph-sentry joseph-sentry requested a review from a team September 3, 2024 14:11
@codecov-notifications
Copy link

codecov-notifications bot commented Sep 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #677   +/-   ##
=======================================
  Coverage   98.07%   98.07%           
=======================================
  Files         434      434           
  Lines       36638    36721   +83     
=======================================
+ Hits        35932    36015   +83     
  Misses        706      706           
Flag Coverage Δ
integration 98.07% <100.00%> (+<0.01%) ⬆️
latest-uploader-overall 98.07% <100.00%> (+<0.01%) ⬆️
unit 98.07% <100.00%> (+<0.01%) ⬆️

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

Components Coverage Δ
NonTestCode 95.96% <100.00%> (+<0.01%) ⬆️
OutsideTasks 98.07% <100.00%> (+<0.01%) ⬆️
Files Coverage Δ
database/tests/factories/reports.py 100.00% <100.00%> (ø)
services/test_results.py 90.10% <ø> (ø)
tasks/sync_pull.py 94.14% <100.00%> (+0.03%) ⬆️
tasks/tests/unit/test_sync_pull.py 100.00% <100.00%> (ø)
tasks/tests/unit/test_test_results_finisher.py 100.00% <100.00%> (ø)

... and 7 files with indirect coverage changes

@codecov-qa
Copy link

codecov-qa bot commented Sep 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.07%. Comparing base (8e3bfad) to head (4e2ba9b).
Report is 3 commits behind head on main.

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #677   +/-   ##
=======================================
  Coverage   98.07%   98.07%           
=======================================
  Files         434      434           
  Lines       36638    36721   +83     
=======================================
+ Hits        35932    36015   +83     
  Misses        706      706           
Flag Coverage Δ
integration 98.07% <100.00%> (+<0.01%) ⬆️
latest-uploader-overall 98.07% <100.00%> (+<0.01%) ⬆️
unit 98.07% <100.00%> (+<0.01%) ⬆️

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

Components Coverage Δ
NonTestCode 95.96% <100.00%> (+<0.01%) ⬆️
OutsideTasks 98.07% <100.00%> (+<0.01%) ⬆️
Files with missing lines Coverage Δ
database/tests/factories/reports.py 100.00% <100.00%> (ø)
services/test_results.py 90.10% <ø> (ø)
tasks/sync_pull.py 94.14% <100.00%> (+0.03%) ⬆️
tasks/tests/unit/test_sync_pull.py 100.00% <100.00%> (ø)
tasks/tests/unit/test_test_results_finisher.py 100.00% <100.00%> (ø)

... and 7 files with indirect coverage changes

Copy link

codecov-public-qa bot commented Sep 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.07%. Comparing base (8e3bfad) to head (4e2ba9b).
Report is 2 commits behind head on main.

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #677   +/-   ##
=======================================
  Coverage   98.07%   98.07%           
=======================================
  Files         434      434           
  Lines       36638    36721   +83     
=======================================
+ Hits        35932    36015   +83     
  Misses        706      706           
Flag Coverage Δ
integration 98.07% <100.00%> (+<0.01%) ⬆️
latest-uploader-overall 98.07% <100.00%> (+<0.01%) ⬆️
unit 98.07% <100.00%> (+<0.01%) ⬆️

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

Components Coverage Δ
NonTestCode 95.96% <100.00%> (+<0.01%) ⬆️
OutsideTasks 98.07% <100.00%> (+<0.01%) ⬆️
Files Coverage Δ
database/tests/factories/reports.py 100.00% <100.00%> (ø)
services/test_results.py 90.10% <ø> (ø)
tasks/sync_pull.py 94.14% <100.00%> (+0.03%) ⬆️
tasks/tests/unit/test_sync_pull.py 100.00% <100.00%> (ø)
tasks/tests/unit/test_test_results_finisher.py 100.00% <100.00%> (ø)

... and 7 files with indirect coverage changes

Copy link

codecov bot commented Sep 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.13%. Comparing base (8e3bfad) to head (4e2ba9b).
Report is 3 commits behind head on main.

Changes have been made to critical files, which contain lines commonly executed in production. Learn more

✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #677      +/-   ##
==========================================
+ Coverage   98.11%   98.13%   +0.01%     
==========================================
  Files         474      474              
  Lines       37964    38428     +464     
==========================================
+ Hits        37250    37711     +461     
- Misses        714      717       +3     
Flag Coverage Δ
integration 98.07% <100.00%> (+<0.01%) ⬆️
latest-uploader-overall 98.07% <100.00%> (+<0.01%) ⬆️
unit 98.07% <100.00%> (+<0.01%) ⬆️

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

Components Coverage Δ
NonTestCode 96.10% <100.00%> (+0.03%) ⬆️
OutsideTasks 98.07% <100.00%> (+<0.01%) ⬆️
Files with missing lines Coverage Δ
database/tests/factories/reports.py 100.00% <100.00%> (ø)
services/test_results.py 90.10% <ø> (ø)
tasks/sync_pull.py 94.17% <100.00%> (+0.03%) ⬆️
tasks/tests/unit/test_sync_pull.py 100.00% <100.00%> (ø)
tasks/tests/unit/test_test_results_finisher.py 100.00% <100.00%> (ø)

... and 7 files with indirect coverage changes

This change has been scanned for critical changes. Learn more

return (
FLAKY_TEST_DETECTION.check_value(identifier=repoid, default=False)
and read_yaml_field(commit_yaml, ("test_analytics", "flake_detection"), False)
or FLAKY_SHADOW_MODE.check_value(identifier=repoid, default=False)
Copy link
Contributor

@michelletran-codecov michelletran-codecov Sep 3, 2024

Choose a reason for hiding this comment

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

If there's some problem where we want to turn off displaying the results to users, then which flag would we want to flip?

Copy link
Contributor

Choose a reason for hiding this comment

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

Turning off FLAKY_SHADOW_MODE would also disable writing. So, I think we might want another flag to just disable the reads.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i updated the changes such that FLAKY_SHADOW_MODE retains it's current functionality on the write path and we're going to use FLAKY_DETECTION to toggle the beta, so we can separately disable the read path without affecting the write path

we should write if:
FLAKY_SHADOW_MODE or FLAKE_DETECTION feature flags are enabled
AND the user has not disabled flake detection via the config

we should read if:
FLAKE_DETECTION feature flag is enabled
AND the user has not disabled flake detection via the config
@joseph-sentry joseph-sentry added this pull request to the merge queue Sep 3, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Sep 3, 2024
@joseph-sentry joseph-sentry added this pull request to the merge queue Sep 3, 2024
Merged via the queue into main with commit 5bd9181 Sep 3, 2024
26 of 27 checks passed
@joseph-sentry joseph-sentry deleted the joseph/update-flaky-shadow-mode branch September 3, 2024 17:30
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