-
Notifications
You must be signed in to change notification settings - Fork 28
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
feat: add history, fix percent_diff rounding and flake aggregate time #857
Conversation
joseph-sentry
commented
Oct 4, 2024
- add history to TestResults, TestResultsAggregate and FlakeAggregate GQL models
- fix percent_diff function rounding to round up to 5 digits
- fix flake aggregate time bound checking to be accurate
- add history to TestResults, TestResultsAggregate and FlakeAggregate GQL models - fix percent_diff function rounding to round up to 5 digits - fix flake aggregate time bound checking to be accurate
Codecov ReportAttention: Patch coverage is
📢 Thoughts on this report? Let us know! |
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found.
Additional details and impacted files@@ Coverage Diff @@
## main #857 +/- ##
==========================================
- Coverage 96.31% 96.29% -0.02%
==========================================
Files 818 818
Lines 18971 18985 +14
==========================================
+ Hits 18271 18282 +11
- Misses 700 703 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
❌ 1 Tests Failed:
View the top 1 failed tests by shortest run time
To view individual test run time comparison to the main branch, go to the Test Analytics Dashboard |
Test Failures Detected: Due to failing tests, we cannot provide coverage reports at this time. ❌ Failed Test Results:Completed 2387 tests with View the full list of failed testspytest
|
return await sync_to_async(generate_test_results_aggregates)( | ||
repoid=repository.repoid | ||
repoid=repository.repoid, history=history | ||
) | ||
|
||
|
||
@repository_bindable.field("flakeAggregates") | ||
@convert_kwargs_to_snake_case |
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.
we actually don't need the @convert_kwargs decorator anymore due to
codecov-api/graphql_api/schema.py
Line 7 in 9aa6458
schema = make_executable_schema(types, *bindables, convert_names_case=True) |
@@ -199,14 +199,14 @@ def percent_diff( | |||
) -> int | float | None: | |||
if past_value == 0: | |||
return None | |||
return (current_value - past_value) / past_value * 100 | |||
return round((current_value - past_value) / past_value * 100, 5) |
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.
Great change
Q(end_date__date__lte=until.date()) | ||
& Q(end_date__date__gt=since.date()) | ||
) | ||
Q(start_date__date__lte=until.date()) |
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.
start date < until date but end date > since date?
Could you remind me again what start and end mean in this context?
I'd figure we'd want start > until and end < since but I could just be messing with my head