Title: Warn (or prevent) volumes from being deleted unintentionally · Issue #3386 · coder/coder · GitHub
Open Graph Title: Warn (or prevent) volumes from being deleted unintentionally · Issue #3386 · coder/coder
X Title: Warn (or prevent) volumes from being deleted unintentionally · Issue #3386 · coder/coder
Description: As a developer I expect my coder volume to stay around until my workspace is deleted so that I can trust my half-finished work is not lost. (Barring exceptional circumstance.) Scenario 1: Currently there is one way for a volume to be del...
Open Graph Description: As a developer I expect my coder volume to stay around until my workspace is deleted so that I can trust my half-finished work is not lost. (Barring exceptional circumstance.) Scenario 1: Currently...
X Description: As a developer I expect my coder volume to stay around until my workspace is deleted so that I can trust my half-finished work is not lost. (Barring exceptional circumstance.) Scenario 1: Currently...
Opengraph URL: https://github.com/coder/coder/issues/3386
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Warn (or prevent) volumes from being deleted unintentionally","articleBody":"> As a developer I expect my coder volume to stay around until my workspace is _deleted_ so that I can trust my half-finished work is not lost. (Barring exceptional circumstance.)\r\n\r\n**Scenario 1:** Currently there is one way for a volume to be deleted unintentionally (with #3000 there are two):\r\n1. A template author updates a template and changes the volume name format\r\n2. The user sees their workspace is outdated and goes ahead and updates\r\n3. The workspace is re-created, during start the old volume will be deleted (no longer referenced in the TF template) and a new one will be created in its place\r\n\r\n**Scenario 2:** When #3000 is implemented, our current users will run into this scenario:\r\n1. The user renames their workspace\r\n2. The user (or autostart/stop) starts or stops the workspace\r\n3. The volume will be deleted and a new one created in its place\r\n\r\nTo avoid #3000, template authors should move to using `data.coder_workspace.me.id` instead of `data.coder_workspace.me.name`, which will prevent volume deletion due to a naming change. However, the migration path will mean that all existing coder workspaces will lose their volumes either due to the former case (rename in template + update), or due to workspace rename.\r\n\r\nThere are a few ways we could dampen this impact:\r\n1. We could detect when a template push would cause this and warn the operator\r\n2. We could detect when a workspace update would cause this and warn the user\r\n3. We could detect when a rename would cause this and warn the user\r\n4. We could consider workspace volume names immutable after creation (i.e. we compute the volume name and store it separately, re-use it for the lifetime of the workspace)\r\n\r\nIt could be argued that renaming volumes in the template is an operator error and we shouldn't care about it. On the flip-side, operator error or not, it's something we could've guarded against and prevented potential loss in developer productivity.\r\n\r\nI think option 4 would be best, as it lets us guard against data loss in all cases. It's also the one requiring least changes to our code to handle the edge cases.\r\n\r\nAt minimum, we should implement 1 and 2 so that operators and users are aware of the impact. It'd be great to have 3 too in this case but not mandatory if we consider all our users should migrate to using IDs.\r\n\r\n---\r\n\r\nI think this is something of a feature-bug, so I've labeled it as such. Depending on solutions it will also require CLI and frontend work (but I've omitted those tags for now).","author":{"url":"https://github.com/mafredri","@type":"Person","name":"mafredri"},"datePublished":"2022-08-05T09:06:02Z","url":"https://github.com/coder/coder/issues/3386"}
| 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:5fbd35cb-2cfe-7512-dbf0-f4423954ac90 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C93A:3DD488:26B009D:31200E4:6B019797 |
| html-safe-nonce | 19ce0cd6d8b7f30533e2534f5ed662dd38f11a534ba56489ee9e567d2d9fb7d5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDOTNBOjNERDQ4ODoyNkIwMDlEOjMxMjAwRTQ6NkIwMTk3OTciLCJ2aXNpdG9yX2lkIjoiMTM3NDA4NjI1NTk4OTU5NDAwNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 6e8c75ab0120cb22d0c17363f3a09cff32600f27698625923a53306e9f9bd8a7 |
| hovercard-subject-tag | issue:1329663048 |
| 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/3386/issue_layout |
| twitter:image | https://opengraph.githubassets.com/bc22094cb4ec4008c2e354065159db3a8c3b742c4afd968a9050a167fd6ef145/coder/coder/issues/3386 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/bc22094cb4ec4008c2e354065159db3a8c3b742c4afd968a9050a167fd6ef145/coder/coder/issues/3386 |
| og:image:alt | As a developer I expect my coder volume to stay around until my workspace is deleted so that I can trust my half-finished work is not lost. (Barring exceptional circumstance.) Scenario 1: Currently... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mafredri |
| 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