-
Notifications
You must be signed in to change notification settings - Fork 13.9k
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
Validate start/end when scheduling queries #7508
Conversation
Codecov Report
@@ Coverage Diff @@
## lyft-release-sp8 #7508 +/- ##
===================================================
- Coverage 65.27% 65.2% -0.08%
===================================================
Files 435 435
Lines 21389 21414 +25
Branches 2357 2361 +4
===================================================
+ Hits 13961 13962 +1
- Misses 7308 7332 +24
Partials 120 120
Continue to review full report at Codecov.
|
docs/installation.rst
Outdated
'title': 'Start date', | ||
# date-time is parsed using the Sugar library, see |
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 thought we already had some logic or a library that handles relative dates. I am a little iffy about using this library because it looks like it's maintained by one developer and the last version was 5 months ago so I am not sure how often this library is maintained.
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.
@khtruong we use moment.js
, but it can't parse relative dates like these, which is what we really want.
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.
Still a little iffy about using the Sugar library but if you felt that it was the best that suits your needs, I trust ya.
TBH, I don't think the time-of-last update is a good factor for determining if we should use a library. Some libraries are small, do one thing, and do it well, and no longer need to be updated at some point. But Chrono, on the other hand, does only one thing (date parsing), and only depends on |
* Validate start/end when scheduling queries * Use chrono instead of Sugar
CATEGORY
Choose one
SUMMARY
This PR adds validation to start and end dates when scheduling queries in SQL Lab, ensuring that the end date doesn't come before the start date.
It also initializes the form with defaults. Ideally we want these to be relative dates, so I used the Sugar library to parse human readable dates. For example, with this config:
We get:
TEST PLAN
Tested locally:
ADDITIONAL INFORMATION
REVIEWERS
@DiggidyDave @khtruong @datability-io