-
Notifications
You must be signed in to change notification settings - Fork 10
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 Flake models and refactor flake detection #346
Conversation
Codecov ReportAttention: Patch coverage is ✅ All tests successful. No failed tests found @@ Coverage Diff @@
## main #346 +/- ##
=======================================
Coverage 97.64% 97.64%
=======================================
Files 393 393
Lines 32811 32874 +63
=======================================
+ Hits 32038 32100 +62
- Misses 773 774 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found Additional details and impacted files@@ Coverage Diff @@
## main #346 +/- ##
=======================================
Coverage 97.64% 97.64%
=======================================
Files 393 393
Lines 32811 32874 +63
=======================================
+ Hits 32038 32100 +62
- Misses 773 774 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found @@ Coverage Diff @@
## main #346 +/- ##
=======================================
Coverage 97.64% 97.64%
=======================================
Files 393 393
Lines 32811 32874 +63
=======================================
+ Hits 32038 32100 +62
- Misses 773 774 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found Additional details and impacted files@@ Coverage Diff @@
## main #346 +/- ##
=======================================
Coverage 97.65% 97.65%
=======================================
Files 424 424
Lines 33511 33574 +63
=======================================
+ Hits 32726 32788 +62
- Misses 785 786 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
This change has been scanned for critical changes. Learn more |
bc3fe9e
to
535c596
Compare
@@ -77,6 +83,7 @@ def create_test_instance(dbsession, test_id, upload_id, outcome, failure_message | |||
) | |||
dbsession.add(ti) | |||
dbsession.flush() | |||
return ti |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
services/flake_detection.py
Outdated
self.is_curr_flake = False | ||
self.flake_dict.clear() | ||
self.commit_to_outcome.clear() | ||
@cached_property |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's remember that having a class-wide cached property is not a good idea cause the cache is shared among all instances of the class... I think that was the gotcha.
I do think that each of these classes should return a single FlakeSymtomType
so this seems fine. Probably it's what you intended, but just stating it again
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That being said, I don't think we gain anything by having this cached.... in all your implementations it's just a constant being returned. Maybe I'd remove this cached_property, but nit in any case.
FAILED_IN_DEFAULT_BRANCH = "failed_in_default_branch" | ||
CONSECUTIVE_DIFF_OUTCOMES = "consecutive_diff_outcomes" | ||
UNRELATED_MATCHING_FAILURES = "unrelated_matching_failures" | ||
classes that implement this interface are expected to: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[very nit] I think this can be broken up into docstrings in the abstract methods directly... I feel that this could very easily become obsolete and people forget to update it.
Signed-off-by: joseph-sentry <[email protected]>
Signed-off-by: joseph-sentry <[email protected]>
Signed-off-by: joseph-sentry <[email protected]>
Signed-off-by: joseph-sentry <[email protected]>
Signed-off-by: joseph-sentry <[email protected]>
d8351ca
to
0132b4b
Compare
Refactors flake detection to use FlakeDetectionEngine and symptom detectors