RFC 5545 recur schedule support#931
RFC 5545 recur schedule support#931grepsr wants to merge 506 commits intoHubSpot:masterfrom grepsr:rfc5545_recur_schedule
Conversation
| import com.hubspot.singularity.WebExceptions; | ||
| import com.hubspot.singularity.config.SingularityConfiguration; | ||
| import com.hubspot.singularity.data.history.DeployHistoryHelper; | ||
| import org.dmfs.rfc5545.recur.RecurrenceRule; |
There was a problem hiding this comment.
can you sort these imports? if you're using Eclipse or IntelliJ, we have a formatter config here: https://github.com/HubSpot/Singularity/blob/master/eclipse/singularity_eclipse_formatter.xml
There was a problem hiding this comment.
Wow that re-formatted everything, perhaps I should just re-format the sections I added?
There was a problem hiding this comment.
Yeah, just your sections sounds good. Thanks!
|
Not sure why the travis check keeps failing, it compiles file on my machine. Any idea how to go from here? |
|
@grepsr the Travis output makes it look like there's a findbugs issue. How are you building it locally? Try running |
|
Thanks, I'm using mvn clean package I'll try that. |
| LOG.warn(msg); | ||
| exceptionNotifier.notify(msg, ImmutableMap.of("taskId", taskId.toString())); | ||
| return Optional.absent(); | ||
| } |
There was a problem hiding this comment.
could we refactor all this RFC5545 logic (lines 128-166) into its own class? it'd be nice to expose an interface similar to CronExpression.getNextValidTimeAfter() below
There was a problem hiding this comment.
I actually thought about doing that too. I'll take care of it and commit
I'm not a Java guy, can you tell me where I should place the new RFC5545Schedule.java file into the folder structure? Should I put it inside com.hubspot.singularity folder inside the SingularityService module?
There was a problem hiding this comment.
No worries -- I'd suggest putting it under com.hubspot.singularity.helpers
|
I just refactored the code and moved everything into a helper class, much cleaner now. |
|
This finally worked on JDK8 on Travis, but still fails on JDK7 - not sure I understand why, any thoughts? Thanks |
|
Just wanted to check back on this and see if I could get any help getting this to work on JDK7? |
|
I just re-comitted the code without any change and it builds in both JDK7 and JDK8! I guess it was a Travis issue. Where do we go from here? |
|
Awesome! Taking another look at this today. We'll need to add some unit tests since this change affects the operation of the scheduler. |
|
Great, please let me know if you need any help. Also, I'm using this on production for the past 10 days and this is working great! I have about 200+ tasks scheduled and it schedules everything right on time. |
|
A note about this feature. Lately I've realised that the tasks are usually overdue by 5 minutes before running. I have a feeling its because of some default setting that triggers the check Is there some global setting that can help here? Perhaps checkNewTasksEverySeconds? |
|
So there are two things to check here (second one is most likely the issue since you mentioned things are overdue):
Hope that helps |
… metadata with a user
…failed; Healthcheck failure message will mention user app if connection refused; Healthcheck failure message will say 'task killed' instead of 'task failed'
|
Hi there, we've fixed the merge conflicts for this, and pushed to latest branch. |
|
closing in favor of #1071 |
To get over cron/quartzCron limitations for my own projects, I tried to add RFC5545 support.
https://tools.ietf.org/html/rfc5545#section-3.3.10
I've been running this on my testing server with great success.
The scheduling is much more easy to configure and dynamic with RFC5545 (things like start date, end date, odd schedules like every 37 hours or every 93 days works with this)
Have not had the time to work on the UI to make the new ScheduleType appear; but once this is reviewed, adding that would be trivial.