165 Commits

Author SHA1 Message Date
Huiwen
653d858fa8
Add org-level workspace class restrictions (#19191)
* Add org-level maxmium workspace class limit

* [papi] add ListOrganizationWorkspaceClasses method

* Use papi in dashboard

* Validate when updating

* Fix bug

* Make it select default

* Align figma

* Option checking

* fixup

* Use switch button

* Add feature flag

* `invaldiator2` => `invalidateWorkspaceClasses`

* Don't allow to all if selected ones are removed from installation

* Update respond error msg

* dashboard show error msg

* fixup

* update proto doc

* Apply suggestions from code review

Updated error wording.

* update order

* Fix edge case

* Hide delete scope if not owner

* Update error msg

* Not cache org ws cls

* Force update org info

* Rename query file

* Add todos

* Remove refetch

---------

Co-authored-by: Filip Troníček <filip@gitpod.io>
Co-authored-by: Laurie T. Malau <laurie@gitpod.io>
2023-12-15 08:48:22 +02:00
Alex Tugarev
298dbe39da
[papi] Add RPCs for Admin pages (#19243) 2023-12-13 09:19:20 +02:00
Huiwen
6bc27b8d98
Migrate resolve context url (#19222)
* Implement and migrate resolve context url

* Migrate dashboard

* Update golden

* Fix bugs

* Rebase fixup
2023-12-12 10:16:19 +02:00
Huiwen
0b1e5d43cb
Migrate workspaceService updatePort method (#19234)
* Migrate workspaceService updatePort method

* fix build

* fixbuild
2023-12-11 16:28:18 +02:00
Alex Tugarev
eedcf89bbb
[papi] Update UserService proto (#19231)
* [papi] Add UserService.DeleteUser

* [public-api] add missing `UpdateUserRequest.dotfile_repo` attribute

* fix: add unimplemented methods
2023-12-11 13:18:18 +02:00
Brad Harris
85fb744996
Adding prebuild status filter to repo configs list ui (#19205)
* Adding prebuildsEnabled filter to projects search query

* adding prebuilds_enabled param

* stubbing out UI for prebuild status filter

* mark prebuilds_enabled as optional so we have an undefined state

* ui stuff

* whoopsie

* drop animations for now

* comments

* cleanup

* convert to string

* consider prebuild filter in showing table

* add prebuilds query param

* fix issue w/ fragment around routes preventing 404 handler
2023-12-08 20:57:15 +02:00
Anton Kosyakov
bfa7c6e070
[public-api] complete installation service (#19200) 2023-12-08 14:05:15 +02:00
Huiwen
da125ed40b
Migrate InstallationService GetInstallationWorkspaceDefaultImage method (#19221) 2023-12-08 13:15:15 +02:00
Huiwen
bb2473e886
Migrate WorkspaceService snapshot methods (#19204)
* Migrate WorkspaceService snapshot methods

* Add test cases

* Remove list snapshots
2023-12-07 15:51:14 +02:00
Huiwen
0152b84a80
Migrate gRPC workspaceService other workspace related method (#19118)
* Migrate gRPC workspaceService other workspace related method

* Use shim and gRPC everywhere

* fix update
2023-12-06 12:42:13 +02:00
Huiwen
39ebf1d2ca
Revert Refine workspace and fix bugs (#19178)
* Revert "Revert "Refine workspace API (#19138)" (#19172)"

This reverts commit a6f472255601ecd7574d33ae3015ea1c184b47d5.

* Update to workspace cases

* Add new cases and fix

* Add timeout

* fixup

* Remove requirement of editor

* Update cases

* Bump version

* Update dashboard
2023-12-04 12:36:11 +02:00
Huiwen
a6f4722556
Revert "Refine workspace API (#19138)" (#19172)
This reverts commit da0c5901b4af15a3584d5c5d6b80380f0c093855.
2023-11-30 12:14:07 +02:00
Jean Pierre
a997229da8
[public-api] Add installation service (#19150)
* Add installation service

* Fix dashboard

* Fix

* Fix

---------

Co-authored-by: Huiwen <mhqnwt@gmail.com>
2023-11-30 01:12:07 +02:00
Christian Weichel
da0c5901b4
Refine workspace API (#19138)
* Refine workspace API

* Fix build

* update proto

* fix rebase

* fix rebase - 2

* 1

* fix editor

* Update doc

---------

Co-authored-by: Huiwen <mhqnwt@gmail.com>
2023-11-29 16:15:07 +02:00
Alex Tugarev
88d65c186f
[papi] Add UserService/UpdateUser to proto (#19163)
* [papi] Add `UserService/UpdateUser` to proto

* extract SetWorkspaceAutoStartOptions
2023-11-29 16:08:06 +02:00
Huiwen
d6dcda8a3e
Migrate parts of gPRC workspaceService (#19129)
* Migrate parts of WorkspaceService

* bump version
2023-11-29 12:28:07 +02:00
Huiwen
0acd42e106
Migrate gRPC VerificationService (#19143)
* Implement

* use on dashboard

* Add test case

* fixup

* fix build

* Update proto

* Update

* 💄

* 💄

* [verificationservice] added mock impl for previews

---------

Co-authored-by: Jean Pierre Huaroto <jeanp413@hotmail.com>
Co-authored-by: Sven Efftinge <sven@gitpod.io>
2023-11-28 17:56:06 +02:00
Alex Tugarev
4c6cc4fb01
[papi] add user.proto and GetAuthenticatedUser – EXP-845 (#19132)
* [papi] add user.proto and GetAuthenticatedUser

* [papi] (generate.sh) Run end-of-file-fixer

* rename to EditoSettings

* clean up proto

* fix import

* update WorkspaceTimeoutSettings

* fix typo

* update WorkspaceTimeoutSettings

* clarify User.name is full name in doc line
2023-11-28 12:42:06 +02:00
Jean Pierre
c201a2d9df
[public-api] migrate ssh service (#19110)
* migrate ssh service

* 💄

* 💄

* fix build

* Fix

---------

Co-authored-by: Huiwen <mhqnwt@gmail.com>
2023-11-23 07:12:00 +02:00
Huiwen
fa3cca46c0
Migrate CreateAndStartWorkspace method in dashboard (#19076)
* Migrate WorkspaceService.CreateAndStartWorkspace

* Add unit tests

* Fix rebase build error
2023-11-22 18:23:59 +02:00
Alex Tugarev
9374be99f7
[papi] Rename SearchSCMTokens RPC (#19104)
* [papi] rename to SearchSCMTokens

* doc RPCs
2023-11-22 12:17:00 +02:00
Brad Harris
73a1c76985
Add sorting to imported repos list and corresponding API (#19097)
* adding sorting support for ListConfigurations

* Getting sortable headers partially setup

* killing the global button styles

* Updating sortable headers

* cleanup

* adding comment about sort field

* Update components/dashboard/src/app/Blocked.tsx

Co-authored-by: Filip Troníček <filip@gitpod.io>

* Update components/dashboard/src/components/Button.tsx

Co-authored-by: Filip Troníček <filip@gitpod.io>

* Update components/dashboard/src/components/podkit/buttons/Button.tsx

Co-authored-by: Filip Troníček <filip@gitpod.io>

* Update components/dashboard/src/components/toasts/Toast.tsx

remove redundant styles

Co-authored-by: Filip Troníček <filip@gitpod.io>

* Update components/dashboard/src/components/podkit/tables/SortableTable.tsx

Co-authored-by: Filip Troníček <filip@gitpod.io>

* Update components/dashboard/src/usage/UsageDateFilters.tsx

remove redundant style

Co-authored-by: Filip Troníček <filip@gitpod.io>

* Update components/dashboard/public/complete-auth/index.html

Co-authored-by: Filip Troníček <filip@gitpod.io>

* extracting to a local LoginButton component

* whoopsie

---------

Co-authored-by: Filip Troníček <filip@gitpod.io>
2023-11-22 00:08:59 +02:00
Jean Pierre
4aef5ceb84
[public-api] Some renaming (#19095)
* 💄

* 💄

* 💄
2023-11-22 00:07:59 +02:00
Filip Troníček
6f7ff4f7f4
updateConfiguration (#19080)
* `updateConfiguration`

* typdate

* Try with no deeply nested property

* JKADFkosaNcISADFuisabnfhjl hjkafb ashjdbjbhj

* Constrain even further

* Return the configuration

* Fix update mutation

* Only update necessary properties

* Implement name changes

* typastuff

* 🙄

* Mutation update

* 🤷‍♂️

* Type fixes

* Conditionally pass in name

* Partials

* Fix type mishap

* Update mutation name

* Tweak types

* Reduce abstractions

* Only supply name if applicable

* Better partial assignment

* Deepmerge with originals

* Only update fully when necessary

* Fix name conversion in papi converter

Co-authored-by: Gero Posmyk-Leinemann <32448529+geropl@users.noreply.github.com>

* Assert some converted properties to not exist

* Disallow empty configuration names

* Add cache update todo

* fix type vs class

* Error toasts

* Be less strict about value of name

* Toast the actual updated name

* Fix tests :-)

---------

Co-authored-by: Gero Posmyk-Leinemann <32448529+geropl@users.noreply.github.com>
2023-11-21 22:42:00 +02:00
Anton Kosyakov
6933bab2b6
[public-api] migrate PrebuildService (#19062) 2023-11-21 17:14:58 +02:00
Anton Kosyakov
0a5d89cecc
[public-api] define error details (#19102)
+ ensure consistent formatting
2023-11-21 16:00:58 +02:00
Alex Tugarev
41a89f34f9
[papi] Add proto for SCMService (#19075)
* [papi] Add proto for SCMService

* fixup: add missing pagination to list method
2023-11-21 13:40:58 +02:00
Brad Harris
a409eb0792
Adding pagination tokens for config service (#19078)
* wip for getting pagination tokens setup

* swapping pagination for token based load more UI

* disable refetch on window focus

* partially working infiniteQuery

* updating proto files for pagination

* updatnig pagination to handle load more approach

* adding bottom margin

* adding tests

* encode search term query param

* validate params

* change button variant

* making sure we don't drop some props

* Update components/dashboard/src/data/configurations/configuration-queries.ts

Co-authored-by: Filip Troníček <filip@gitpod.io>

---------

Co-authored-by: Filip Troníček <filip@gitpod.io>
2023-11-20 17:09:58 +02:00
Jean Pierre
9748ce3c1e
[public-api] Add ssh key proto (#19090)
* add ssh key proto

* Update
2023-11-20 15:09:58 +02:00
Jean Pierre
f7e11f50ef
Add envvar proto file (#19085) 2023-11-17 10:52:55 +02:00
Huiwen
4324fcb0a0
[papi] migrate ListWorkspaces and WatchWorkspaceStatus (#19022)
* [papi] migrate ListWorkspaces and WatchWorkspaceStatus

* bump up cache version
2023-11-16 20:44:54 +02:00
Anton Kosyakov
a290b8b7d3
[public-api] define PrebuildService (#19082) 2023-11-16 15:10:54 +02:00
Anton Kosyakov
0ec003754e
[public-api] align with API guidelines (#19038) 2023-11-14 13:09:51 +02:00
Alex Tugarev
0e00e3daa1
[public-api] Add AuthProviderService service (#19008)
* add Unauthenticated decorator for public-api

* [server] add AuthProviderServiceAPI

* [dashboard] add client facade (JsonRpcAuthProviderClient)

* use uuidValidate

* update UpdateAuthProviderResponse to return provider

* return updated provider in UpdateAuthProviderResponse

* handle pagination for ListAuthProvider(Description)s

* add simple conversion tests for auth providers

* relax param validation on updateAuthProvider

allow to update clientId or clientSecret separately.
2023-11-13 15:38:51 +02:00
Wouter Verlaek
185c0428c2
[scrubber] Improve KeyValue performance (#19052)
* [scrubber] Improve KeyValue performance

* Update benchmark comment

* update go mod

* Add metaID to hashed fields

---------

Co-authored-by: Pudong Zheng <pudong@gitpod.io>
2023-11-10 16:17:48 +02:00
Alex Tugarev
f38e12e758
add authprovider.proto to public-api (#19041)
* add authprovider.proto to public-api

* update proto according to guidelines
2023-11-10 11:26:47 +02:00
Brad Harris
df7929ce8a
Adding ConfigurationServiceAPI (#19020)
* adding ConfigurationServiceAPI

* binding config service api to server

* use getConfiguration in dashboard

* adding missing binding

* use ApplicationError's

* add protobuf classes to query client hydration

* fixing pagination param & query

* changing to import statements for consistency and clarity on what the imports are for

* cleanup

* dropping config settings for create for now

* use protobuf field names in error messages

* removing optional on fields

* fixing converters to account for non-optional (undefined) fields

* update test

* adding more tests for findProjectsBySearchTerm

* fixing test to use offset correctly

* convert pagination args correctly
2023-11-08 22:42:46 +02:00
Huiwen
70a0f126a8
[papi] add watchWorkspace API (#19010)
* [papi] add watch workspace status api

* update import

* 1

* debug commit

* Add workspace_id to proto

* Add unit test for async generator

* Update usage of func

* update test cases

* fix json rpc watch

* 1

* remove test commit and fix missing field
2023-11-08 17:24:46 +02:00
Filip Troníček
e51d974c52
Local App v2 :) (#18971)
* Local App v2 :)

* bind variables correctly

* Play around with units

* Port more commands over

* Separate commands (1 per file)

* `gitpod workspace delete`

* Extract login

* Show help text when run without a command

* Fix login

* `gitpod logout`

* Simple logging

* Remove unused import

* Make host use consistent

* Fix GetToken

* Split distribution

* 🤷‍♂️

* Fix paths 🤷🤦

* Change URL of binaries

* Fix proxy binary handling

Co-authored-by: Pudong <tianshi8650@gmail.com>

* Improve logging

* Change workspace list to be up-to-spec

* `gitpod organizations list`

* Simplify table code

* `gitpod workspace get`

* Created at

* `gitpod organization get <id>`

* Hide open for now

* `workspace start --ssh`

* `ws start --open`

* server: OAuth client

* Use OAuth app

* logs

* `gitpod workspace create`

* Rename to follow singular noun semantics

* Fix nil pointers in list and go cmds

* `--field` for `gitpod organizations list`

* `gitpod ws list --field`

* Simplify some of the ws code

* Unify WS data structure

* Allow opening browser-based WSs

* `gitpod workspace open`

* Constants package to get rid of circular dependency issues

* No config file by default

* Guidance when missing in path

* Fix local companion maybe 🤷‍♂️

* Create wait for start by default

* Align scopes

* KeychainName constant

* Provide token via flag instead

* Host in scope error lookup message

* 🤷‍♂️

* Name for consistency

* Editors in go client of papi

* `gitpod workspace list-classes`

* `gitpod config`

* Infer orgs if applicable

* Remove redundant error log

* Retry mechanism for streaming

* More useful error message for unauthed

* README update

* Allow `function:getTeam`

* return org inference errors properly

* Replace config with context

* Fix config file path

* Wrap up pretty printer

* Name changes

* Remove unused vars

* 🇺🇸

* Update README

* Fix login

* [local-app] Add whoami command

* [local-app] Add context management

* Refactor common package

* Harmonise output and formatting

* Add error resolution support

* Improve resolution printing

* Add apology for system exceptions

* Add class resolutions

* Apologise more

* Add unknown field resolution

* Add better login context name

* Make it build

* `gitpod workspace list-editors`

* Fix multiple ws IDs for `ws get`

* Simplify open code

* Update local-app README with usage instructions

* Help for editor options

* Remove unused config code

* Call workspace ID field ID instead of workspace

* Improve long format output

* Fix whoami output

* Streamline workspace listing

* Introduce fancy intro

* Improve set-context feedback

* Remove common package

* Add first unit test

* Harmonise field order

* Consistency across get commands

* Consistency among list command aliases

* Fix column name in whoami

* Fix nil refs for empty hosts

* Make prettyprint writer typesafe

* Add resolutions for no token or no host found

* Fix typo

* Fix CI build

* Properly record org ID on login

* Print orgs in wide format

* Added "workspace up" functionality back in

but hidden

* Make "Git" casing consistent

https://english.stackexchange.com/questions/611711/tech-related-should-i-capitalize-the-word-git-in-this-context-or-not

* Introduce workspace up intermediary

* Fix proxied binary name

---------

Co-authored-by: Pudong <tianshi8650@gmail.com>
Co-authored-by: Christian Weichel (Chris) <chris@gitpod.io>
2023-11-06 16:32:44 +02:00
Sven Efftinge
f6bf401d38
[dashboard] use organization v2 shapes (#18970) 2023-11-06 15:18:44 +02:00
Sven Efftinge
c46f9bf73c
[server] implement organization API (#18948) 2023-10-19 11:45:27 +03:00
Anton Kosyakov
2338184cfb
[public-api] add v2 WorkspaceService.getWorkspace (#18930) 2023-10-17 11:06:25 +03:00
Huiwen
eaef991c83
[papi] add ListTeamMembers and GetTeamInvitation APIs (#18919)
* [papi] add ListTeamMembers and GetTeamInvitation APIs

* fix server build
2023-10-13 18:01:21 +03:00
Brad Harris
0f926eb721
adding missing fields to CreateAndStartWorkspace (#18874)
* adding some missing fields to CreateAndStartWorkspace

* updated mocks
2023-10-06 02:27:14 +03:00
Alex Tugarev
b2260d021e
Migrate Prebuild settings – EXP-672 (#18842)
* [protocol] Add PrebuildSettings to ProjectSettings

* add migration function

* add migration function and test

* update protocol helper functions

* update prebuild manager

* use new prebuild setting in frontend

* update papi

* fix papi test

* rename var

* fix papi mapping

* deprecation note

* update migration function

* fix prebuild-manager

* fixup server

* fix Enable Prebuilds on Project Settings

* Use Project.getPrebuildSettings
and

* fix countUnabortedPrebuildsSince

* improve usage of default settings

* fix Build Branches select

* fix papi conversion 🤯

* don't save empty pattern strings

* fix papi-server conversion and align naming of prebuild settings

* fix getPrebuildSettings

* [prebuilds] changed prebuild semantics

- no more incremental prebuilds
- always incremental workspace
- never wait for running prebuilds

---------

Co-authored-by: svenefftinge <sven@gitpod.io>
2023-10-05 17:37:13 +03:00
Manuel Alejandro de Brito Fontes
8ef82ff356
Update go modules to 1.21 (#18805) 2023-09-26 17:52:05 +03:00
Alex Tugarev
df155ad0e9
Match branch names by pattern – EXP-575 (#18734)
* turn text input into select input

* mimic old behavior for pre-existing projects

* explicit settings under the project should have precedence

* add PrebuildBranchPattern to project settings

* add branch name pattern to project settings page

* fixup c&p error

* match branch names by glob pattern

* fix pattern matching

* fix project settings form

* fix initial value for prebuildBranchPattern

* adding more tests

* add globstar tes

* fixup rebase error

* Apply suggestions from code review

Co-authored-by: George Tsiolis <tsiolis.g@gmail.com>

* fine tune debounce wait

---------

Co-authored-by: George Tsiolis <tsiolis.g@gmail.com>
2023-09-22 13:57:01 +02:00
Alex Tugarev
252992223d
Add prebuildDefaultBranchOnly setting – EXP-574 (#18716)
* add `prebuildDefaultBranchOnly` to `Project.settings`

* evaluate prebuildDefaultBranchOnly in PrebuildManager

* add "Prebuild the default branch only" checkbox

* fix missin PAPI mapping 🤯

* fix PrebuildDefaultBranchOnly in gitpod-service.go

* turn text input into select input

* update styles on project settings page

* mimic old behavior for pre-existing projects

* use getPrebuildBranchStrategy in PrebuildManager

* add tests for PrebuildManager.prebuildPrecondition

* fix getPrebuildEvents

* explicit settings under the project should have precedence

* render changes to project settings immediately
2023-09-22 11:59:01 +02:00
Huiwen
62c573a453
Add default image get to PAPI and improve Dashboard (#18767)
* [server] update getDefaultWorkspaceImage api

* [dashboard] api usage update

* [protocol] add go definition

* [papi] add getDefaultWorkspaceImage method

* fixup

* [dashboard] add org image warning to start workspace page

* fix error wrap

* Update supervisor to use publicApi

* [dashboard] always show default image and remove tag width limit

* fixup

* move new warning to StartPage

* Update components/dashboard/src/teams/TeamSettings.tsx

Co-authored-by: George Tsiolis <tsiolis.g@gmail.com>

* Address feedback

---------

Co-authored-by: George Tsiolis <tsiolis.g@gmail.com>
2023-09-22 11:58:01 +02:00
Anton Kosyakov
352484b34d
node grpc spike dashboard to server (#18691)
* [public-api] add dummy service for testing

* [public-api] proxy dummy to server

* [public-api] hello service server impl

* [server] fix API contribution bindings

* [dashboard] emulate unary call

* only if actually called

* [dummy] auth

* fix tests

* [server] add interceptor to public api

* add server side observability

* fix port name

* change to unimplemented for unknown methods

* [public-api] client metrics

* fix metrics imports

* align server metrics

* actually fix metrics

* add feature flags

* fix server side streams

* [dashboard] hook error reporting

* rebase and fix imports

* feature flagged metrics from dashboard

* revert GRPC_TYPE

* address feedback
2023-09-15 13:46:54 +02:00