Skip to content

[server] Remove obsolete (Theia) User Storage Resource #18377

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 2 commits into from
Aug 1, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
5 changes: 0 additions & 5 deletions components/gitpod-db/src/container-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ import { TypeORMWorkspaceDBImpl } from "./typeorm/workspace-db-impl";
import { TypeORMUserDBImpl } from "./typeorm/user-db-impl";
import { UserDB } from "./user-db";
import { Config } from "./config";
import { UserStorageResourcesDB } from "./user-storage-resources-db";
import { TypeORMUserStorageResourcesDBImpl } from "./typeorm/user-storage-resources-db-impl";
import { TypeORM } from "./typeorm/typeorm";
import { encryptionModule } from "@gitpod/gitpod-protocol/lib/encryption/container-module";
import { KeyProviderImpl, KeyProviderConfig } from "@gitpod/gitpod-protocol/lib/encryption/key-provider";
Expand Down Expand Up @@ -77,9 +75,6 @@ export const dbContainerModule = (cacheClass = DataCacheNoop) =>
bind(WorkspaceDB).toService(TypeORMWorkspaceDBImpl);
bindDbWithTracing(TracedWorkspaceDB, bind, WorkspaceDB).inSingletonScope();

bind(TypeORMUserStorageResourcesDBImpl).toSelf().inSingletonScope();
bind(UserStorageResourcesDB).toService(TypeORMUserStorageResourcesDBImpl);

bind(TypeORMAppInstallationDBImpl).toSelf().inSingletonScope();
bind(AppInstallationDB).toService(TypeORMAppInstallationDBImpl);

Expand Down
1 change: 0 additions & 1 deletion components/gitpod-db/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ export * from "./user-db";
export * from "./workspace-db";
export * from "./traced-db";
export * from "./app-installation-db";
export * from "./user-storage-resources-db";
export * from "./one-time-secret-db";
export * from "./auth-provider-entry-db";
export * from "./typeorm/typeorm";
Expand Down

This file was deleted.

This file was deleted.

13 changes: 0 additions & 13 deletions components/gitpod-db/src/user-storage-resources-db.ts

This file was deleted.

45 changes: 0 additions & 45 deletions components/gitpod-db/src/user-storage-resources-spec.db.ts

This file was deleted.

