-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[server] don't error on project not_found #18400
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM ✅
@svenefftinge Do you want me to do some testing as well or did you already do so?
@@ -1593,9 +1607,6 @@ export class GitpodServerImpl implements GitpodServerWithTracing, Disposable { | |||
const user = await this.checkAndBlockUser("getPrebuildEvents"); | |||
|
|||
const project = await this.projectsService.getProject(user.id, projectId); | |||
if (!project) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed these unnecessary checks, as getProject already throws that error
if (project && project.teamId) { | ||
metadata.setTeam(project.teamId); | ||
} | ||
metadata.setTeam(workspace.organizationId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need to fetch the project as we have the org id on the workspace
I did not, but will do when the preview env is up |
d4bb555
to
746e0b2
Compare
746e0b2
to
22ad9e3
Compare
@@ -844,17 +844,6 @@ export class GitpodServerImpl implements GitpodServerWithTracing, Disposable { | |||
await this.userDeletionService.deleteUser(user.id); | |||
} | |||
|
|||
private async getTeamMembersByProject(projectId: string | undefined): Promise<TeamMemberInfo[]> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was unnecessariuly going through project. We now have an organizationId on workspaces so I replaced these with organizationService.listMembers
.
/unhold |
Description
We need to handle the not_found error during when projects are actually optional, i.e. during workspace start.
Related Issue(s)
Fixes WEB-628
How to test
Documentation
Preview status
Gitpod was successfully deployed to your preview environment.
Build Options
Build
Run the build with werft instead of GHA
Run Leeway with
--dont-test
Publish
Installer
Add desired feature flags to the end of the line above, space separated
Preview Environment / Integration Tests
If enabled this will build
install/preview
If enabled this will create the environment on GCE infra
Valid options are
all
,workspace
,webapp
,ide
,jetbrains
,vscode
,ssh
. If enabled,with-preview
andwith-large-vm
will be enabled./hold