46 Commits

Author SHA1 Message Date
Filip Troníček
de5030ab54
Image builds in prebuilds UI (#19887)
* Image builds in prebuilds UI

* update java gitignore

* Introduce a public API `watchWorkspaceImageBuildLogs`

* Use papi impl in prebuild logs

* Special case for missing prebuild tasks

* Add route handler for image build logs

* remove the papi method

* 404 if nothing was written

* remove unused converter changes

* update golden files

* Remove unused hook

* reset backoff when imagebuild logs are not ready

* Handle unavailable logs better

* revert adding unused dep

* Fix test

* Do not use `null`s and refactor disposables

* revert disposable changes

* Add gero's comments

Co-authored-by: Gero Posmyk-Leinemann <gero@gitpod.io>

---------

Co-authored-by: Gero Posmyk-Leinemann <gero@gitpod.io>
2024-06-18 17:23:13 +08:00
Sven Efftinge
e30a12fda1
[server] increase pagesize and fail when too much is requested. (#19817) 2024-05-31 16:03:11 +08:00
Huiwen
63858c2ac6
Fix main build golden tests (#19815)
* Fix main build golden tests

* fixup
2024-05-31 14:07:11 +08:00
Sven Efftinge
c80ce4852b
[server] allow fetching task specific prebuild-logs (#19812)
* [server] allow fetching task specific prebuild-logs

* [dashboard] prebuild details shows tabs per task
2024-05-30 22:53:11 +08:00
Sven Efftinge
2a397c31f6
[server] listWorkspaceSessions API (#19733) 2024-05-13 21:00:51 +08:00
Sven Efftinge
30d5e2fa08
Configure default role for new joiners (#19701) 2024-05-06 17:05:44 +08:00
Alex Tugarev
13d7bdbcb2
[admin] add "Block Free Usage" (#19633) 2024-04-17 11:31:55 +02:00
Manuel Alejandro de Brito Fontes
236d7cf1f8
Rebuild dev-image for go v1.22 (#19572)
* Rebuild dev-image for go v1.22

* Update dev-image

* Update openssh to 9.7p1

* Refactor extraction of docker layer
2024-03-25 12:18:34 +01:00
Huiwen
f9d6077523
Add repo-level editor restriction (#19564)
* Implement repo-level editor restriction relates APIs

* hack

* address feedback

* Reset option load after context changed

* Address feedback

* 💄

---------

Co-authored-by: Jean Pierre <jeanpierre@gitpod.io>
2024-03-22 06:05:31 +01:00
Huiwen
ae09aca59a
Add editor restriction on organization-level (#19542)
* [server] allow to update org settings

* [dashboard] allow org-level editor restriction

* Org owned user's editor settings should be restricted too

* Never pass empty array

* Fix user onboarding editors always loading

* Fix incorrect loading state of ide versions

* Show available editors for org owned users

* Update components/dashboard/src/user-settings/SelectIDE.tsx

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

* Address feedback

* Revert version pin on user settings page

* Add json rpc checking

---------

Co-authored-by: Filip Troníček <filip@gitpod.io>
2024-03-20 14:07:29 +01:00
Huiwen
1ab9a58c1d
Fix papi failed to convert with wsi.conditions undefined (#19546) 2024-03-18 11:29:27 +01:00
Jean Pierre
9e6419c3f4
Add pin editor version (#19479)
* Add pin editor version

* Put it behind feature flag

* Fix tests

* 💄

* 💄

* Add pin icon

* 💄

* Put version pinning behind feature flag
2024-03-15 18:35:25 +01:00
Huiwen
7decb17370
[papi] add proto of restricted editors on org-level and repo-level (#19488)
* [papi] add proto of restricted editors on org-level and repo-level

* address
2024-02-29 15:47:10 +02:00
Huiwen
394dcae20f
[papi,server] implement restricted_workspace_classes in server (#19481)
* [papi,server] implement `restricted_workspace_classes` in server

* Fix test case input

* nit
2024-02-28 22:37:09 +02:00
Huiwen
718353ef90
[papi] add restricted_workspace_classes in repository settings (#19480)
* [papi] add `restricted_workspace_classes` in repository settings

* Update components/public-api/gitpod/v1/configuration.proto

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

* generate

* Fix build

---------

Co-authored-by: Filip Troníček <filip@gitpod.io>
2024-02-28 13:23:09 +02:00
Huiwen
b1da197018
[dashboard] reduce API call in prebuild pages (#19463)
* [papi] add repository_name a field of prebuild

* Remove unnecessary fetch of configuration in prebuilds
2024-02-23 17:21:04 +02:00
Huiwen
bcd2e9360b
[server, dashboard] improve single prebuild view (#19445)
* [server] proper handle prebuild log stream response

* Write error message to body

* Check read_prebuild permission on organization level when get workspace

* fixup

* Update regex and add unit tests

* Add persist error toast for prebuild errors

* 💄

* Fix stopped workspace log

* fix rerun

* Ensure fga enabled like papi

* Update components/dashboard/src/prebuilds/detail/PrebuildDetailPage.tsx

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

* Address feedback

---------

Co-authored-by: Filip Troníček <filip@gitpod.io>
2024-02-22 08:31:03 +02:00
Filip Troníček
6e8cd3ed89
Configuration coachmark (#19413)
* Add repo migrate coachmark

* Public API: `coachmarksDismissals`

* Early exit for new signups

* Try to inject dismissal to link

* Dismiss on path visit

* Align to the left

* Dismiss on trigger

* Simplify show logic

Co-authored-by: Siddhant Khare <siddhant@gitpod.io>

* Consider `showPrebuildsMenuItem` when hiding projects

* update tests

* Adjust date for testing

* fix projects hide condition

* Fix repo link id ref

* Do not dismiss accidentally

* up-date

* move prebuild detail to correct folder

* Make sure errors are displayed properly for prebuilds list

* don't throw

* Report dismiss

---------

Co-authored-by: Siddhant Khare <siddhant@gitpod.io>
2024-02-19 23:47:01 +02:00
Filip Troníček
c89d2de376
Prebuilds List UI (#19354)
* Init prebuilds list

* Text size and color tweaks

* Dropdown filtering UI

* wip changes

* File renames and such

* Filter by state

* fix path

* Add configuration ID filtering

* Prebuild list error state

* Protobuf sorting definition

* API-level sorting

* Simplify pagination

* Fix undefined inference

* Dashboard adopt sort behavior

* make sorting required

* Move ordering 🤷‍♂️

This will most definetely not solve anything, but...

* Hopefully fix sorting 🤷‍♂️

* less `as`

* Simplify state check

* Repeated sorting

* Sort out sorting

Sorry :/

* Configuration dropdown WIP

* Make configuration filter disableable

* Use in in SQL

* Minor styling adjustements

* Nav item

* Rename menu item

* Const 🤷‍♂️

* Always display filter reset opt

* Add prebuild link to prebuild settings

* Simplify

* Don't throw errors

All my homies hate throwing in `server`

* FF hook

* Name failed to load state

* typo

* Better unknown inference

* Add ConfigurationField component to display repository name and link

* Do not retry configuration load

* Move prebuild utils

* Unify sort types

* Refactor PrebuildTable to use arrow function syntax for mapping prebuilds

* fix imports

* Widen triggered column

* Widen even more

* Shorten status labels

* Init ws db tests

* Rename list item comp accordingly

T'was an oopsie doopsie

* Test configuration ids and branches filtering
2024-02-08 10:21:50 +02:00
Huiwen
b7d39c0cd4
[papi] add prebuild log url to prebuild message (#19353)
* [papi] GetPrebuildLogUrl proto implement

* Remove seperated API

* fix incorrect URL module
2024-01-29 19:38:05 +02:00
Huiwen
a91caf1e04
[papi] better grpc code for application unimplemented (#19351) 2024-01-24 15:27:01 +02:00
Filip Troníček
3af824e603
Implement ListOrganizationPrebuilds (#19326)
* Define `ListOrganizationPrebuilds`

* Fix because of name changes

* Add unimplemented `listOrganizationPrebuilds`

* Crazy stuff right here

* Address huiwen's comments

* Fix more types

* sad™

* trrr

* WIP API changes

* Add configuration id and search term filtering

* Filtering

* Offload prebuild listing to prebuild manager

* unused thingy delete

* Add filtering by status

* `listPrebuilds` -> `listOrganizationPrebuilds`

* Configuration filtering could be done with a branch

... what do you say?

* Implement branch filtering

* Update pagination rules

* Fix pagination limit validation error

* Migrate one more

* Fix org id for prebuild listing

* Update components/gitpod-db/src/typeorm/workspace-db-impl.ts

Co-authored-by: Siddhant Khare <siddhant@gitpod.io>

* Apply code suggestions

* Align pagination with config service

* Status filter validation

* Align org id usage

* Revert back to `listPrebuilds`

* Update components/gitpod-db/src/typeorm/workspace-db-impl.ts

Co-authored-by: Siddhant Khare <siddhant@gitpod.io>

* Bring in search

* Fix proj id instead of org id

* Fix search query‽‽‽

* nit 💄

---------

Co-authored-by: Siddhant Khare <siddhant@gitpod.io>
Co-authored-by: Huiwen Huang <huiwen@gitpod.io>
2024-01-24 11:59:01 +02:00
Filip Troníček
723d57a684
Define ListOrganizationPrebuilds (#19316)
* Define `ListOrganizationPrebuilds`

* Fix because of name changes

* Add unimplemented `listOrganizationPrebuilds`

* Crazy stuff right here

* Address huiwen's comments

* Fix more types

* sad™

* Add configuration id and search term filtering
2024-01-22 19:44:59 +02:00
Huiwen
7094f19ee8
Add collaborator role to organization (#19311)
* Update spicedb schema

* SpiceDB gen code

* [server] add collaborator

* Update papi

* Dashboard

* nit

* Complete TODOs

* server dataops pass teamId

* Add test cases for collaborator's PAT and cookie API fetch

* Add test case description

* remove unnecessary export

* Redirect to dashboard after join an org

* Hide settings for collaborator

* dataops join via oidc should be collaborator

* Fix test

* Goes back to /workspaces
2024-01-12 10:53:49 +02:00
Brad Harris
bd1b55187e
Improving prebuild related auth errors (#19247)
* Setting up saving and error state on prebuild settings

* cherry picking in backend work that updates some of the scm errors when installing webhooks for prebuilds

* updating tests

* adding placeholders for prebuild error cases

* adding isMissingScopes to error

* updating error messaging

* update tests

* adding toasts to projects settings for prebuild errors

* updating generic message styles

* Update components/dashboard/src/projects/ProjectSettings.tsx

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

* Apply suggestions from code review

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

* adjusting enabled state lookup

* updating again

* adding missing deps

---------

Co-authored-by: Filip Troníček <filip@gitpod.io>
2023-12-19 17:37:26 +02:00
Huiwen
6c0a978eee
Revert "Revert "Add org-level workspace class restrictions"" - Server (#19275)
* Revert "Revert "Add org-level workspace class restrictions (#19191)" (#19272)"

This reverts commit 2c805ad0fcad05aa3c3983c08302ad4f16dc1e69.

* Fix build
2023-12-15 15:24:22 +02:00
Alex Tugarev
2c805ad0fc
Revert "Add org-level workspace class restrictions (#19191)" (#19272)
This reverts commit 653d858fa8d5edef1717a2319bc02cf356a10fc9.
2023-12-15 12:43:22 +02:00
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
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
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
Anton Kosyakov
bfa7c6e070
[public-api] complete installation service (#19200) 2023-12-08 14:05:15 +02:00
Alex Tugarev
682878ad0c
[server] implement getAuthenticatedUser RPC (#19187) 2023-12-08 13:16:15 +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
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
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
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
17397ad65a
Fix admin dashboard convert failed case (#19192)
* Add test cases

* Fix admin dashboard convert case
2023-12-05 09:55:12 +02:00
Anton Kosyakov
5a55a7a6ff
[dashboard] proactively reconnect grpc streams (#19185) 2023-12-04 16:05:11 +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
Anton Kosyakov
e21e02ae9d
[public-api] improve request exception logging (#19179) 2023-12-01 18:36:08 +02:00
Huiwen
be35ce16a8
Use golden files for converter testings (#19168)
* Use golden files for converter testings

* Add tips if test failed

* Make results of enum human-readable

* Add copyright
2023-11-30 19:47:08 +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
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