-
Notifications
You must be signed in to change notification settings - Fork 881
[Decision] Standardize auto start crontab format #1429
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
Comments
@ammario FWIW, the reason behind templating the crontab is that we explicitly do not allow schedules that specify either day-of-month or month, as we expect schedules to be applicable weekly. |
Haha, well is there a technical reason for the restriction or is it that we consider it a very-unlikely use case? |
I really can't think of any technical reason against -- just that someone could configure a workspace to stay running for one leap year. |
Haha, I think we give them the full power of cron. It would be odd for them to start a workspace every leap year, but it's less cognitive overhead for them to use a familiar format. I could see why one would want a monthly auto-stop. It's like a last resort measure to save costs. |
Please add your planning poker estimate with ZenHub @johnstcn |
For the moment we are going to maintain the current restrictions around crontab format as unlocking month and day-of-month options causes more complexity down the line. |
Based on this comment, I'm going to close this as complete. I'll add We are going with
|
Hold up one sec. There is also a timezone field in And, is TTL bounded at all? Obviously if it's above 24h bugs ensue. Why use TTL instead of a fixed "Auto Stop" schedule? Does TTL apply if the user manually started the workspace? |
(EDIT: formatting)
Correct. This defaults to UTC. Users can specify a timezone.
It can be unset, and if set, we have not agreed on a set upper bound (apart from ~290 days which is the upper bound of the underlying data representation).
Can you please enumerate some of the possible bugs you anticipate?
For the following reasons:
Autostop, if set, would apply if the user manually started the workspace, so TTL, if set, would also apply in this case. |
Cool, I think the TTL is the right approach. I see no "bugs" exactly, just behavior that isn't clear to me at first glance. For example, if the TTL was set to 48 hours but the Auto Start starts the workspace start every 24 hours, would the workspace still turn off every 48 hours, or would each Auto Start reset the TTL timer? |
The only valid transition from a running workspace is to a stopped state, and vice-versa for a stopped state. |
If the TTL is an integer multiple of 24, then it could potentially stop the workspace right before it's started or stop the workspace right after it's started. To me this seems like behavior becomes more undefined as TTL approaches a 24 hour multiple. We don't have to solve this issue now, I'm just making sure I understand the algorithm. |
We measure TTL from the |
Ok... All makes sense to me. |
Thanks @ammario for double-checking and making sure we have all our bases covered! |
Thanks all, this was a fun data-centric problem to sort out ๐ฎ ๐ @ammario @johnstcn and support from @spikecurtis and @ketang Of course I'm missing various folx that helped along the way and reviewed the RFC too! |
The standard crontab format is already well documented throughout the internet, and something most DevOps people (our ideal configurer) will be familiar with. If we want to help them a little, we could include a link to crontab.guru.
This is in the spirit of invent as little as possible and as a last resort.
Originally posted by @ammario in #813 (comment)
The text was updated successfully, but these errors were encountered: