-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[dashboard] integrate v2 WorkspaceService.getWorkspace #18884
Conversation
5522f52
to
0e146dd
Compare
df9024b
to
9f8afad
Compare
9f8afad
to
20a6d13
Compare
/gh run recreate-vm=true Comment triggered a workflow runStarted workflow run: 6531719748
|
db84465
to
ef8fe77
Compare
3f8d83b
to
17a2c6a
Compare
const metadata: HeadersInit = {}; | ||
metadata[applicationErrorCode] = String(reason.code); | ||
metadata[applicationErrorData] = JSON.stringify(reason.data); | ||
if (reason.code === ErrorCodes.NOT_FOUND) { |
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.
🧡
@@ -57,6 +57,8 @@ | |||
"exit": true | |||
}, | |||
"dependencies": { | |||
"@connectrpc/connect": "1.1.2", | |||
"@gitpod/public-api": "0.1.5", |
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.
Hm, this dependenciy feels a bit weird. What's the reason to not put the converter into the typescript lib exported by public-api? 🤔
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.
You mean reverse dependency? I don't think public-api should pull gitpod-protocol.
We need some place where we share converter between dashboard and server.
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.
Yes, probably not the single package that we have there now that contains the connect types.
But maybe having a separate one next to it... not sure if it's worth it though. Also can't pinpoint why it feels weird to me. 🙃
private readonly apiConverter: PublicAPIConverter; | ||
|
||
async getWorkspace(req: GetWorkspaceRequest, context: HandlerContext): Promise<GetWorkspaceResponse> { | ||
const info = await this.workspaceService.getWorkspace(context.user.id, req.id); |
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.
Let's talk about context.user
in the sync. IMO we should try to avoid this when implementing the new API. 👍
There is one glitch: When stopping a workspace the displayed status is stuck on "stopping", and never changes to "stopped" (consistently). Dashboard updates fine in parallel, as well as does this on reload. |
Everything else works as expected! 🎉 Nice work @akosyakov ! 💪 |
/gh run recreate-vm=true Comment triggered a workflow runStarted workflow run: 6552203451
|
8a717a9
to
ab9722a
Compare
ab9722a
to
211745a
Compare
@geropl I tried but I could not reproduce it. |
/gh run recreate-vm=true Comment triggered a workflow runStarted workflow run: 6558168925
|
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.
@akosyakov It works now! 🎉
/unhold |
Description
This PR integrates V2 WorkspaceService.getWorkspace in the dashboard. The migration will be done in 2 steps:
Summary generated by Copilot
🤖 Generated by Copilot at 6e11f42
This pull request adds experimental support for a new WorkspaceService API that allows managing workspaces using different RPC frameworks. It introduces a new proto file that defines the service and its messages, and several generated files that provide client and server implementations for Go, TypeScript, and web browsers using Connect, gRPC, and gRPC-Web.
Related Issue(s)
Part of EXP-643
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