Thanks to visit codestin.com
Credit goes to github.com

Skip to content

TTL >24h has a confusing interaction with auto start #2318

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

Closed
ammario opened this issue Jun 14, 2022 · 10 comments
Closed

TTL >24h has a confusing interaction with auto start #2318

ammario opened this issue Jun 14, 2022 · 10 comments
Labels
api Area: HTTP API stale This issue is like stale bread.

Comments

@ammario
Copy link
Member

ammario commented Jun 14, 2022

As a user, if I set my template TTL to 27h and my auto-start to daily at 9am, my workspace schedule behavior looks like this:

1. Start at Mon 09:00am
2. Stop  at Tue 12:00pm
3. Start at Wed 09:00am
4. Stop  at Thu 12:00pm
etc.

I think we can all agree this is confusing.

Solution Ideas

  • Limit max TTL is 24h across the board
    • Caveat: this restricts the power of TTL when auto-start is unset
    • Variation: only restrict the TTL when auto-start is enabled
  • Reset countdown on each auto-start, so TTLs >24h never trigger
  • ???
@ammario ammario added the bug label Jun 14, 2022
@ammario ammario changed the title TTL >24h has confusing interaction with auto start TTL >24h has a confusing interaction with auto start Jun 14, 2022
@johnstcn johnstcn added api Area: HTTP API needs grooming labels Jun 14, 2022
@johnstcn
Copy link
Member

johnstcn commented Jun 14, 2022

@ammario Would we be OK with the following behaviour being possible:

1. Start at Mon 09:00am
2. Stop at Tue 08:59am
3. Start at Tue 09:00am
4. Stop at Wed 08:59am
...

Also, should a user be able to manually extend their "active lease" / deadline over a scheduled start time?
This is currently possible; I think it makes sense to leave this behaviour as-is.

@ketang
Copy link
Contributor

ketang commented Jun 14, 2022

I think the least surprising behavior if a workspace is on during at its scheduled autostart time that we extend its duration to the maximum of its current duration and the scheduled duration.

Examples with a 9am start and 9 hour duration/6pm shutdown:

  • if OFF at 9am: start
  • if ON at 9am with shutdown to 7pm: do nothing
  • if ON at 9am with shutdown at 10am: extend shutdown to 6pm

@johnstcn
Copy link
Member

...unless this would violate template-level maximum, in which case we would extend up and until that maximum and no more.

@ketang
Copy link
Contributor

ketang commented Jun 14, 2022

Even if it's before when the workspace would have stopped if it was freshly autostarted? I don't understand what the benefit of that is. I think we should put the caveat on the template-level maximum not the workspace schedule, if for no other reason than that we'll have 10x+ more people seeing the latter than the former, and they'll be generally less versed in the details and nuances.

@ammario
Copy link
Member Author

ammario commented Jun 14, 2022

The interplay between auto start and auto off will never be obvious so we might as well avoid it.

Here's what I propose:

Limit out auto off to the smallest distance between auto on intervals (or never, if permitted by template).

@ammario
Copy link
Member Author

ammario commented Jun 14, 2022

Actually even that is confusing when you reduce your auto start interval....

The 24h hard max is looking best to me.

@ketang
Copy link
Contributor

ketang commented Jun 14, 2022

Yeah the problem with smallest distance is weekends leading to inconsistent behavior.

The hard 24 hour thing is fine. It's not going to be sufficient for when we allow varying schedules, e.g. 9am-6pm on MWF and 10am-6pm on TTh.

@ammario
Copy link
Member Author

ammario commented Jun 14, 2022

The hard 24 hour thing is fine. It's not going to be sufficient for when we allow varying schedules, e.g. 9am-6pm on MWF and 10am-6pm on TTh.

How would that schedule break it? Both of those ranges are 12h so they would be within the 24h max?

@ketang
Copy link
Contributor

ketang commented Jun 15, 2022

Sorry those were meant as examples of variation not breaking examples of variation.

@github-actions
Copy link

This issue is becoming stale. In order to keep the tracker readable and actionable, I'm going close to this issue in 7 days if there isn't more activity.

@github-actions github-actions bot added the stale This issue is like stale bread. label Oct 22, 2022
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Area: HTTP API stale This issue is like stale bread.
Projects
None yet
Development

No branches or pull requests

4 participants