-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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: SIP-15 time_range_endpoints not using default option #11998
fix: SIP-15 time_range_endpoints not using default option #11998
Conversation
Codecov Report
@@ Coverage Diff @@
## master #11998 +/- ##
==========================================
- Coverage 66.26% 63.63% -2.63%
==========================================
Files 941 942 +1
Lines 45715 45827 +112
Branches 4395 4400 +5
==========================================
- Hits 30293 29164 -1129
- Misses 15287 16487 +1200
- Partials 135 176 +41
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
@villebro could you have a look? |
Thanks @rubenSastre , I'll take a look as soon as I can! (marking myself as reviewer to not forget) |
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.
Thanks for the PR @rubenSastre and sorry for the long review time. I agree with the changes made here, but would still like to hear @john-bodley chime in before merging.
SIP_15_DEFAULT_TIME_RANGE_ENDPOINTS = ["unknown", "inclusive"] | ||
SIP_15_DEFAULT_TIME_RANGE_ENDPOINTS = ["inclusive", "exclusive"] |
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.
I'm surprised these are not in line with the comment in utils
. I would be interested in hearing @john-bodley's thoughts on this change, as it looks like this is a bug.
@rubenSastre I believe there's a disconnect between you PR description and code change. The existing code (at least in the places you changed) seems correct to me, i.e., we always want to ensure new slices and all slices after the grace period ends adhere to the More specifically, the target (desired) time interval is purposely not configurable (and thus is hard coded). The source intervals may vary by institution and can be defined at the database level or fallback to the configuration file if undefined per here. What is the specific issue you're facing? The disconnect in your two screenshots could be because either:
|
@john-bodley , what I detect is that the database extra value and/or the DEFAULT_TIME_RANGE_ENDPOINT is not working, all the new and the existing charts will be force to be [start, end). This should be the default rule, but we should be able to give the option of setting a different rule for the endpoints. My changes will use the DEFAULT_TIME_RANGE_ENDPOINT as the value to use for the new charts and to popup the alert of updating if having a different while the the grace period is set. |
@rubenSastre per your comment,
This is the intended behavior, i.e., the time range endpoints are not configurable and per SIP-15 ensure that |
@john-bodley ,reading this, so if we don´t want to be an optional configuration has not sense, as what I did is to use the SIP_15_DEFAULT_TIME_RANGE_ENDPOINTS to give this option. By the way then, the extra parameter for database option doesn´t work when a new chart is created, could you have a look? I don´t know which is the best option as some times the chart_id doesn´t exist, at the begining so [start, end) is set on the creation. |
@rubenSastre the |
@john-bodley I feel like a lot of people want [inclusive, inclusive] according to slack community, including me. Are you still concrete with opinion for [inclusive, exclusive)? What is the point of |
SUMMARY
since SIP-15 is enabled, the time_range_endpoints is hardcoded to [start,end), without possibility of taking value set on extra params on database, or on default parameter on conf.py
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
ADDITIONAL INFORMATION