-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Migrate CreateAndStartWorkspace method in dashboard #19076
Conversation
3fc7b78
to
4003d1f
Compare
6526f76
to
1d19634
Compare
1d19634
to
ae291ff
Compare
53bc66e
to
bbe8ef2
Compare
@@ -92,4 +99,80 @@ export class WorkspaceServiceAPI implements ServiceImpl<typeof WorkspaceServiceI | |||
response.pagination.total = resultTotal; | |||
return response; | |||
} | |||
|
|||
async createAndStartWorkspace(req: CreateAndStartWorkspaceRequest): Promise<CreateAndStartWorkspaceResponse> { | |||
// We rely on FGA to do the permission checking |
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.
Permission checking is inside WorkspaceService
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.
✔️
@mustard-mh when I click to start a workspace from Prbuild it does not seem to start it automatically. I had a feeling it will before. Maybe I'm wrong. |
components/dashboard/src/data/workspaces/start-workspace-mutation.ts
Outdated
Show resolved
Hide resolved
components/dashboard/src/data/workspaces/list-workspaces-query.ts
Outdated
Show resolved
Hide resolved
@akosyakov checked with Cloud, it will not start automatically too (we control whether to start it automatically via a param in URL) |
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.
I tested only JSON-RPC shim. It seems to work well for common scenarious. I left a question about starting a worksapce from prebuild, but maybe it is the same on main.
Please have a look at comments, add tests and address comments and merge as you think it fits.
ed9c41a
to
96ad968
Compare
@mustard-mh do you need anything else to land it? |
@akosyakov It's too hard to add unit tests, it takes me hours (). I just added it |
@akosyakov Tests is based on context-parser is correct, so I rebind related stuff inside |
@mustard-mh if we just moved stuff and did not change much it is fine to skip. I did not imply you need to add tests for everything only for things which we rather changed, please find a balance 🙏 |
e9df853
to
9e84b3d
Compare
Rebased to main, let's unhold after final test |
978cd5e
to
0ce5ef7
Compare
Tested in preview env ✅ /unhold |
Description
Proto is based on internal doc
Summary generated by Copilot
🤖 Generated by Copilot at 748f008
This pull request adds new public API methods for creating and starting workspaces using the connect and gRPC protocols. It updates the
workspace.proto
file and the corresponding TypeScript and Go files with the new RPC methods and message types. It also implements the new methods in the connect client and server handlers and the gRPC server handler. The purpose of this pull request is to enable the public API to interact with the workspace's port management and tunneling features.Related Issue(s)
Fixes #
How to test
It should be able to create/start workspace from
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
Saves cost. Untick this only if you're really sure you need a non-preemtible machine.
Valid options are
all
,workspace
,webapp
,ide
,jetbrains
,vscode
,ssh
. If enabled,with-preview
andwith-large-vm
will be enabled./hold