-
Notifications
You must be signed in to change notification settings - Fork 881
TTL/Workspace Schedule is too coupled #2229
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
In other words, you want to distinguish between extending this workspace incarnation's lifetime versus extending the lifetime for every future incarnation. |
Thoughts:
The "change active lease" behaviour was added in #2165, the idea being that users would not necessarily differentiate between the workspace's "active lease" and the workspace's schedule.
What likely happened was that the active lease of the workspace had previously been extended, and updating the workspace TTL clobbered this previous lease. This is definitely not what a user would expect. Possible solutions:
We should definitely to 2) in any case; clobbering a previously extended workspace's deadline is not desirable behaviour. |
From discussion:
|
My understanding (or how I think this should work) is that we only look at the schedule when we create a workspace. After that, we only look at that workspace's countdown. Is that right? |
Yes, correct. We used to do it that way but in #1783 we decided we should to tightly couple the scheduled shutdown time of a running workspace with the schedule of the workspace -- when the workspace schedule is updated, the actively running workspace's shutdown time also gets updated. This is essentially reverting part of the work done in that ticket -- other work done in that ticket is still valuable (showing what the actual shutdown time would be based on changing the schedule). |
This should be fixed by #2282. Please re-open if not. |
So, I have a workspace that it scheduled to shut down in an hour. I want to edit my workspace schedule (which is a separate idea than extending my lease). I change my TTL in the Edit Schedule to one hour, and then boom, my workspace turns off.
I looked at the code a bit and have no idea what's causing this behavior.
The fact that "Edit Schedule" modifies my active lease is very hard to reason about as a user. Why does it add the TTL to the lease vs. adding the TTL to my current time? Why would I expect it to change the lease at all?
Also.. we use the word TTL around the product to mean both the schedule and the active lease. This has been confusing as I navigate the code, and also as a user. (See #2224 issue, which can be interpreted multiple ways).
What I suggest is we remove the ability for "Schedule" edits to affect the active lease. A lease is created on Workspace Start and then can only be modified directly. We can expose the ability for the user to edit the active lease separately from the schedule, as described here.
The text was updated successfully, but these errors were encountered: