Skip to content

Bug: If you update 'time until shutdown' in a running workspace, the workspace UI has the old value #2055

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
sharkymark opened this issue Jun 4, 2022 · 3 comments

Comments

@sharkymark
Copy link
Contributor

OS Information

  • OS:
  • Browser (if applicable):
  • Architecture:
  • coder --version: 0.6.0

Steps to Reproduce

  1. Have Time until shutdown already configured e.g., 8 hours

  2. The workspace is running

  3. Change the Time until shutdown to 1 hour

  4. The workspace UI says 7 hours remaining (the leftover part from the original 8 hours)

Expected

Not quite sure, but something based on the new Time until shutdown - so maybe 1 hour in this example

Actual

The shutdown remaining in workspace UI is based on the previous Time until shutdown

Logs

Screenshot

image

image

Notes

Nope

@ketang
Copy link
Contributor

ketang commented Jun 5, 2022

I poked at this to see how it behaved. To start more from scratch:

  1. create a workspace
  2. set its shutdown time to 3 hours
  3. start the workspace
  4. when it is starting or has started, change the schedule to shut down after an hour
    Result: the workspaces page still shows "SHUTDOWN: 3 hours after start."

Doing a hard page reload doesn't change anything; it still shows 3 hours. However, if I hit the "Stop" button, then schedule card then shows "1 hour after start" 🤷🏾‍♂️

@greyscaled
Copy link
Contributor

greyscaled commented Jun 6, 2022

The UI uses the deadline on the workspace object. This is the only source of truth we have for the current running workspace.

If the workspace is off, it shows the schedule's declared TTL.

For agile reasons, updating the schedule while the workspace is running doesn't impact its deadline yet, only future ones. This decision made original MVP easier to reach.

The BE ticket for that is #1783 and this ticket is effectively a duplicate of it (I will mark them as such, and port over info to that ticket from this one.

When #1783 is addressed (BE-only), the FE, since it derives that information from the workspace deadline, will display as you both expect. But keep in mind, right now, it's displaying the truth, it's just not the truth you're expecting (that the running workspace deadline doesn't change after adjusting the schedule)

@greyscaled
Copy link
Contributor

Closing as duplicate of #1783

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants