Skip to content

chore(coderd): remove the window option in open_in #16104

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 5 commits into from
Jan 15, 2025
Merged
Show file tree
Hide file tree
Changes from 4 commits
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
2 changes: 0 additions & 2 deletions coderd/apidoc/docs.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions coderd/apidoc/swagger.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions coderd/provisionerdserver/provisionerdserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -2017,8 +2017,8 @@ func InsertWorkspaceResource(ctx context.Context, db database.Store, jobID uuid.
switch app.OpenIn {
case sdkproto.AppOpenIn_TAB:
openIn = database.WorkspaceAppOpenInTab
case sdkproto.AppOpenIn_WINDOW:
openIn = database.WorkspaceAppOpenInWindow
case sdkproto.AppOpenIn_SLIM_WINDOW:
openIn = database.WorkspaceAppOpenInSlimWindow
}

dbApp, err := db.InsertWorkspaceApp(ctx, database.InsertWorkspaceAppParams{
Expand Down
2 changes: 0 additions & 2 deletions codersdk/workspaceapps.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,11 @@ type WorkspaceAppOpenIn string

const (
WorkspaceAppOpenInSlimWindow WorkspaceAppOpenIn = "slim-window"
WorkspaceAppOpenInWindow WorkspaceAppOpenIn = "window"
WorkspaceAppOpenInTab WorkspaceAppOpenIn = "tab"
)

var MapWorkspaceAppOpenIns = map[WorkspaceAppOpenIn]struct{}{
WorkspaceAppOpenInSlimWindow: {},
WorkspaceAppOpenInWindow: {},
WorkspaceAppOpenInTab: {},
}

Expand Down
2 changes: 0 additions & 2 deletions docs/reference/api/builds.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion docs/reference/api/schemas.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions docs/reference/api/templates.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions provisioner/terraform/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -437,8 +437,6 @@ func ConvertState(ctx context.Context, modules []*tfjson.StateModule, rawGraph s
switch strings.ToLower(attrs.OpenIn) {
case "slim-window":
openIn = proto.AppOpenIn_SLIM_WINDOW
case "window":
openIn = proto.AppOpenIn_WINDOW
case "tab":
openIn = proto.AppOpenIn_TAB
}
Expand Down
54 changes: 25 additions & 29 deletions provisionersdk/proto/provisioner.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions provisionersdk/proto/provisioner.proto
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,8 @@ message Script {
}

enum AppOpenIn {
WINDOW = 0;
SLIM_WINDOW = 1;
TAB = 2;
SLIM_WINDOW = 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's keep the WINDOW member but mark it as deprecated.
As discussed, there's no way to remove an enum entry in Postgres so it's probably fine to just leave it lying around instead of the nonsense involved to get it removed properly.

TAB = 1;
}

// App represents a dev-accessible application on the workspace.
Expand Down
5 changes: 2 additions & 3 deletions site/e2e/provisionerGenerated.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 2 additions & 6 deletions site/src/api/typesGenerated.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading