-
Notifications
You must be signed in to change notification settings - Fork 1.1k
feat(agent): add devcontainer autostart support #17076
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
Conversation
In the presence of multiple devcontainers, it would be nice to differentiate them by name. This change inherits the resource name from terraform. Refs #17076
cfea2b6 to
779c763
Compare
779c763 to
e1048b1
Compare
41fddac to
1c5a1db
Compare
1c5a1db to
2d93ee3
Compare
c78665a to
ffc2981
Compare
ffc2981 to
9c1bf01
Compare
johnstcn
left a comment
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.
Nothing blocking from my side!
| type ScriptCompletedFunc func(context.Context, *proto.WorkspaceAgentScriptCompletedRequest) (*proto.WorkspaceAgentScriptCompletedResponse, error) | ||
|
|
||
| type runnerScript struct { | ||
| runOnPostStart bool |
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.
suggestion: this is fine for now, but I could see this being an option on WorkspaceAgentScript in future.
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.
It's a good call-out 👍. I hope we figure out a better way to define dependencies or ordering for start scripts, though.
3e0c2a0 to
55c5c46
Compare
DanielleMaywood
left a comment
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.
looks good to me ![]()
Co-authored-by: Danielle Maywood <[email protected]>
|
/cherry-pick release/2.21 |
This change adds support for devcontainer autostart in workspaces. The preconditions for utilizing this feature are:
coder_devcontainerresource must be defined in Terraform@devcontainers/clitool must be installedExample Terraform:
Closes #16423
Demo of an auto-started Dev Container (logs, timings):
Demo of devcontainer defined in Terraform, but not enabled on the agent:
Demo of errors being propagated via script: