Title: Autostop: fall back to workspace.ttl if workspace.latest_build.deadline is zero · Issue #1942 · coder/coder · GitHub
Open Graph Title: Autostop: fall back to workspace.ttl if workspace.latest_build.deadline is zero · Issue #1942 · coder/coder
X Title: Autostop: fall back to workspace.ttl if workspace.latest_build.deadline is zero · Issue #1942 · coder/coder
Description: Definition of Done Workspace autostop should fallback to the workspace.ttl if the workspace.latest_build.deadline is zero. Steps to Reproduce Create a workspace with autostop enabled Start workspace and wait for transition to complete Ed...
Open Graph Description: Definition of Done Workspace autostop should fallback to the workspace.ttl if the workspace.latest_build.deadline is zero. Steps to Reproduce Create a workspace with autostop enabled Start workspac...
X Description: Definition of Done Workspace autostop should fallback to the workspace.ttl if the workspace.latest_build.deadline is zero. Steps to Reproduce Create a workspace with autostop enabled Start workspac...
Opengraph URL: https://github.com/coder/coder/issues/1942
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Autostop: fall back to workspace.ttl if workspace.latest_build.deadline is zero","articleBody":"## Definition of Done\r\n\r\nWorkspace autostop should fallback to the `workspace.ttl` if the `workspace.latest_build.deadline` is zero.\r\n\r\n## Steps to Reproduce\r\n\r\n- Create a workspace with autostop enabled\r\n- Start workspace and wait for transition to complete\r\n- Edit database and set workspace.latest_build.deadline to time.Zero e.g.\r\n ```\r\n update workspace_builds set deadline='0001-01-01 00:00:00+00' where id = 'deadbeef-dead-beef-dead-beefdeadbeef';\r\n ```\r\n- Observe that workspace does not auto-stop\r\n\r\n## Expected\r\n\r\nWorkspace should auto-stop after now plus workspace TTL.\r\n\r\n## Actual\r\n\r\nWorkspace does not auto-stop.\r\n\r\n## Logs\r\n\r\n```\r\nJun 01 13:39:57 coder coder[28025]: 2022-06-01 13:39:57.575 [DEBUG] \u003c./coderd/autobuild/executor/lifecycle_executor.go:132> (*Executor).runOnce.func2 latest workspace build has zero deadline, skipping {\"workspace_\r\nid\": \"64ff14cb-3b2d-4aad-8011-247f2cf9332f\", \"workspace_build_id\": \"a67e7139-6266-4e03-8d91-eb21ed14642d\"}\r\n```\r\n\r\n## Notes\r\n\r\n- This is in addition to [updating deadlines of active workspace builds if workspace.ttl is updated; tracked separately ](https://github.com/coder/coder/issues/1783)","author":{"url":"https://github.com/johnstcn","@type":"Person","name":"johnstcn"},"datePublished":"2022-06-01T13:44:28Z","url":"https://github.com/coder/coder/issues/1942"}
| 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:5aada94e-014b-0094-14a2-5b5a96faf68d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C6F6:1F2D:11F2928:16AB5C7:6B015402 |
| html-safe-nonce | e7d3328136a64c49866694ca65535302a65d89f8bac99796d8f710490f9a077f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNkY2OjFGMkQ6MTFGMjkyODoxNkFCNUM3OjZCMDE1NDAyIiwidmlzaXRvcl9pZCI6IjIyNTIwNDg5Mzk3NDA5MDc1NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 1e49187ae3cfc763ecc9f1564fcd3a03d3ee472608c02b6ecb0bb8feda591916 |
| hovercard-subject-tag | issue:1256044858 |
| 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/1942/issue_layout |
| twitter:image | https://opengraph.githubassets.com/35f93ab314a8785516c8d9b1a43aa6b3624ffa304b4bcbf278884dd264111cd1/coder/coder/issues/1942 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/35f93ab314a8785516c8d9b1a43aa6b3624ffa304b4bcbf278884dd264111cd1/coder/coder/issues/1942 |
| og:image:alt | Definition of Done Workspace autostop should fallback to the workspace.ttl if the workspace.latest_build.deadline is zero. Steps to Reproduce Create a workspace with autostop enabled Start workspac... |
| 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