76 Commits

Author SHA1 Message Date
mustard
a68d7ef67b
Fix main build (#20601)
Tool: gitpod/catfood.gitpod.cloud
2025-02-14 02:17:50 -05:00
Gero Posmyk-Leinemann
e9aae6e497
[docker-up] Auto-login dockerd if GITPOD_IMAGE_AUTH is set (#20586)
* [docker-up] Minor fixes and add tests

Tool: gitpod/catfood.gitpod.cloud

* [image-builder-bob] Tests&fixes from an experimental PR

Tool: gitpod/catfood.gitpod.cloud

* [supervisor, ws-manager] Write docker credentials into client config file if passed into workspace

Tool: gitpod/catfood.gitpod.cloud

* [server] Introduce project.settings.enableDockerdAuthentication and expose it on the API

Tool: gitpod/catfood.gitpod.cloud

* [dashboard] Add "Docker registry authentication" toggle under projects/env vars

Tool: gitpod/catfood.gitpod.cloud

* [server] Guard project.settings.enableDockerdAuthentication by org write_settings permission

Tool: gitpod/catfood.gitpod.cloud

* review comments with cleanup + small fixes

Tool: gitpod/catfood.gitpod.cloud
2025-02-12 05:16:48 -05:00
Filip Troníček
754dc9eb38
Organization-recommended repositories (#20559)
* [server] implement `recommendedRepositories` API field

Tool: gitpod/catfood.gitpod.cloud

* [dashboard] implement org-suggested repositories

Tool: gitpod/catfood.gitpod.cloud

* [dashboard] Spacing and pill labels

Tool: gitpod/catfood.gitpod.cloud

* update copy

Tool: gitpod/catfood.gitpod.cloud

* Get rid of debug fluff

Tool: gitpod/catfood.gitpod.cloud

* Fix onboarding page heading

Tool: gitpod/catfood.gitpod.cloud

* minor nitfix

Tool: gitpod/catfood.gitpod.cloud

* Cascade project deletions to repo recommendations

Tool: gitpod/catfood.gitpod.cloud

* Fix db tests

Tool: gitpod/catfood.gitpod.cloud

* Fix docs link

Tool: gitpod/catfood.gitpod.cloud

* add db test

Tool: gitpod/catfood.gitpod.cloud

* Fix showing suggested repos even with no user contributions

Tool: gitpod/catfood.gitpod.cloud

* Add organization suggested repositories to RepositoryFinder

Tool: gitpod/catfood.gitpod.cloud

* Don't add recommended repos to workspace list for now

Tool: gitpod/catfood.gitpod.cloud

* Regular repo icon for org-suggested repos

Tool: gitpod/catfood.gitpod.cloud
2025-02-04 08:31:19 -05:00
Filip Troníček
c24b8f4aed
Add optional, org-wide Gitpod commit annotation (#20525)
* [supervisor] Add Gitpod commit annotation

* server and API changes

* [dashboard] add org setting for commit annotation

* Fix things

* Fix label for annotation switch

* Revert accidental rename

* minor docs fixes

* Add a feature flag for the setting: `commit_annotation_setting_enabled`

* Register hook in the cloned repo instead of under /etc/

* don't override existing hooks

* `gp git-commit-message-helper` to use `git interpret-trailers`

* Test it!

* 🧹 indeed

* Update timestamp of DB migration
2025-01-24 08:11:14 -05:00
Gero Posmyk-Leinemann
ad4b7a8f4a
Introduce org-level GITPOD_IMAGE_AUTH (#20538)
* [db, protocol] Introduce DBOrgEnvVar

* [server, spicedb] Introduce and integrate org env vars into internal services

* [server, public-api] Added API for org-level environment variables

* [dashboard] Add UI for setting/removing GITPOD_IMAGE_AUTH to "Organization Settings"

* [db, server] Fix DB queries, mapping to image-build args and fixed tests

* [dashboard] Review comment "icon spacing"

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

* [dashboard] Review comment superfluous key

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

* [dashboard] more spacing

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

* [dashboard] Copyright year

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

* [public-api] Add converter test case

---------

Co-authored-by: Filip Troníček <filip@gitpod.io>
2025-01-24 03:43:14 -05:00
Filip Troníček
d54bd04999
Enteprise onboarding settings (#20508)
* UI reorg

* generated stuffs

* Make it woooooooork

* Classier placeholder

* Remove unneeded fragment

* Introduce `enterprise_onboarding_enabled` flag

* move things properly

* add ipv6 localhost
2025-01-08 11:05:23 -05:00
Filip Troníček
55b486ee5f
Introduce max_parallel_running_workspaces for orgs (#20448)
* Introduce `max_parallel_running_workspaces` for orgs

* Add migration

* Add UI and org settings server changes

* Rough edges

* Number inputs (:trollface:)

* Move LazyOrganizationService to UBP entitlement service to get rid of circ. dep. errs

* Fix tests

* Update components/gitpod-db/src/typeorm/entity/db-team-settings.ts

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

* Rename `isPaidPlan` to `isPaidOrDedicated` and get rid of `update_max_parallel_running_workspaces`

* Update components/server/src/workspace/workspace-service.ts

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

* Deduplicate instance counting logic

---------

Co-authored-by: Gero Posmyk-Leinemann <gero@gitpod.io>
2024-12-16 09:06:02 -05:00
Filip Troníček
74efee5b04
[server] Fix context setting for PRs for insights (#20456) 2024-12-16 05:47:01 -05:00
Filip Troníček
a303660a5f
Add insights page (#20437)
* Add WS image metrics to workspace instances

* Update tests

* fix ws-manager-api field description

* [dashboard] Org Insights page

* Pagination, date filters and downloads

* Safety limits for pagination and prettier icons

* UI improvements

* Enhance `from` date to capture whole day

* some more props for the CSVs

* Include git context with workspace responses

* Context url segments in CSV

* ide => editor to align with papi convention

* Remove duplicate fc

* revert route deletion

* Update papi converter tests and revert unecessary changes

* fix error rendering

* partly revert ws api svc changes

* Remove debug lines

* fix proto typo

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

* Remove org member listing from frontend

* Shorter == better 😎

* Move workspace.metadata.context onto a top-level `WorkspaceSession` property

---------

Co-authored-by: Gero Posmyk-Leinemann <gero@gitpod.io>
2024-12-12 08:55:33 -05:00
Gero Posmyk-Leinemann
7f43d48115
[server, dashboard] Introduce multi-org (behind feature flag) (#20431)
* [server config] Introduce isDedicatedInstallation, and use it to replace isSIngleOrgInstallation

incl. further cleanup around getConfiguration and server config

* [server, dashboard] Remove enableDedicatedOnboardingFlow feature flag and replace is with getInstallationConfiguration.IsDedicatedInstallation

* [dashboard, server] Remove "sinlgeOrgMode"

* [server] OrganizationService: block createTeam consistently for org-owned users

* [server, dashboard] Introduce "enable_multi_org" feature flag to allow admin-user to create organizations

* [dashboard] introduce "/?orgSlug=", which allows to pre-select an org in a "create workspace" URL (e.g. "/?orgSlug=org1#github.com/my/repo")

* [db] Auto-delete container "test-mysql" if it's already present

* fix tests

* [dashboard] Check if localStorage is available before using it

* [dashboard] SSOLogin: fix orgSlug source precedence to: path/search/localStorage

* [server] Deny "joinOrganization" for org-owned users

* Gpl/970-multi-org-tests (#20436)

* fix tests for real

* [server] Create OrgService.createOrgOwnedUser, and use that across tests to fix the "can't join org" permission issues

* Update components/server/src/orgs/organization-service.ts

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

---------

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

---------

Co-authored-by: Filip Troníček <filip@gitpod.io>
2024-12-09 08:00:16 -05:00
Filip Troníček
5bb738a530
Add WS image metrics to workspace instances (#20426)
* Add WS image metrics to workspace instances

* Update tests

* fix ws-manager-api field description

* Prefer existing DB values for metrics

* Copy proto comments over to protocol type
2024-12-09 05:01:16 -05:00
Filip Troníček
aeaec3405f
Fix public API test on main (#20352) 2024-11-07 23:04:04 -05:00
Aminur Rahman
812b946526
fix: avoid accessing null value (#20305) 2024-10-17 03:51:13 -04:00
Filip Troníček
7095780d3e
Non-project repository starting restrictions (#20234)
* add proto

* codegen

* impl

* WIP UI

* make it work

* Make it work

* Empty state

* Update copies (thx Fernando!)

* Fix tip flexbox

* fix newline for role restriction empty state

* When arbitrary repos are restricted, don't suggest them
2024-09-27 14:36:13 -04:00
mustard
41f47c80a7
Add Azure DevOps integration (#20202)
* Add node package

* first nit changes

* nit proto udpate

* fixup

* [server] add azure support

* fixup

* fixup

* server fixup

* [dashboard] changes

* fixup

* fixup

* Fix server bugs

* Fixup

* Fix dashboard

* Fix user integration

* Fix permission update modal

* tmp

* Add unit tests and fix get file content issue

* Add readme

* fix tag and branch parser

* Update README.md

* Remove API tests

* Disable azure devops support for PAYG

* Revert "Remove API tests"

This reverts commit a525cbd161e210d6e75bed0d62a339505f7c48df.

* Fix tests

* Rebase fixup

* nit fixing

* revert me

* Fix integration udpate

* Fix ENT-780

* Don't support azure devops on PAYG

* dashboard: add comments and remove new Azure DevOps supports on user settings page

* Fix push warning and make project a part of owner

* Proper handle errors

* Fix token can't refresh issue

* Fix api

* Add project context supports

* Update components/server/src/azure-devops/azure-context-parser.spec.ts

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

* Fix readablestream error

* Fix clone url

* Address feedback

- dashboard provider type update
- doc for checkWriteAccess
- Requirement.DEFAULT

* 1

* avatar

* Revert "revert me"

This reverts commit 189c431eca33b06812ae33beaf3f5c95a28604ee.

---------

Co-authored-by: Filip Troníček <filip@gitpod.io>
2024-09-27 13:29:12 -04:00
Filip Troníček
fdbf605e80
Cell Disabled mode (#20222)
* wip

* Implement UI

* remove commented out code

* Cell disabled check for websockets
2024-09-18 04:06:03 -04:00
Filip Troníček
35f53b9386
Enforce minimum scopes in the UI (#20217) 2024-09-16 03:56:02 -04:00
Filip Troníček
c79f478362
Reduce required Bitbucket scopes (#20195) 2024-09-13 03:16:59 -04:00
mustard
02b49524eb
Add full clone setting for prebuilds (#20177)
* proto update

Co-authored-by: Filip Troníček <filip@gitpod.io>
Co-authored-by: Gero Posmyk-Leinemann <32448529+geropl@users.noreply.github.com>

* dashboard + server

---------

Co-authored-by: Filip Troníček <filip@gitpod.io>
Co-authored-by: Gero Posmyk-Leinemann <32448529+geropl@users.noreply.github.com>
2024-09-11 04:44:57 -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
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
10810cee50
Various prebuild fixes (#20057)
* log it all

* fix failing image logs prebuild updates

* make sure we dispose of requests properly

* minor cleanup

* handle aborts gracefully

* Try using a tailing library for reading supervisor task logs

* Fix caching requests on Firefox

* Revert "Try using a tailing library for reading supervisor task logs"

This reverts commit fdc3183aa76cab7ac4976fb633d148482054722b.

* Change log order

Make sure we wait for the line to be written first

* Tweak abortion error message

* Remove extra log line
2024-07-24 15:48: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
Huiwen
8192444477
[TB] allow to config launcher from Dashboard (#20051)
* [TB] allow to config launcher from dashboard

* Control by FF

* nit follow up

* LImit oauth entry with FF

* 💄
2024-07-19 15:12:57 +02:00
Filip Troníček
1b72b6839c
Update activity-based prebuilds tests (#20038) 2024-07-14 22:23:53 +02:00
Filip Troníček
6b2187ae23
Activity-based prebuilds (#20006)
* Start prebuilds on started workspaces

* Fix circl dep

* move out to workspace creation

* Do it in the workspace service

* remove webhook tests

* remove webhook handling code

* Revert "remove webhook handling code"

This reverts commit d7c4550ec6b16091344607bfeee234b1f0e5705b.

* Anotate new setups with an `activity-based` activation strategy

* Update tests

* Alert banner

* add correct changelog path

* fix tests

* Remove code for registering prebuilds

* Still pass prebuild preconditions in order to run

* Re-add link to prebuild history of a repo

* Rename to trigger strategy and change project activity indicator
2024-07-12 17:49:51 +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
024f71a6fb
[github] throw up error message from GH (#19993) 2024-07-04 08:29:18 -04:00
Sven Efftinge
9fa6f885dc
[server] audit log service (#19917) 2024-06-25 10:10:20 +02:00
Filip Troníček
f24a6101ee
Enable displaying JB warmup tasks in the Prebuilds UI (#19945)
* Enable displaying JB warmup tasks in the Prebuilds UI

* a hacky comment

* shorten jb warmup task id prefix

* update converter tests

* Capitalize product names

* Fix IDE order

* update golden test results
2024-06-24 15:59:19 +02:00
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