903 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
Anton Kosyakov
521e6a5aab
[dashboard] use HTTP endpoint for telemetry (#19223)
* [dashboard] use HTTP endpoint for telemetry

* 💄

---------

Co-authored-by: Jean Pierre <jeanpierre@gitpod.io>
2023-12-12 14:56:19 +02:00
Huiwen
633f9915fc
Migrate instanceUpdate on service.tsx (#19213)
* Migrate instanceUpdate on service.tsx

* Remove useless code

* Fix build
2023-12-08 13:14:15 +02:00
Pudong
6ecc991ff5
[experimental] add ssh certificate authorities as feature flags (#19208) 2023-12-07 22:59:14 +02:00
Alex Tugarev
e4ccbf0b4d
GetAuthenticatedUser in Dashboard (#19142)
* [dashboard] remove unused service mock

* [dashboard] use `GetAuthenticatedUser` instead of `getLoggedInUser`

* fixup: override workspaceAutostartOptions

also fix toDurationString call

* fixup: move `isOnboardingUser` to dashboard

* fixup: move getProfile from protocol to common

* fixup fromWorkspaceAutostartOption

* move getPrimaryEmail to common and clean up

* rm getProfile from protocol, use ProfileDetails

* fixup missing leeway dependencies

* fix getPrimaryEmail

* fix resetting workspace timeout

* [gitpod-db] remove dependency to `@gitpod/public-api-common`

* cleanup BUILD.yaml
2023-12-06 17:42:14 +02:00
Anton Kosyakov
5a55a7a6ff
[dashboard] proactively reconnect grpc streams (#19185) 2023-12-04 16:05:11 +02:00
Filip Troníček
7bcc749da0
Configuration Variables page (#19128)
* `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

* 🤷‍♂️

* init

* Remove method present in upstream

* newlines and imports

* Address env var API changes

* fixies

* Fix list query key

* Fix for new router

* Fix list vars key? 🤷‍♂️

* Simplify return

* Adding stuff

* Add path

* Single variable component

* Use mutation callbacks for success and errs

* Typography and layout

* Do not store variable data in-browser

* Edit variable modal

* De-center

* Small fixes with admission init

* Spacing and alignment of menu items

* 🤷‍♂️

* Error reporting for creation/edit

* Update copy

* Verboserer output

* Fix missing argument 😱

* Pass in all properties of variables

* Provide ID when updating

* Fix changing admission

* Simplify

* Update table copy

* Text sizes

* Format

* Typo

* rename

* Simplify

* Copy update

* Rename comp

* Duplicate error printing

* Use `TextInputField`!

* Clean up TextInputField

* Break instead of truncate

* Fixed width table headers

Co-authored-by: Brad Harris <bmharris@gmail.com>

* Simplify route setup

---------

Co-authored-by: Brad Harris <bmharris@gmail.com>
2023-12-02 00:31:09 +02:00
Anton Kosyakov
2f14d7a2fe
decouple gitpod-protocol from public-api (#19151)
to prevent rebuilding of components which dependent on gitpod-protocol, but not public-api on an API change
2023-11-29 10:36: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
Anton Kosyakov
180f648782
[dashboard] enable grpc migration per service (#19140) 2023-11-27 10:42:04 +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
Alex Tugarev
79666cd24d
[dashboard] Use SCM Service (gRPC) (#19101)
* [dashboard] Use SCM Service (gRPC)

* address review comments

* bump cache version
2023-11-22 18:26: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
Anton Kosyakov
70517fbd5a
[dashboard/server] app error conversion based on error details (#19103) 2023-11-22 17:49:59 +02:00
Alex Tugarev
612b919699
[server] Extract ScmService to be used by both APIs (#19098)
* [server] add ScmService to be used by ScmServiceAPI (and WS API)

* add simple test for `getToken`

* refactor `ScmService.getToken` to return token of undefined

* fix duplicata validation

* add api converter tests

* just some docs
2023-11-22 16:27:00 +02:00
Sven Efftinge
602fd5edcb
[build] fix tsconfig (#19111) 2023-11-22 10:10:59 +02:00
Sven Efftinge
6ff405b964
[build] make build incremental (#19106) 2023-11-22 08:17:00 +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
Alex Tugarev
3b85bf13e1
[server] remove unused getFeaturedRepositories (#19100) 2023-11-21 16:42:59 +02:00
Gero Posmyk-Leinemann
9be1fec2c0
[ts] Add metric gitpod_logs_total(level) for TS components (#19093) 2023-11-21 16:39:59 +02:00
Jean Pierre
4ac04ee19e
[public-api] Migrate envvarService (#19067)
* Migrate envvarService

* update

* fix tests

* nit

* Fix

* Fix

* 💄

---------

Co-authored-by: Huiwen <mhqnwt@gmail.com>
2023-11-20 17:27:57 +02:00
Alex Tugarev
4b78a99f20
Remove obsolete New Project page (#19077)
* [dashboard] Remove New Project page

* remove unused query

* [server] make unused getProviderRepositoriesForUser a no-op

* [server] remove unused scm provider code
2023-11-17 12:12:54 +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
Alex Tugarev
21bb3c1d55
Use AuthProviderService API in Dashboard – EXP-847 (#19057)
* convert Login.ts

* extract auth provider utils into protocol

* complete migration from useAuthProviders to  useAuthProviderDescriptions

* fixup import of scopes util

* revert rename

* migrate useDeleteOrgAuthProviderMutation

* migrate Org Git Integrations

* fix label for authprovider types

* wip migration user-level git integrations

* WIP updateProviderEntry

* wip migration

* fixup: label of auth provider types

* fixup: dont render Unknown type

* fix label

* fix this undefined

* bump CACHE_VERSION

* fixup allow to change the `clientId` only

* fixup add AuthProviderClasses to supported messages

---------

Co-authored-by: Huiwen <mhqnwt@gmail.com>
2023-11-16 17:53:54 +02:00
Gero Posmyk-Leinemann
453392bd14
[server] Introduce RequestContext (#19023)
* [server] Introduce RequestContext

* [server] Improve (repeated) Docker build times

* fix AuthProviderService.createAuthProvider
2023-11-16 14:54:54 +02:00
Alex Tugarev
feb9fa2597
🌇 GitHub App in Dashboard (#19070)
* [dashboard] compute `useIsGithubAppEnabled` on FE

* [dashboard] update Install GitHub App

* [server] make GH App methods no-op (compat)
2023-11-16 13:18:54 +02:00
Alex Tugarev
0907ff51e1
[server] remove obsolete and unused getSuggestedContextURLs (#19074)
* [server] remove obsolete and unused `getSuggestedContextURLs`

* fixup papi
2023-11-16 13:17:54 +02:00
Brad Harris
eaae6cc6f4
Repository Config list page (#19039)
* fixing pagination logic

* wip

* flushing out rows

* adding missing creationTime

* adjusting result count copy

* fix offset... again

* Flushing out table UI a bit more

* Flushing out table UI a bit more

* comment for remembering to use search params

* more comments

* fix pages count

* copy/responsive adjustments

* updating search project query & service

* pass org id along and check permission in service

* Extracting table components

* cleanup

* fix menu copy
2023-11-14 18:49:52 +02:00
Alex Tugarev
aa691ddf01
Remove Prebuild Events page and jsonrpc methods (#19069) 2023-11-14 14:13:52 +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
Christian Weichel
bb51f07988
Collect workspace classes from workspace cluster (#19003)
* Extend ws-manager API to support workspace class descriptions

fixes ENG-1065

* Extend  DescribeCluster in ws-manager-mk2

to acurately report the available workspace classes

fixes ENG-1066

* Add workspace classes to cluster in DB

* Intergrate workspace cluster collection in ws-manager-bridge

* Feature flag off discovered workspace class usage

* Fix build

* Add unittest for getSupportedWorkspaceClasses

* Fix workspace class storage

* Adress review feedback
2023-11-10 13:13:48 +02:00
Alex Tugarev
b2d501842f
[server] move FGA calls into AuthProviderService (#19017)
* [server] move FGA calls into AuthProviderService

* split internal upsert method `updateAuthProvider` into create and update
* refactor: move `getAuthProviders` logic from gitpod-server-impl to auth-provider-service
* adding db tests for auth provider server
* use redacted results in service

* Fix typos

* extract helper functions for scopes

* add more tests

* as regular member, should find org-level providers if no built-in providers present
* as regular member, should find only built-in providers if present

---------

Co-authored-by: Huiwen <mhqnwt@gmail.com>
2023-11-10 10:25:47 +02:00
Sven Efftinge
4de380534b
[usage] export creation and stopped time (#19047) 2023-11-09 14:59: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
Sven Efftinge
4c35db7587
Add "more elements" hint to repo search. (#19016) 2023-11-06 23:41:45 +02:00
Sven Efftinge
f6bf401d38
[dashboard] use organization v2 shapes (#18970) 2023-11-06 15:18:44 +02:00
Anton Kosyakov
0e8f0de8c4
[jb] mark as stable in .gitpod.yml (#18991) 2023-11-01 10:35:39 +02:00
Sven Efftinge
ae38d86476
[linting] Enable eslint/no-unsafe-argument (#18965) 2023-10-23 12:20:31 +03:00
Christian Weichel
323fc19826
[supervisor] Don't panic if connection is already closed (#18956) 2023-10-19 11:50:26 +03:00
Sven Efftinge
c46f9bf73c
[server] implement organization API (#18948) 2023-10-19 11:45:27 +03:00
Anton Kosyakov
c7f8c35f64
[dashboard] integrate v2 WorkspaceService.getWorkspace (#18884) 2023-10-18 11:50:25 +03:00
Filip Troníček
36071e6bee
Privacy policy update alert (#18852)
* Privacy policy update alert

* Update user

* -

* Update copy

* Fix up styles

* End with a period

* Update copy

* donotmerge: disable auto-acceptance for testing purposes

* Address code review

Co-authored-by: Brad Harris <bmharris@gmail.com>

* Remove unused imports

* Update privacy policy effective date

* Remove unused type

---------

Co-authored-by: Brad Harris <bmharris@gmail.com>
2023-10-17 23:16:25 +03:00
Huiwen
35d47fef6b
Fix incorrect start workspace url (#18934) 2023-10-17 14:43:25 +03:00
Anton Kosyakov
cf7d0e9500
remove supervisor_live_git_status (#18921)
and deprecated instance.status.repo
2023-10-16 17:20:24 +03:00
Brad Harris
2be4c6e260
Drop project name from project urls (#18909)
* drop project name from url

* drop comment

* handle undefined params

* remove Project.slug()
2023-10-12 19:35:20 +03:00
Sven Efftinge
1d3fe33e0c
[server] (re)move deprecated properties (#18894) 2023-10-10 14:12:18 +03:00
Gero Posmyk-Leinemann
5bf82cd20d
Move towards sync deletion (away from PeriodicDeleter) - step II/II (#18866)
* [db] DBTeam: drop deleted column (unused)

* [db] DBProject: drop deleted column (unused)

* [db] Drop table d_b_user_storage_resource

* [db] DBTokenEntry: drop deleted column (unused)

* [db] DBAuthProviderEntry: drop deleted column (unused)

* [db] DBGitpodToken: drop deleted column (unused)

* [db] DBTeamMembership: drop deleted column (unused)

* [db] DBProjectUsage: drop deleted column (unused)

* [db] DBUserSshPublicKey: drop deleted column (unused)

* [server] Fix flaky test

* [db] Make backwards-compatible to mysql 5.7
2023-10-06 09:59:14 +03:00