From 4ee0f52b1521275e474508cd3eb8f8b322a22119 Mon Sep 17 00:00:00 2001 From: Samuel K Date: Mon, 27 Apr 2026 14:03:18 -0500 Subject: [PATCH] fix(exec): use workspace UID for container lookup The exec command was looking up containers using workspace.ID but containers are labeled with the UID from GetRunnerIDFromWorkspace during `devsy up`. This caused "no running container found" errors. --- cmd/exec.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/exec.go b/cmd/exec.go index 12a3d44f6..f599eb6ec 100644 --- a/cmd/exec.go +++ b/cmd/exec.go @@ -8,6 +8,7 @@ import ( "github.com/devsy-org/devsy/cmd/flags" "github.com/devsy-org/devsy/pkg/config" + "github.com/devsy-org/devsy/pkg/devcontainer" devcconfig "github.com/devsy-org/devsy/pkg/devcontainer/config" "github.com/devsy-org/devsy/pkg/docker" "github.com/devsy-org/devsy/pkg/log" @@ -82,7 +83,7 @@ func (cmd *ExecCmd) Run(ctx context.Context, args []string) error { dockerCommand := resolveDockerCommand(client.WorkspaceConfig()) containerDetails, err := findRunningContainer( - ctx, dockerCommand, client.Workspace(), + ctx, dockerCommand, devcontainer.GetRunnerIDFromWorkspace(client.WorkspaceConfig()), ) if err != nil { return err