Title: If you update 'time until shutdown' in a running workspace, the workspace UI has the old value · Issue #1783 · coder/coder · GitHub
Open Graph Title: If you update 'time until shutdown' in a running workspace, the workspace UI has the old value · Issue #1783 · coder/coder
X Title: If you update 'time until shutdown' in a running workspace, the workspace UI has the old value · Issue #1783 · coder/coder
Description: In #1778 we added support for setting a deadline on a single workspace build. In that implementation, the deadline can only increase monotonically. Changes to workspace TTL do not affect the deadline of an active workspace build. So what...
Open Graph Description: In #1778 we added support for setting a deadline on a single workspace build. In that implementation, the deadline can only increase monotonically. Changes to workspace TTL do not affect the deadli...
X Description: In #1778 we added support for setting a deadline on a single workspace build. In that implementation, the deadline can only increase monotonically. Changes to workspace TTL do not affect the deadli...
Opengraph URL: https://github.com/coder/coder/issues/1783
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"If you update 'time until shutdown' in a running workspace, the workspace UI has the old value","articleBody":"In https://github.com/coder/coder/pull/1778 we added support for setting a deadline on a single workspace build. In that implementation, the deadline can only increase monotonically. Changes to workspace TTL do not affect the deadline of an active workspace build.\r\n\r\n> So what will be the behavior when the user changes the TTL on a running workspace? Will you add functionality to the CLI so we also update the deadline to be closer to the new TTL?\r\n\r\n_Originally posted by @deansheather in https://github.com/coder/coder/pull/1778#pullrequestreview-986196037_ (paraphrased)\r\n\r\nSeems like this would be useful behaviour, but there are some ins and outs to this we need to think through:\r\n\r\n- If the workspace is not running, there is nothing to do here.\r\n- If the workspace is running and the build does not have a deadline set, we would need to set the deadline. Users would need to be warned that this would affect running builds of their workspace.\r\n - Time should be measured from the workspace start time.\r\n - In the client interfaces (UI/CLI), show a message \"This operation will cause the workspace to shut down at HH:MM\".\r\n- If the workspace is running and the build has a deadline set and the new deadline based on the TTL would cause the workspace to stop (i.e. new deadline would be at or before now), the user should DEFINITELY be warned of this.\r\n - Time should be measured from the workspace start time.\r\n - In the client interfaces (UI/CLI), show a message \"This operation will cause the workspace to shut down immediately\".\r\n- If the workspace is running and the build has a deadline set and the new deadline based on the TTL would cause the user to hit the 30-minute notifcation, that's probably fine.\r\n- (New issue): Make applying the updated deadline *optional* (i.e. prompt the user) (Edit: #2229)\r\n\r\n\r\n## Acceptance Criteria:\r\n\r\n1) Given a user has a workspace with no deadline/TTL set and the workspace is not running\r\n When the user updates the workspace TTL\r\n Then: the TTL is updated\r\n\r\n2) Given a user has a workspace with a deadline set and the workspace is running\r\n When the user updates the workspace TTL such that the updated deadline would affect a running workspace \r\n Then: the user is notified about the effect of the change (workspace will be stopped at X time) and be prompted to confirm.\r\n\r\n3) Given a user has a workspace with a deadline set and the workspace is running\r\n When: the user updates the workspace TTL such at the updated deadline would cause the running workspace to be stopped\r\n Then: the user is notified about the effect of the change (workspace will be stopped immediately) and be prompted to confirm.\r\n\r\n## Implementation Notes:\r\n\r\n- WorkspaceScheduleForm\r\n - Pass in workspace to WorkspaceScheduleFormValues\r\n - Add function to (workspace, startTime) -> use dayJS to check next schedule\r\n - Add a warning message to the `ttl` TextField\r\n - Use `Language` component of WorkspaceSchedule","author":{"url":"https://github.com/johnstcn","@type":"Person","name":"johnstcn"},"datePublished":"2022-05-26T15:57:41Z","url":"https://github.com/coder/coder/issues/1783"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:2b485c12-80be-2ed4-2146-3977c6f7ff53 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EBDC:134361:1C6FEB8:2560446:6B01547C |
| html-safe-nonce | fc121b053d07c61e9b72165aa5983a0af7c81ead363cd1bf48e01e10e7f406e5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQkRDOjEzNDM2MToxQzZGRUI4OjI1NjA0NDY6NkIwMTU0N0MiLCJ2aXNpdG9yX2lkIjoiMjIzMjU0NDcxNjg4MzMxNzg4NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | aa632a770cc3785a6f9e78948b2ee6cc385c77168d0027b176d82f6ae78a3826 |
| hovercard-subject-tag | issue:1249752189 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/coder/coder/1783/issue_layout |
| twitter:image | https://opengraph.githubassets.com/044d34a1949f6ac29cbd1a2eeaf2d47523663b3d732f3d24de7a68fea0f4c194/coder/coder/issues/1783 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/044d34a1949f6ac29cbd1a2eeaf2d47523663b3d732f3d24de7a68fea0f4c194/coder/coder/issues/1783 |
| og:image:alt | In #1778 we added support for setting a deadline on a single workspace build. In that implementation, the deadline can only increase monotonically. Changes to workspace TTL do not affect the deadli... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | johnstcn |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/coder/coder git https://github.com/coder/coder.git |
| octolytics-dimension-user_id | 95932066 |
| octolytics-dimension-user_login | coder |
| octolytics-dimension-repository_id | 440752086 |
| octolytics-dimension-repository_nwo | coder/coder |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 440752086 |
| octolytics-dimension-repository_network_root_nwo | coder/coder |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width