Skip to content

feat: add orphan support #3849

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

Merged
merged 17 commits into from
Sep 6, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Minor fixups
  • Loading branch information
ammario committed Sep 4, 2022
commit 2bfe35464b3020e20bbbc4bff74be3160a7047d6
5 changes: 3 additions & 2 deletions cli/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@ func deleteWorkspace() *cobra.Command {
var state []byte

if orphan {
cliui.Warn(cmd.ErrOrStderr(), "Orphaning workspace required template edit permission",
"Template edit permission is required to orphan workspaces.",
cliui.Warn(
cmd.ErrOrStderr(),
"Orphaning workspace required template edit permission",
)
}

Expand Down
2 changes: 1 addition & 1 deletion cli/delete_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func TestDelete(t *testing.T) {

t.Run("Orphan", func(t *testing.T) {
t.Parallel()
client := coderdtest.New(t, &coderdtest.Options{IncludeProvisionerD: true})
client := coderdtest.New(t, &coderdtest.Options{IncludeProvisionerDaemon: true})
user := coderdtest.CreateFirstUser(t, client)
version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, nil)
coderdtest.AwaitTemplateVersionJob(t, client, version.ID)
Expand Down
3 changes: 2 additions & 1 deletion cli/portforward.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ import (
"sync"
"syscall"

"cdr.dev/slog"
"github.com/pion/udp"
"github.com/spf13/cobra"
"golang.org/x/xerrors"

"cdr.dev/slog"

"github.com/coder/coder/agent"
"github.com/coder/coder/cli/cliui"
"github.com/coder/coder/codersdk"
Expand Down
4 changes: 2 additions & 2 deletions coderd/workspacebuilds_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ func TestWorkspaceBuildsProvisionerState(t *testing.T) {

t.Run("Permissions", func(t *testing.T) {
t.Parallel()
client := coderdtest.New(t, &coderdtest.Options{IncludeProvisionerD: true})
client := coderdtest.New(t, &coderdtest.Options{IncludeProvisionerDaemon: true})
first := coderdtest.CreateFirstUser(t, client)

ctx, cancel := context.WithTimeout(context.Background(), testutil.WaitLong)
Expand Down Expand Up @@ -281,7 +281,7 @@ func TestWorkspaceBuildsProvisionerState(t *testing.T) {

t.Run("Orphan", func(t *testing.T) {
t.Parallel()
client := coderdtest.New(t, &coderdtest.Options{IncludeProvisionerD: true})
client := coderdtest.New(t, &coderdtest.Options{IncludeProvisionerDaemon: true})
first := coderdtest.CreateFirstUser(t, client)

ctx, cancel := context.WithTimeout(context.Background(), testutil.WaitLong)
Expand Down
2 changes: 1 addition & 1 deletion site/src/components/ErrorSummary/ErrorSummary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const Language = {
}

export interface ErrorSummaryProps {
error: ApiError | Error | unknown | JSX.Element
error: ApiError | Error | unknown
retry?: () => void
dismissible?: boolean
defaultMessage?: string
Expand Down