Title: Safe way to edit workspace parameters via dashboard and CLI · Issue #802 · coder/coder · GitHub
Open Graph Title: Safe way to edit workspace parameters via dashboard and CLI · Issue #802 · coder/coder
X Title: Safe way to edit workspace parameters via dashboard and CLI · Issue #802 · coder/coder
Description: edits by @bpmct: Problem statement In Coder Classic, some parameters for workspaces are editable after the workspace is created, providing a helpful utility to users. Examples of these parameters are: image cpu allocation memory allocati...
Open Graph Description: edits by @bpmct: Problem statement In Coder Classic, some parameters for workspaces are editable after the workspace is created, providing a helpful utility to users. Examples of these parameters a...
X Description: edits by @bpmct: Problem statement In Coder Classic, some parameters for workspaces are editable after the workspace is created, providing a helpful utility to users. Examples of these parameters a...
Opengraph URL: https://github.com/coder/coder/issues/802
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Safe way to edit workspace parameters via dashboard and CLI","articleBody":"edits by @bpmct:\r\n\r\n## Problem statement \r\n\r\nIn Coder Classic, some parameters for workspaces are editable after the workspace is created, providing a helpful utility to users. Examples of these parameters are:\r\n- image\r\n- cpu allocation\r\n- memory allocation\r\n- disk size\r\n\r\nSome parameters have specific rules when editing:\r\n\r\n- disk size can only be increased, not decreased\r\n\r\nOthers cannot be edited, as Coder does support migrations and it would result in data loss:\r\n- workspace provider\r\n- CVM (true/false)\r\n\r\nIn Coder OSS, there is currently:\r\n\r\n- no way to edit parameters for an existing workspace via the web dashboard\r\n- no prompt in the dashboard when new variables are added to a template version and they \"update\" their workspace #2660 \r\n- a way to dangerously edit ALL parameters for an existing workspace with `coder update --always-prompt \u003cworkspace-name>`\r\n - If I change the \"region\" of an existing workspace, it will delete the disk in one region and recreate it in another. The user looses the files in their home directory.\r\n- no way to see what your existing parameters are. users need to re-select them from scratch.\r\n\r\n## Definition of done\r\n\r\nCoder has documented (or implemented) best practices for disabling/handling \"dangerous\" parameters.\r\n - Admins would likely have to indicate which variables are destructive, as every template differs\r\n\r\nUsers can safely edit their workspace's parameters from the web dashboard and CLI.\r\n - Users can also see what their current parameters are in their workspace\r\n\r\nUsers are prompted in the web dashboard and CLI when they \"update\" their workspace and new variables are added to a template version\r\n - #2660 \r\n - This currently happens in the CLI, but not the web dashboard\r\n\r\n## Current workarounds\r\n\r\n- Terraform's `prevent_destroy` and `ignore_changes` meta-arguments can be added to templates to ensure that changes to \"destructive\" parameters will not destroy critical resources, such as a home volume or persistent VM. However, this UX is not well-handled into Coder and will lead to confusing behaviors:\r\n\r\n > User changes the `region` after a workspace is created, `ignore_changes` does not change the resources, user is confused why their change did not work and reports it to their Coder admin. While this prevented the workspace from deleting, the action didn't lead to the desired result.\r\n\r\n > User changes the `region` after a workspace is created, `prevent_destroy` ensures the volume is not deleted, but the rebuild has failed. When viewing the logs, the user sees that the volume cannot be destroyed but doesn't understand that their change led to a failed workspace\r\n\r\n - `prevent_destroy` would also prevent the workspace from being deleted, since it cannot be referenced conditionally (hashicorp/terraform#22544). Thanks @kylecarbs \r\n\r\n- User can dangerously edit their workspace with `coder update --always-prompt \u003cworkspace-name>` and has to remember / write down their previous values if they want to carry them over.\r\n\r\n## Archive\r\n\r\n\u003cdetails>\r\n \u003csummary>Old issue description\u003c/summary>\r\n \r\nTo discourage edits, this will be called the Workspace Settings page and be used for viewing parameters and potentially editing them.\r\nReuse Workspace Create form.\r\n\r\n- [ ] add warning that changing parameters may cause problems\r\n- [ ] add Delete Workspace button\r\n- [ ] disable any forms that can't be edited\r\n- [ ] hook up api to edit\r\n- [ ] hook up api to rebuild u pon submit\r\n- [ ] test that a workspace is edited\r\n- [ ] test that workspace is rebuilt\r\n \r\n\u003c/details>\r\n\r\n","author":{"url":"https://github.com/presleyp","@type":"Person","name":"presleyp"},"datePublished":"2022-04-01T00:32:49Z","url":"https://github.com/coder/coder/issues/802"}
| 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:a6aba8f2-59df-2c7d-57f6-e9857c2ce9e9 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DD4E:240CD1:23FF745:2DBD29A:6B018692 |
| html-safe-nonce | 885f185dfe7bbfb3f37bb9fdfc0b57132d9c1032d8a1ffc54425bdffc12c39b6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERDRFOjI0MENEMToyM0ZGNzQ1OjJEQkQyOUE6NkIwMTg2OTIiLCJ2aXNpdG9yX2lkIjoiNTMzNDM1MDkwMzg0NTY4NDg4MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | f344a23a1237f5cd5670cb849ca705d5a997143ae8c7af83491ccde3ca4304ad |
| hovercard-subject-tag | issue:1189048323 |
| 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/802/issue_layout |
| twitter:image | https://opengraph.githubassets.com/2278cefabcc4cc396b28b6f8fc4b3e9f9256f5948f3678cd6b7135bd8011e1a7/coder/coder/issues/802 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/2278cefabcc4cc396b28b6f8fc4b3e9f9256f5948f3678cd6b7135bd8011e1a7/coder/coder/issues/802 |
| og:image:alt | edits by @bpmct: Problem statement In Coder Classic, some parameters for workspaces are editable after the workspace is created, providing a helpful utility to users. Examples of these parameters a... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | presleyp |
| 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