-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Start workspaces by shelling out to CLI #518
Conversation
Replace the REST-API-based start flow with one that shells out to the coder CLI. This is the JetBrains extension equivalent to coder/vscode-coder#400.
@@ -659,7 +659,7 @@ class CoderWorkspacesStepView : | |||
cs.launch(ModalityState.current().asContextElement()) { | |||
while (isActive) { | |||
loadWorkspaces() | |||
delay(5000) | |||
delay(1000) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made this poll more frequently because so it picks up the "Starting" state faster while the CLI is starting the workspace. I'm not sure if there's a good way to switch to fast polling while the CLI is running and then switch back - feel free to make suggestions or commit to the branch!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we can redirect the output to somewhere (or nothing, since we are not using it) so we can return immediately from the exec and loadWorkspaces()
will run right away to pick up the starting state as quickly as possible. Let me experiment for a bit and see. Code looks good to me though!
@@ -659,7 +659,7 @@ class CoderWorkspacesStepView : | |||
cs.launch(ModalityState.current().asContextElement()) { | |||
while (isActive) { | |||
loadWorkspaces() | |||
delay(5000) | |||
delay(1000) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we can redirect the output to somewhere (or nothing, since we are not using it) so we can return immediately from the exec and loadWorkspaces()
will run right away to pick up the starting state as quickly as possible. Let me experiment for a bit and see. Code looks good to me though!
Going ahead with merge, I will experiment with what I mentioned in just a bit, but also a one second poll might be better anyway? Not sure if it will contribute meaningfully to backend load or anything. |
Replace the REST-API-based start flow with one that shells out to the coder CLI.
This is the JetBrains extension equivalent to coder/vscode-coder#400.