- Notifications
You must be signed in to change notification settings - Fork905
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
In the presence of multiple devcontainers, it would be nice todifferentiate them by name. This change inherits the resource name fromterraform.Refs#17076
cfea2b6
to779c763
Compare779c763
toe1048b1
Compare41fddac
to1c5a1db
Compare1c5a1db
to2d93ee3
Comparec78665a
toffc2981
Compareffc2981
to9c1bf01
CompareThere 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!
@@ -80,6 +80,21 @@ func New(opts Options) *Runner { | |||
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 onWorkspaceAgentScript
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.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
3e0c2a0
to55c5c46
CompareThere 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
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: Danielle Maywood <danielle@themaywoods.com>
7d4b3c8
intomainUh oh!
There was an error while loading.Please reload this page.
/cherry-pick release/2.21 |
Uh oh!
There was an error while loading.Please reload this page.
This change adds support for devcontainer autostart in workspaces. The preconditions for utilizing this feature are:
coder_devcontainer
resource must be defined in Terraform@devcontainers/cli
tool 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: