781 Commits

Author SHA1 Message Date
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
Sven Efftinge
ae38d86476
[linting] Enable eslint/no-unsafe-argument (#18965) 2023-10-23 12:20:31 +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
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
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
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
cb3a7f00c6
Add "Enable Prebuilds" to Project Settings – EXP-573 (#18698)
* cleanup: remove obsolete remainings of /prebuild prefix

* Add Project.settings.enablePrebuilds

* PrebuildManager.shouldPrebuild to consider Project.settings.enablePrebuilds

* Don't install webhooks on project creation

* foreseeable change: don't prefetch project details

* fix: unused imports

* redirect to project settings on project created

* don't trigger prebuilds on project created

* fix: get rid of many ListProjects requests on Settings page

* Project Settings: add checkbox for "enable prebuilds"

* handle "enable prebuilds" in server

* updating PAPI

* fixup

* fixup

* make PrebuildManager require a Project to work on

* also SCM webhook handlers
* move project usage registration to PrebuildManager

* address feedback on useListProjectsQuery and  useCurrentProject

* remove empty class name attributes

* make use of <InputField> as wrapper for <SelectWorkspaceClassComponent>

* fixup <SelectWorkspaceClassComponent> width

* update hint on "Enable Prebuilds" action

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

* fix "enablePrebuild" handling

* add [Enable Prebuilds] button to "Project Created" page

* show detailed prebuild setting only if prebuilds are enabled

* drive-by: fix max width on "Remove Project"

* fix: re-add `loading` state to `useCurrentProject` hook

this caused an issue with loading components as `useListProjectsQuery.isLoading` is false initially.

* add "Enable Prebuilds" to project card

* fixup project-context.tsx

state should only be updated if `useListProjectsQuery` is loaded.

* fixup button type

* add hint to create a .gitpod.yml

* Apply suggestions from code review

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

* remove unnecessary !

* extract Project.isPrebuildsEnabled

* fixup: add missing await

* render "Learn more" if not enabled, too.

* fix getCloneUrl for BBS

* fix getCloneUrl for GitLab

---------

Co-authored-by: George Tsiolis <tsiolis.g@gmail.com>
2023-09-15 09:07:54 +02:00
Gero Posmyk-Leinemann
5cb145e57f
Reconcile startWorkspace (#18673)
* [server] Reconcile workspace starts using redlock

* [server] Check abortSignal before updating the DB state

* [server] Add feature flag workspace_start_controller

review comments
2023-09-14 08:40:53 +02:00
Brad Harris
fa3010a305
Adding getSuggestedRepositories method (#18681)
* Adding getSuggestedRepositories method

* accounting for lastUse better

* limit to org

* remove repoName for now

* add checks

* cleanup

* remove repositoryName for now

* cleanup

* removing repo name for now

* adding tracing
2023-09-12 17:11:52 +02:00
Sven Efftinge
225040d289
[log] log contextId and userId (#18688) 2023-09-11 10:16:08 +02:00
Jean Pierre
b24ae9495d
Upgrade jsonwebtoken lib (#18634) 2023-09-06 19:16:03 +02:00
Alex Tugarev
9f63620adc
log errors with parsing (#18667) 2023-09-06 10:12:03 +02:00
Sven Efftinge
71912f721b
Allow renaming project (#18630)
remove project#slug
2023-09-04 09:42:01 +02:00
Gero Posmyk-Leinemann
86fa3ba709
[server] Separate instance creation from instance starting (again) (#18642)
* [server] Separate instance creation from instance starting (again)

* [server] Set instance.configuration.fromBackup
2023-09-04 09:33:01 +02:00
Sven Efftinge
edca0d50f1
[dashboard] unique project links (#18618) 2023-08-29 21:34:55 +02:00
Brad Harris
25c949e976
Incremental repo searching (#18566)
* Wiring up api repo searching for bitbucket server

* adding lodash.debounce dep

* add lodash.debounce types

* Hiding account for bitbucket server

* print host only

* adjust loading state to not be totally blocking

* adjust filtering and query key

* support fetching recent repos

* use search params instead of strings

* adjusting loading component

* cleanup

* wrap incremental search code w/ feature flag

* yarn lock updates

* adding a limit to grab only the first 100 repos

* rename for clarity

* change to call in series to reduce rate limit chances

* renaming cap => maxPages

* fixing some stuttering widths changing as things load

* add alert message for bbs searching
2023-08-24 00:36:49 +02:00
Gero Posmyk-Leinemann
2419f896f6
[fga] Devx improvements (#18574)
* [server] Inject process.env.HOST_URL into feature flag attributes

* [dev] unblock-user + make-user-admin: Restart server+redis after DB changes
2023-08-23 08:33:49 +02:00
Manuel Alejandro de Brito Fontes
64994160d9
Remove FUSE support (#18536)
* Remove FUSE support

* Update docs

* Remove fuse-overlayfs

* Fix installer validation
2023-08-18 16:13:44 +02:00
Sven Efftinge
820ca180ff
[fga] project visibility and prebuild perms (#18540) 2023-08-18 14:41:44 +02:00
Alex Tugarev
3ba583c710
[server] add searchString to getRepositoriesForAutomatedPrebuilds – EXP-461 (#18533)
* [server] add `searchString` to `getRepositoriesForAutomatedPrebuilds`

* reintroduce and fix paginated requests

* using a default cap at 10 requests per paginated request

* make getProviderRepositoriesForUser cancellable
2023-08-17 15:04:43 +02:00
Jean Pierre
b95a4687bf
[fga] Introduce EnvVarService (#18503) 2023-08-16 22:12:42 +02:00
Anton Kosyakov
e69acdf556
remove definetly-gp support (#18492)
compare to previous attempts it does not remove anything related to ExternalImageConfigFile
2023-08-15 17:40:42 +02:00
Alex Tugarev
9e5a2be333
[new-workspace] Fix recent repositories for BBS – EXP-411 (#18497)
* [new-workspace] Fix recent repositories for BBS

* fixup remove log

* fixup test
2023-08-14 11:34:40 +02:00
Sven Efftinge
667bd2f005
[usage] add optional UserID to filter usage (#18449) 2023-08-08 07:46:33 +02:00
Gero Posmyk-Leinemann
9acc185fe5
[server] Merge WorkspaceDeletionService into WorkspaceGC (#18410)
* [server] Merge WorkspaceDeletionService into WorkspaceGC

* [server] WorkspaceService.getOwnerToken + .getIDECredentials

* review comments

* [server] Cleanup around EntitlementService and BillingMode
2023-08-07 13:38:32 +08:00
Gero Posmyk-Leinemann
0d36c68390
[fga] Workspace: create, get, stop and delete (#18403)
* [server] Cleanup to make tests pass

* [server] Introduce WorkspaceService with:
 - createWorkspace
 - getWorkspace
- stopWorkspace
- deleteWorkspace
- hardDeleteWorkspace

* add log info

* fix after rebase

* review comments

* address review comment: system user
2023-08-04 21:48:29 +08:00
Anton Kosyakov
b3ae12f956
git real time (#18323) 2023-08-03 20:51:28 +08:00
Sven Efftinge
ded77f3a44
[server] don't error on project not_found (#18400) 2023-08-01 21:51:26 +08:00