Skip to content

Change agent startup script behavior from being never-ending to indicating the workspace is ready on end #5749

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

Closed
9 of 13 tasks
mafredri opened this issue Jan 17, 2023 · 7 comments
Labels
api Area: HTTP API cli Area: CLI stale This issue is like stale bread.

Comments

@mafredri
Copy link
Member

mafredri commented Jan 17, 2023

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.

This requirement has also come up in #5171.

After discussing with @kylecarbs potential implementation, we came up with the following proposal:

Final steps:

We will focus on implementing the start-states first, stop will come later.

@mafredri mafredri added enhancement api Area: HTTP API cli Area: CLI labels Jan 17, 2023
@bpmct
Copy link
Member

bpmct commented Jan 17, 2023

Introduce new WorkspaceAgentStatus: starting, start_timeout, started, (stopping, stop_timeout, stopped)

Will agents still have connecting, and disconnected?

Allow waiting via CLI, e.g. coder ssh --wait-ready

Hmm, perhaps the default behavior should wait until its ready?

@kylecarbs
Copy link
Member

@bpmct

Hmm, perhaps the default behavior should wait until its ready?

This would break most existing deployments that fork off our templates. Since we launch code-server, it would never let anyone SSH in.

@mafredri
Copy link
Member Author

Will agents still have connecting, and disconnected?

At first I thought we would combine the status as one field. But on second thought, we should supports states like disconnected and starting (at which point starting might become unknown).

I think renaming the current status to connection_status would make a lot of sense.

The new functionality could be put under status (or something like lifecycle_status not to conflict).

Hmm, perhaps the default behavior should wait until its ready?

I would prefer this as well, I was thinking about potential breakage for current users, which is why I proposed --wait-ready, but --no-wait is a valid option.

@kylecarbs
Copy link
Member

@mafredri all this sounds good to me.

I think we should add a startup_script_allow_connect or something (that's a bad name), and change our templates to use it so our users start too. Maybe in a few releases we make it the default to block.

@mtojek
Copy link
Member

mtojek commented Jan 19, 2023

Introduce new WorkspaceAgentStatus: starting, start_timeout, started, (stopping, stop_timeout, stopped)

This seems to be a complex change to introduce, affecting many places. Did you have a chance to analyze the task complexity? I'm curious how safe it is to implement without getting you lost for a month...

@mafredri
Copy link
Member Author

@mtojek That part is still a WIP but I should have it finished by today or tomorrow. Opened up a (wip) PR if you want to have a look: #5785

mafredri added a commit to coder/terraform-provider-coder that referenced this issue Jan 23, 2023
mafredri added a commit that referenced this issue Jan 26, 2023
@github-actions
Copy link

This issue is becoming stale. In order to keep the tracker readable and actionable, I'm going close to this issue in 7 days if there isn't more activity.

@github-actions github-actions bot added the stale This issue is like stale bread. label Apr 28, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 6, 2023
DanielleMaywood pushed a commit to coder/terraform-provider-coder that referenced this issue Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Area: HTTP API cli Area: CLI stale This issue is like stale bread.
Projects
None yet
Development

No branches or pull requests

4 participants