984 Commits

Author SHA1 Message Date
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
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
Brad Harris
89af3c0871
Adding searchRepositories jsonrpc method (#18827)
* adding searchRepositories method w/ github impl

* fix a few things and add bbs impl for searchRepos

* integrate searchRepositories in RepositoryFinder

* adjusting loading indicators

* cleanup

* wrap repository search behind feature flag

* Changing queries for github repo search

* fix enabled to use debounced value

* fix org filters

* drop variables for query

* fixing encoding
2023-09-29 22:28:08 +03:00
Alex Tugarev
d897a6c57b
Add deprecation note to github node in .gitpod.yml (#18788) 2023-09-29 17:08:08 +03:00
Gero Posmyk-Leinemann
8d94dd8d01
Use User.fgaRelationshipsVersion instead of User.additionalAttributes.fgaRelationshipsVersion (#18838)
* [db] Add User.fgaRelationshipsVersion

* [server] Use User.fgaRelationshipsVersion
2023-09-29 09:34:07 +03:00
Kyle Brennan
3c4818f017
[ci] wait 5m on publish to yarn register before timing out (#18830)
This times out in 100 seconds, and is causing failures for builds in main.

Maybe it needs more time.
2023-09-28 01:23:06 +03:00
Manuel Alejandro de Brito Fontes
8ef82ff356
Update go modules to 1.21 (#18805) 2023-09-26 17:52:05 +03:00
Sven Efftinge
14a21a7657
[projects] lookup projects by id not cloneURL (#18774) 2023-09-25 11:13:04 +02:00
Anton Kosyakov
34443431b1
add ws client metrics (#18773) 2023-09-22 16:56:01 +02: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
Gero Posmyk-Leinemann
af88bed373
[server, dashboard] Remove api.maySetTimeout (+ code cleanup in User- + EntitlementService) (#18769)
* [dashbaord, server] Remove api.maySetTimeout

* [server] Remove dead code in Entitlement- and UserService

* review comments
2023-09-22 11:03:01 +02:00
Huiwen
181c983405
[server,dashboard] verify image accessibility when updating org workspace image setting (#18747)
* [server] verify image accessibility before update settings

* [dashboard] update org settings page

* fixup disable button for members

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

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

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

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

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

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

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

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

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

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

* hid change button for members

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

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

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

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

* update image hint

* Add description to WorkspaceImageButton

* Lighter description

* render desc list

---------

Co-authored-by: George Tsiolis <tsiolis.g@gmail.com>
Co-authored-by: Filip Troníček <filip@gitpod.io>
2023-09-20 23:01:59 +02:00
Gero Posmyk-Leinemann
e5d03e12c5
[WorkspaceStarter] Fail instance on all errors (#18745)
* [server] Tone down EntitlementService logs: error to warn

* [server] Make sure to fail a WorkspaceInstance on any error

* [WorspaceStarter] Don't fail on temporary gRPC errors
2023-09-20 14:02:59 +02:00
Huiwen
a2b5b00db1
[server,dashboard] improve org default image input placeholder (#18746)
* [server,dashboard] improve org default image input placeholder

* fix build failed

* Use null instead of `NULL_TO_UNDEFINED`

* fixup

* fixup toast not shown
2023-09-20 10:03:59 +02:00
Brad Harris
0bc9cb3c6e
Add projects to repository finder (#18706)
* adding repository name

* updating options a bit

* add repositoryName to the response

* update styling

* updating sorting for getSuggestedRepositories and adding tests

* update sorting logic

* tweaking sorting more

* don't show middot when no name is available

* rename type for consistency

* adding aria label

* prioritize projects above user repos

* handle selected projects better

* fix gray icon color
2023-09-19 16:38:58 +02:00
Huiwen
04e576fbe0
Add default workspace image to org setting (#18723)
* Add default workspace image to org setting

* [db] add migration

* fixup

* [dashboard] add org default image settings

* fixup

* dashboard fixup

* Add server image test TODO

* [server] assign global workspace default image

* [dashboard] allow to submit empty string (will fallback to global default)

* [gp-cli] support gp validate with default image

* [dashboard] save default image

* fixup

* fixup

* [gp-cli] improve output

* [gp-cli] improve gp init

* [gp-cli] gp validate compatibility

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

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

* Remove org id / get org settings in supervisor

* Remove `WorkspaceConfigContext`

* Add unit tests

* Rename to `DefaultWorkspaceImage`

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

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

* Add empty image fallback to supervisor

* Fix default workspace image setup

* Update org settings fields

* fixup

* Allow empty image to set to default one

---------

Co-authored-by: Filip Troníček <filip@gitpod.io>
Co-authored-by: George Tsiolis <tsiolis.g@gmail.com>
2023-09-19 14:51:58 +02:00
Alex Tugarev
0189623c4b
🧹 Update mocha and remove resolutions (#18736)
* remove resolutions in root package.json

update mocha to avoid pulling in minimatch@3.0.4

* adjust mocha config

* also consider *.spec.db.*

* re-add missing exclude of node_modules

* remove recursive

* fix mocha execution
2023-09-19 09:22:58 +02:00