Title: Change agent startup script behavior from being never-ending to indicating the workspace is ready on end · Issue #5749 · coder/coder · GitHub
Open Graph Title: Change agent startup script behavior from being never-ending to indicating the workspace is ready on end · Issue #5749 · coder/coder
X Title: Change agent startup script behavior from being never-ending to indicating the workspace is ready on end · Issue #5749 · coder/coder
Description: A new requirement came up in relation to #2957. We need a way to discern between a workspace being ready and not. This is also relevant for vscode-coder where we might start a workspace for a user and want to wait for it to become ready....
Open Graph Description: A new requirement came up in relation to #2957. We need a way to discern between a workspace being ready and not. This is also relevant for vscode-coder where we might start a workspace for a user ...
X Description: A new requirement came up in relation to #2957. We need a way to discern between a workspace being ready and not. This is also relevant for vscode-coder where we might start a workspace for a user ...
Opengraph URL: https://github.com/coder/coder/issues/5749
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Change agent startup script behavior from being never-ending to indicating the workspace is ready on end","articleBody":"A new requirement came up in relation to #2957. We need a way to discern between a workspace being ready and not. This is also relevant for [`vscode-coder`](https://github.com/coder/vscode-coder) where we might start a workspace for a user and want to wait for it to become ready.\r\n\r\nThis requirement has also come up in #5171.\r\n\r\nAfter discussing with @kylecarbs potential implementation, we came up with the following proposal:\r\n\r\n- [x] Introduce new property describing workspace agent state, `WorkspaceAgentLifecycle`: (`created`,) `starting`, `start_timeout`, `start_error`, `ready`, (`stopping`, `stop_timeout`, `stop_error`, `stopped`)\r\n https://github.com/coder/coder/pull/5785\r\n\t- This property describes the current state of the agent and is independent of status (which describes the connection status), it can be thought of as a lifecycle status / readyness status\r\n\t- And additional `created` state could be added to indicate an initial state of the agent, before it has reported it's initial state\r\n\t- Example usage of state:\r\n\t\t- If state is `starting`, keep users waiting e.g. during `ssh coder.workspace` (loading indicator)\r\n\t\t- If state is `start_timeout`, show users a warning\r\n\t\t- If startup script exits with non-zero status, the `start_error` state lets us direct users towards inspecting the startup log (#2957)\r\n- [x] Introduce a new provider parameter `coder_agent.startup_script_timeout` with a default value (say 5min) (`shutdown_script_timeout` for #5171)\r\n https://github.com/coder/terraform-provider-coder/pull/84\r\n\t- This is a soft-timeout after which we _warn_\r\n\t- [x] Show warning in dashboard\r\n\thttps://github.com/coder/coder/pull/5835\r\n\thttps://github.com/coder/coder/pull/5850\r\n\t- [ ] Show warning in CLI, e.g. when SSH:ing into the workspace\r\n\t**NOTE:** Not applicable until **Final steps**\r\n\tPartially handled by: https://github.com/coder/coder/pull/5851\r\n- [x] Introduce a new provider parameter `coder_agent.delay_login_until_ready`\r\n\thttps://github.com/coder/terraform-provider-coder/pull/84\r\n\t- This will delay logins until agent is ready, will default to false and changed to true in a future release\r\n\t- [ ] Delay login in web Terminal\r\n\t- [x] Delay login in `coder ssh`\r\n\thttps://github.com/coder/coder/pull/5851\r\n\t- [x] Delay login in `ssh` (`coder config-ssh`)\r\n\thttps://github.com/coder/coder/pull/5851\r\n\t- [x] Add `--skip-delay-login-until-ready` flag\r\n\thttps://github.com/coder/coder/pull/5851\r\n- [x] Add example(s) with non-blocking startup scripts\r\n https://github.com/coder/coder/pull/5880\r\n\t- Consider `/etc/init.d/svc start`, `nohup /path/to/svc &`, \"fake systemd\", etc.\r\n- [x] Add documentation for troubleshooting agent lifecycles\r\n https://github.com/coder/coder/pull/5877\r\n\r\n**Final steps:**\r\n- [ ] Create a breaking PR:\r\n\t- [ ] Revert https://github.com/coder/coder/pull/5850 to show agents with timed out startup scripts by default\r\n\r\nWe will focus on implementing the start-states first, stop will come later.\r\n\r\n","author":{"url":"https://github.com/mafredri","@type":"Person","name":"mafredri"},"datePublished":"2023-01-17T16:57:43Z","url":"https://github.com/coder/coder/issues/5749"}
| 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:6e599091-77e4-33ea-43d7-fe95eb9fa2ad |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AF96:E3C4F:23CD9D9:2DA2F5F:6B018A7D |
| html-safe-nonce | be2bac4ce8ea1eaec1b3dbdfbfd6d95689d69b98bc02f29b29d178031c899e0d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRjk2OkUzQzRGOjIzQ0Q5RDk6MkRBMkY1Rjo2QjAxOEE3RCIsInZpc2l0b3JfaWQiOiI1MTU0ODc5MjAxMzkxNzc0MzM0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 9429f9124d1a81033fec38922fc1cec5942b8ffac446baf9c4243f776d7a47a2 |
| hovercard-subject-tag | issue:1536723838 |
| 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/5749/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4bade35885c4cf035ab290c05297b6d3ba837407bc44d32f469458b7f3097f45/coder/coder/issues/5749 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4bade35885c4cf035ab290c05297b6d3ba837407bc44d32f469458b7f3097f45/coder/coder/issues/5749 |
| og:image:alt | A new requirement came up in relation to #2957. We need a way to discern between a workspace being ready and not. This is also relevant for vscode-coder where we might start a workspace for a user ... |
| 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