Skip to content

Commit 29ace49

Browse files
authored
[server] Remove obsolete (Theia) User Storage Resource (#18377)
* [server] Remove obsolete (Theia) User Storage Resource * more cleanup
1 parent 2e2833a commit 29ace49

File tree

13 files changed

+33
-422
lines changed

13 files changed

+33
-422
lines changed

components/gitpod-db/src/container-module.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ import { TypeORMWorkspaceDBImpl } from "./typeorm/workspace-db-impl";
1111
import { TypeORMUserDBImpl } from "./typeorm/user-db-impl";
1212
import { UserDB } from "./user-db";
1313
import { Config } from "./config";
14-
import { UserStorageResourcesDB } from "./user-storage-resources-db";
15-
import { TypeORMUserStorageResourcesDBImpl } from "./typeorm/user-storage-resources-db-impl";
1614
import { TypeORM } from "./typeorm/typeorm";
1715
import { encryptionModule } from "@gitpod/gitpod-protocol/lib/encryption/container-module";
1816
import { KeyProviderImpl, KeyProviderConfig } from "@gitpod/gitpod-protocol/lib/encryption/key-provider";
@@ -77,9 +75,6 @@ export const dbContainerModule = (cacheClass = DataCacheNoop) =>
7775
bind(WorkspaceDB).toService(TypeORMWorkspaceDBImpl);
7876
bindDbWithTracing(TracedWorkspaceDB, bind, WorkspaceDB).inSingletonScope();
7977

80-
bind(TypeORMUserStorageResourcesDBImpl).toSelf().inSingletonScope();
81-
bind(UserStorageResourcesDB).toService(TypeORMUserStorageResourcesDBImpl);
82-
8378
bind(TypeORMAppInstallationDBImpl).toSelf().inSingletonScope();
8479
bind(AppInstallationDB).toService(TypeORMAppInstallationDBImpl);
8580

components/gitpod-db/src/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ export * from "./user-db";
2121
export * from "./workspace-db";
2222
export * from "./traced-db";
2323
export * from "./app-installation-db";
24-
export * from "./user-storage-resources-db";
2524
export * from "./one-time-secret-db";
2625
export * from "./auth-provider-entry-db";
2726
export * from "./typeorm/typeorm";

components/gitpod-db/src/typeorm/entity/db-user-storage-resource.ts

Lines changed: 0 additions & 24 deletions
This file was deleted.

components/gitpod-db/src/typeorm/user-storage-resources-db-impl.ts

Lines changed: 0 additions & 60 deletions
This file was deleted.

components/gitpod-db/src/user-storage-resources-db.ts

Lines changed: 0 additions & 13 deletions
This file was deleted.

components/gitpod-db/src/user-storage-resources-spec.db.ts

Lines changed: 0 additions & 45 deletions
This file was deleted.

components/gitpod-protocol/go/gitpod-service.go

Lines changed: 0 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,6 @@ type APIInterface interface {
5959
GetOpenPorts(ctx context.Context, workspaceID string) (res []*WorkspaceInstancePort, err error)
6060
OpenPort(ctx context.Context, workspaceID string, port *WorkspaceInstancePort) (res *WorkspaceInstancePort, err error)
6161
ClosePort(ctx context.Context, workspaceID string, port float32) (err error)
62-
GetUserStorageResource(ctx context.Context, options *GetUserStorageResourceOptions) (res string, err error)
63-
UpdateUserStorageResource(ctx context.Context, options *UpdateUserStorageResourceOptions) (err error)
6462
GetWorkspaceEnvVars(ctx context.Context, workspaceID string) (res []*EnvVar, err error)
6563
GetEnvVars(ctx context.Context) (res []*EnvVar, err error)
6664
SetEnvVar(ctx context.Context, variable *UserEnvVarValue) (err error)
@@ -175,10 +173,6 @@ const (
175173
FunctionOpenPort FunctionName = "openPort"
176174
// FunctionClosePort is the name of the closePort function
177175
FunctionClosePort FunctionName = "closePort"
178-
// FunctionGetUserStorageResource is the name of the getUserStorageResource function
179-
FunctionGetUserStorageResource FunctionName = "getUserStorageResource"
180-
// FunctionUpdateUserStorageResource is the name of the updateUserStorageResource function
181-
FunctionUpdateUserStorageResource FunctionName = "updateUserStorageResource"
182176
// FunctionGetEnvVars is the name of the getEnvVars function
183177
FunctionGetEnvVars FunctionName = "getEnvVars"
184178
// FunctionSetEnvVar is the name of the setEnvVar function
@@ -1025,44 +1019,6 @@ func (gp *APIoverJSONRPC) ClosePort(ctx context.Context, workspaceID string, por
10251019
return
10261020
}
10271021

1028-
// GetUserStorageResource calls getUserStorageResource on the server
1029-
func (gp *APIoverJSONRPC) GetUserStorageResource(ctx context.Context, options *GetUserStorageResourceOptions) (res string, err error) {
1030-
if gp == nil {
1031-
err = errNotConnected
1032-
return
1033-
}
1034-
var _params []interface{}
1035-
1036-
_params = append(_params, options)
1037-
1038-
var result string
1039-
err = gp.C.Call(ctx, "getUserStorageResource", _params, &result)
1040-
if err != nil {
1041-
return
1042-
}
1043-
res = result
1044-
1045-
return
1046-
}
1047-
1048-
// UpdateUserStorageResource calls updateUserStorageResource on the server
1049-
func (gp *APIoverJSONRPC) UpdateUserStorageResource(ctx context.Context, options *UpdateUserStorageResourceOptions) (err error) {
1050-
if gp == nil {
1051-
err = errNotConnected
1052-
return
1053-
}
1054-
var _params []interface{}
1055-
1056-
_params = append(_params, options)
1057-
1058-
err = gp.C.Call(ctx, "updateUserStorageResource", _params, nil)
1059-
if err != nil {
1060-
return
1061-
}
1062-
1063-
return
1064-
}
1065-
10661022
// GetWorkspaceEnvVars calls GetWorkspaceEnvVars on the server
10671023
func (gp *APIoverJSONRPC) GetWorkspaceEnvVars(ctx context.Context, workspaceID string) (res []*EnvVar, err error) {
10681024
if gp == nil {
@@ -1532,11 +1488,6 @@ type UserInfo struct {
15321488
Name string `json:"name,omitempty"`
15331489
}
15341490

1535-
// GetUserStorageResourceOptions is the GetUserStorageResourceOptions message type
1536-
type GetUserStorageResourceOptions struct {
1537-
URI string `json:"uri,omitempty"`
1538-
}
1539-
15401491
// GetWorkspacesOptions is the GetWorkspacesOptions message type
15411492
type GetWorkspacesOptions struct {
15421493
Limit float64 `json:"limit,omitempty"`
@@ -2038,12 +1989,6 @@ type SendHeartBeatOptions struct {
20381989
WasClosed bool `json:"wasClosed,omitempty"`
20391990
}
20401991

2041-
// UpdateUserStorageResourceOptions is the UpdateUserStorageResourceOptions message type
2042-
type UpdateUserStorageResourceOptions struct {
2043-
Content string `json:"content,omitempty"`
2044-
URI string `json:"uri,omitempty"`
2045-
}
2046-
20471992
// AdditionalUserData is the AdditionalUserData message type
20481993
type AdditionalUserData struct {
20491994
EmailNotificationSettings *EmailNotificationSettings `json:"emailNotificationSettings,omitempty"`

components/gitpod-protocol/go/mock.go

Lines changed: 0 additions & 29 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

components/gitpod-protocol/src/gitpod-service.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,6 @@ export interface GitpodServer extends JsonRpcServer<GitpodClient>, AdminServer,
131131
openPort(workspaceId: string, port: WorkspaceInstancePort): Promise<WorkspaceInstancePort | undefined>;
132132
closePort(workspaceId: string, port: number): Promise<void>;
133133

134-
// User storage
135-
getUserStorageResource(options: GitpodServer.GetUserStorageResourceOptions): Promise<string>;
136-
updateUserStorageResource(options: GitpodServer.UpdateUserStorageResourceOptions): Promise<void>;
137-
138134
// Workspace env vars
139135
getWorkspaceEnvVars(workspaceId: string): Promise<EnvVarWithValue[]>;
140136

@@ -412,13 +408,6 @@ export namespace GitpodServer {
412408
/* this is here to enable backwards-compatibility and untangling rollout between workspace, IDE and meta */
413409
dontWait?: boolean;
414410
}
415-
export interface GetUserStorageResourceOptions {
416-
readonly uri: string;
417-
}
418-
export interface UpdateUserStorageResourceOptions {
419-
readonly uri: string;
420-
readonly content: string;
421-
}
422411
export interface GetTokenSearchOptions {
423412
readonly host: string;
424413
}

components/server/src/auth/rate-limiter.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,6 @@ const defaultFunctions: FunctionsConfig = {
8585
getOpenPorts: { group: "default", points: 1 },
8686
openPort: { group: "default", points: 1 },
8787
closePort: { group: "default", points: 1 },
88-
getUserStorageResource: { group: "default", points: 1 },
89-
updateUserStorageResource: { group: "default", points: 1 },
9088
getWorkspaceEnvVars: { group: "default", points: 1 },
9189
getAllEnvVars: { group: "default", points: 1 },
9290
setEnvVar: { group: "default", points: 1 },

0 commit comments

Comments
 (0)