-
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
fix: checkpointlogger: use enum declaration order instead of value order #156
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #156 +/- ##
==========================================
- Coverage 98.43% 98.43% -0.01%
==========================================
Files 348 348
Lines 27375 27401 +26
==========================================
+ Hits 26947 26971 +24
- Misses 428 430 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Codecov Report
@@ Coverage Diff @@
## main #156 +/- ##
==========================================
- Coverage 98.43% 98.43% -0.01%
==========================================
Files 348 348
Lines 27375 27401 +26
==========================================
+ Hits 26947 26971 +24
- Misses 428 430 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Codecov Report
@@ Coverage Diff @@
## main #156 +/- ##
==========================================
- Coverage 98.39% 98.39% -0.01%
==========================================
Files 374 374
Lines 27871 27897 +26
==========================================
+ Hits 27424 27448 +24
- Misses 447 449 +2
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 |
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.
Looks good. I wonder if just using integer enum values would be overall a bit simpler than auto()
and relying on definition order.
@scott-codecov i'm not sure if we can have |
i made a sloppy mistake. i treated
BaseFlow
subclass values as if they were sorted by declaration order, but they're just strings and they're sorted lexicographically. example:PROCESSING_BEGIN
is declared beforeINITIAL_PROCESSING_COMPLETE
, so i wantPROCESSING_BEGIN < INITIAL_PROCESSING_COMPLETE
to be true. but with lexicographic order, "I" is before "P" so it's flipped.Foo._member_names_
remembers the declaration order and we can fix the bug by overriding__eq__()
and friends to make them compare based on declaration order.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.