678 Commits

Author SHA1 Message Date
Filip Troníček
a1ec400db4
Improve frontend handling of many projects (#20151)
* Remove project context fetching

* limit projects returned from `ListSuggestedRepositories`

* Get rid of all projects query

* A WIP state

* Enhance search and normalize links

* Revert find project DB changes

* Make repo finder responsible for current selection

* remove debug

* Comments

* Re-use pagination flattening

* Query improvements

* limit pagination

* Add test about keeping length

* Fix test

* Fix repo ordering

* add normalize comment
2024-08-29 16:38:42 -04:00
Filip Troníček
f5acd61fcd
Organization timeout defaults (#20099)
* Organization timeout defaults proto

* Generated code

* Implement TimeoutSettings on the API layer

* Add timeout setting UI

* Actually change default workspace timeout based on org settings

workspace starter fixes

* Add alert for free plans

* denyUserTimeouts

* [dashboard] Fix check for "timeout config eligibility" by using BillingMode

* [server] Drop FF "disable_set_timeout"

* fix

* Move to team policies

* don't include `timeoutSettings` if not set

* [dashboard] TeamPolicies: Disable "save" if workspace timeouts are disabled

---------

Co-authored-by: Gero Posmyk-Leinemann <gero@gitpod.io>
2024-08-13 03:51:15 -04:00
Gero Posmyk-Leinemann
e7a47d9791
[prebuilds, workspace-gc] Fix and add tests for not showing soft-dele… (#20093)
* [prebuilds, workspace-gc] Fix and add tests for not showing soft-deleted prebuilds anymore

* [workspace-gc] Add more explanatory comments

* Apply suggestions from code review

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

---------

Co-authored-by: Filip Troníček <filip@gitpod.io>
2024-08-08 04:08:46 -04:00
Pudong
5ebe1cca85
Add PKCE support for OIDC (#20094) 2024-08-08 03:53:46 -04:00
Huiwen
c4b53f9320
Support validate claims with CEL expr for SSO (#20083)
* [papi] proto update

* [dashboard] nit TODO

* [papi] implement cel expression verify

* drop me: Add debug logs

* 1

* tidy

* export cel error message

* 💄 dashboard

* improve error

* nit doc
2024-08-07 02:33:45 -04:00
Filip Troníček
72c980ac57
Upgrade xterm to v5.5.0 (#20063) 2024-07-25 10:08:33 +02:00
Gero Posmyk-Leinemann
a03a28ef63
[audit log] Fix audit log persistence (#20054)
* [audit] Catch + log errors properly

* [audit] Properly serialize BigInts

* [public-api] Fix PublicApiConverter toAuditLog by re-using the BigIntToJson.replacer
2024-07-22 10:13:30 +02:00
Gero Posmyk-Leinemann
fbc0d76554
Prebuild issues roundup (#20000)
* redirect in the offline case

* [public-api] generate noise

* [server] Refactor Prebuild resolution to happen in a single place

* [dashboard, api] Show Prebuild details

* fixup! [server] Refactor Prebuild resolution to happen in a single place

* [bridge] Revive Prebuild QUEUED state: it's everything before running

* [server] Fix dead-end for streaming logs when starting too early

* [dashboard] Adds SHA + duration, fix re-rendering when prebuildId changes, and uses the new/old streaming logic

WIP because still has the "duplicate (sometimes triple!) logs" react re-rendering issue

* Prevent unnecessary re-renders of task output

* remove double-comment

* Duration display improvements

* Properly dismiss toasts and render durations

* Remove SHA from prebuild list

* Clean up and implement the `reset` event for workspace logs

* fix comment

* Tiny cleanup

---------

Co-authored-by: Filip Troníček <filip@gitpod.io>
2024-07-10 04:50:55 -04:00
Sven Efftinge
9fa6f885dc
[server] audit log service (#19917) 2024-06-25 10:10:20 +02:00
Sven Efftinge
a3caec67fa
[server] remove old workspace gc logic (#19931) 2024-06-19 13:26:14 +02:00
Filip Troníček
96be13b46e
Automatically cancel org's subscription upon its deletion (#19856)
* Stripe stuff

* Cancel org's subscriptions after deletion

* Correctly bind services for tests

* fix stripe-related typos

* Remove todo comment
2024-06-06 22:40:18 +08:00
Sven Efftinge
80f793d145
[server] update job for eligableDeletionTime (#19838) 2024-06-05 14:35:16 +08:00
Sven Efftinge
e7d79c355e
[server] add workspace.deletionEligabilityTime (#19831) 2024-06-04 16:51:15 +08:00
Gero Posmyk-Leinemann
7328214685
[server] Introduce job CapGitStatus (#19814)
* [server} Introduce job CapGitStatus

* [server] Have runners report unitsOfWork

* fix query
2024-05-31 22:43:12 +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
Gero Posmyk-Leinemann
435fa5e729
Opportunistic token refresh (for BitBucket Server) (#19715)
* [server] Introduce and use "reservedUntilDate" in TokenService

* Fix for extending reservations, and a bit of cleanup

* review comments
2024-05-13 18:15:51 +08:00
Sven Efftinge
0743fe4a76
[server] delete project env vars (#19707) 2024-05-07 16:28:45 +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
5992b0f614
Update go dependencies (#19577)
* Update go dependencies

* Update S3

* Caddy plugins cannot use 1.22

* Update controller runtime signatures

* Update webhook suite test

* Update IPFS signatures

* Update go modules

* Update ipfs-cluster to v1.0.8

* Fix node-labeler build

* Fix IPFS CID parsing

* Update ipfs-cluster version

* Update controller-runtime signature

* Update statefulset signature

* Disable controller-runtime metrics

* Add comments
2024-03-26 20:55:35 +01:00
suchsoon
a307738d04
remove repetitive words (#19527)
Signed-off-by: suchsoon <silverjadebeauty@gmail.com>
2024-03-25 12:07:34 +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
Filip Troníček
bff27b6e00
Ensure valid repository tie when listing prebuilds (#19558)
* Ensure valid repository tie when listing prebuilds

* Make sure tests have a valid project

* Prettier display of not found entries

* Fix toasters

* Test non-existent configuration

* Refactor error components
2024-03-19 14:53:28 +01:00
Jean Pierre
475be1259b
Add db migration (#19510) 2024-03-07 17:51:17 +02:00
Huiwen
49b24097d6
Add db migration for org-level default editor (#19509) 2024-03-06 16:54:16 +02:00
Huiwen
01d7e420aa
Add db migration for org-level editor restriction (#19489) 2024-02-29 13:56:10 +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
Jean Pierre
d0b5b873ec
Add invalid billing address notification (#19349)
* Add webhook events

* Properly set AutomaticTax

* Use address element

* 💄

* Update susbcription on address update

* Try scroll modal

* Fix

* try fix modal scroll

* Add toast notification

* Add invalidBillingAddress column to d_b_stripe_customer

* 💄

* 💄

* Fix

* Try fix update

* Address feedback
2024-01-29 11:12:05 +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
Huiwen
b655c99b20
Add admin role to builtin admin back (#19337) 2024-01-19 09:25:55 +02:00
Sven Efftinge
0a3e22ba3d
[usage] track email for free allowance (#19303)
* [usage] track email for free allowance

* [db] d_b_free_credits: Add indexes for userId and email

---------

Co-authored-by: Gero Posmyk-Leinemann <gero@gitpod.io>
2024-01-04 10:49:41 +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
671f1c6f04
[gitpod-db] AddOrgSettingWorkspaceClass1701725025283 (#19273) 2023-12-15 13:14: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
Filip Troníček
aa4fc129be
Conditionally apply org id filter to project lookup (#19224)
* Conditionally apply org id filter to project lookup

* Add DB test
2023-12-11 11:17: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
Filip Troníček
46ff2d0121
Scope config lookup to org (#19217) 2023-12-08 08:50:15 +02:00
Alex Tugarev
cf2facc944
Fix team-db spec (#19207) 2023-12-07 08:48: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
Sven Efftinge
ad2a077973
[db] fix the query for non-fga migrated users (#19194) 2023-12-05 15:03:12 +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
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
Alex Tugarev
3b85bf13e1
[server] remove unused getFeaturedRepositories (#19100) 2023-11-21 16:42:59 +02:00
Milan Pavlik
f0c8a858c9
[baseserver] Emit metrics for logs produced by level ENG-349 (#19063)
* [baseserver] Emit metrics for logs produced by level

* fix

* fix

* fix

* fix

* Fix

* Fix

* fix

* retest

* fix
2023-11-21 12:26:58 +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
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
Anton Kosyakov
0ec003754e
[public-api] align with API guidelines (#19038) 2023-11-14 13:09:51 +02:00