55 changes: 0 additions & 55 deletions components/gitpod-protocol/go/gitpod-service.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ type APIInterface interface {
GetOpenPorts(ctx context.Context, workspaceID string) (res []*WorkspaceInstancePort, err error)
OpenPort(ctx context.Context, workspaceID string, port *WorkspaceInstancePort) (res *WorkspaceInstancePort, err error)
ClosePort(ctx context.Context, workspaceID string, port float32) (err error)
GetUserStorageResource(ctx context.Context, options *GetUserStorageResourceOptions) (res string, err error)
UpdateUserStorageResource(ctx context.Context, options *UpdateUserStorageResourceOptions) (err error)
GetWorkspaceEnvVars(ctx context.Context, workspaceID string) (res []*EnvVar, err error)
GetEnvVars(ctx context.Context) (res []*EnvVar, err error)
SetEnvVar(ctx context.Context, variable *UserEnvVarValue) (err error)
Expand Down Expand Up @@ -175,10 +173,6 @@ const (
FunctionOpenPort FunctionName = "openPort"
// FunctionClosePort is the name of the closePort function
FunctionClosePort FunctionName = "closePort"
// FunctionGetUserStorageResource is the name of the getUserStorageResource function
FunctionGetUserStorageResource FunctionName = "getUserStorageResource"
// FunctionUpdateUserStorageResource is the name of the updateUserStorageResource function
FunctionUpdateUserStorageResource FunctionName = "updateUserStorageResource"
// FunctionGetEnvVars is the name of the getEnvVars function
FunctionGetEnvVars FunctionName = "getEnvVars"
// FunctionSetEnvVar is the name of the setEnvVar function
Expand Down Expand Up @@ -1025,44 +1019,6 @@ func (gp *APIoverJSONRPC) ClosePort(ctx context.Context, workspaceID string, por
return
}

// GetUserStorageResource calls getUserStorageResource on the server
func (gp *APIoverJSONRPC) GetUserStorageResource(ctx context.Context, options *GetUserStorageResourceOptions) (res string, err error) {
if gp == nil {
err = errNotConnected
return
}
var _params []interface{}

_params = append(_params, options)

var result string
err = gp.C.Call(ctx, "getUserStorageResource", _params, &result)
if err != nil {
return
}
res = result

return
}

// UpdateUserStorageResource calls updateUserStorageResource on the server
func (gp *APIoverJSONRPC) UpdateUserStorageResource(ctx context.Context, options *UpdateUserStorageResourceOptions) (err error) {
if gp == nil {
err = errNotConnected
return
}
var _params []interface{}

_params = append(_params, options)

err = gp.C.Call(ctx, "updateUserStorageResource", _params, nil)
if err != nil {
return
}

return
}

// GetWorkspaceEnvVars calls GetWorkspaceEnvVars on the server
func (gp *APIoverJSONRPC) GetWorkspaceEnvVars(ctx context.Context, workspaceID string) (res []*EnvVar, err error) {
if gp == nil {
Expand Down Expand Up @@ -1532,11 +1488,6 @@ type UserInfo struct {
Name string `json:"name,omitempty"`
}

// GetUserStorageResourceOptions is the GetUserStorageResourceOptions message type
type GetUserStorageResourceOptions struct {
URI string `json:"uri,omitempty"`
}

// GetWorkspacesOptions is the GetWorkspacesOptions message type
type GetWorkspacesOptions struct {
Limit float64 `json:"limit,omitempty"`
Expand Down Expand Up @@ -2038,12 +1989,6 @@ type SendHeartBeatOptions struct {
WasClosed bool `json:"wasClosed,omitempty"`
}

// UpdateUserStorageResourceOptions is the UpdateUserStorageResourceOptions message type
type UpdateUserStorageResourceOptions struct {
Content string `json:"content,omitempty"`
URI string `json:"uri,omitempty"`
}

// AdditionalUserData is the AdditionalUserData message type
type AdditionalUserData struct {
EmailNotificationSettings *EmailNotificationSettings `json:"emailNotificationSettings,omitempty"`
Expand Down
29 changes: 0 additions & 29 deletions components/gitpod-protocol/go/mock.go

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

11 changes: 0 additions & 11 deletions components/gitpod-protocol/src/gitpod-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,6 @@ export interface GitpodServer extends JsonRpcServer<GitpodClient>, AdminServer,
openPort(workspaceId: string, port: WorkspaceInstancePort): Promise<WorkspaceInstancePort | undefined>;
closePort(workspaceId: string, port: number): Promise<void>;

// User storage
getUserStorageResource(options: GitpodServer.GetUserStorageResourceOptions): Promise<string>;
updateUserStorageResource(options: GitpodServer.UpdateUserStorageResourceOptions): Promise<void>;

// Workspace env vars
getWorkspaceEnvVars(workspaceId: string): Promise<EnvVarWithValue[]>;

Expand Down Expand Up @@ -412,13 +408,6 @@ export namespace GitpodServer {
/* this is here to enable backwards-compatibility and untangling rollout between workspace, IDE and meta */
dontWait?: boolean;
}
export interface GetUserStorageResourceOptions {
readonly uri: string;
}
export interface UpdateUserStorageResourceOptions {
readonly uri: string;
readonly content: string;
}
export interface GetTokenSearchOptions {
readonly host: string;
}
Expand Down
2 changes: 0 additions & 2 deletions components/server/src/auth/rate-limiter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,6 @@ const defaultFunctions: FunctionsConfig = {
getOpenPorts: { group: "default", points: 1 },
openPort: { group: "default", points: 1 },
closePort: { group: "default", points: 1 },
getUserStorageResource: { group: "default", points: 1 },
updateUserStorageResource: { group: "default", points: 1 },
getWorkspaceEnvVars: { group: "default", points: 1 },
getAllEnvVars: { group: "default", points: 1 },
setEnvVar: { group: "default", points: 1 },
Expand Down
Loading