219 Commits

Author SHA1 Message Date
mustard
e04327e0e2
[supervisor] add new .gitpod.yml on-port option ignore-completely (#20828)
* [supervisor] add new .gitpod.yml on-port option `ignore-completely`

* fixup

* fix serve

* fixup
2025-05-26 01:53:57 -04:00
Kyle Brennan
6f3319ea59
[gitpod-protocol] handle host:port:token for getGitpodImageAuth (#20806)
* [gitpod-protocol] handle host:token and host:port:token for getGitpodImageAuth

* Cleanup

* Improve readability

* Code review feedback

* Update components/gitpod-protocol/src/protocol.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* [supervisor] tests to cover insertCredentialsIntoConfig

* Fix tests

* [supervisor] handle auth token like `host:port:token`

* [image-builder-mk3] handle host:port:token for auth

* Fix

* Cleanup

* Cleanup

* Cleanup

* Cleanup

* [image-builder-bob] tolerate host:port:token

Special case is to strip port for 443

* Handle center values & code review feedback

* Remove extra/unnecessary trim

* [bob] proxy: explicit and implicit fallback for exact header matching for auth proxy

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Gero Posmyk-Leinemann <gero@gitpod.io>
2025-05-13 03:11:58 -04:00
Gero Posmyk-Leinemann
26f7f5d742
Add more initializer-related info to /insights API (#20572)
* [ws-manager, ws-daemon] Store initializer metrics in workspace.Status.InitializerMetrics

Tool: gitpod/catfood.gitpod.cloud

* [ws-mananger-api, -mk2] Emit new field .Status.InitializerMetrics

Tool: gitpod/catfood.gitpod.cloud

* [db] Introduce DBWorkspaceInstanceMetrics and persist all metrics from ws-manager-api into it

Tool: gitpod/catfood.gitpod.cloud

* [api] Expose session.Metrics.InitializerMetrics

Tool: gitpod/catfood.gitpod.cloud

* [dashboard] Export metrics into CSV

Tool: gitpod/catfood.gitpod.cloud

* [content-service] Fix: emit fromBackup stats

Tool: gitpod/catfood.gitpod.cloud

* Update components/ws-manager-api/core.proto

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

---------

Co-authored-by: Filip Troníček <filip@gitpod.io>
2025-02-26 14:34:12 -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
mustard
999ade3fb6
[JetBrains] display workspace name on the navbar (#20544)
* [JetBrains] display workspace name on the remote navbar

* Use workspace name
2025-01-30 13:36:20 -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
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
65e3f094db
[context parser] Check current ref for Docker image existence (#20345)
* [context parser] Check current ref for Docker image existence

* Better builder bob errors from supervisor

* Gently soft-fail when the Dockerfile isn't found

* Add warning to ws metadata when starting workspace

* Introduce a magic constant instead of empty strings

* Improve supervisor failed reading bob log error

* Fixup cloning our special SHA

* idk what happened

* let workspaces start even on invalid docker refs
2024-11-07 08:13:03 -05:00
Filip Troníček
18b92d89dd
[.gitpod.yml] Introduce top-level env (#20339)
* [.gitpod.yml] Introduce top-level `env`

* Update priority (prioritize User level vars)
2024-11-05 08:37:01 -05:00
Filip Troníček
42a0293097
Fix repo names for Bitbucket (Server) (#20264)
* Fix repo names for Bitbucket (Server)

* remove unused project mutation

* Update tests

* Use `ContextService` again
2024-10-07 08:27:22 -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
d1e314b674
Proper webhook installation detection (#20240)
* Proper webhook installed detection

* fix webhook detection

* debug: enable webhook on newly enabled prebuilds

* Add a comment about the arbitrary last 50 events

* Remove unused `GetConfigurationWebhookActivityStatus`

* update fn comment

* Delete superflous log

* fix debugging webhooks

* remove unused webhook-hooks

* Revert "debug: enable webhook on newly enabled prebuilds"

This reverts commit 5cfebd8f1ef438565ee18202ecf6fca7f2df30ba.
2024-09-25 12:06:10 -04:00
Gero Posmyk-Leinemann
feb6058859
[idp] Guarantee stable email address for IDP token for organization-bound users (#20199) 2024-09-12 04:14:57 -04:00
Gero Posmyk-Leinemann
b43c97ed9a
[dashboard, server] Fix streaming of image build logs (#20095)
* [json-rpc] Fix encoding of watchImageBuildLogs data to number[]

Because json-rpc can't handle complex objects like UInt8Array properly.
Conversion is done using "Array.from(UInt8Array)" and "new UInt8Array(data)"

* [dashboard] Fix "workspaceId is required" errors

* Review suggestions

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

---------

Co-authored-by: Filip Troníček <filip@gitpod.io>
2024-08-08 08:13:46 -04:00
Gero Posmyk-Leinemann
994b6ec5d4
[supervisor] Make sure we read the last chunk of message when task is closed (#20062)
* [supervisor] Make sure we read the last chunk of message when task is closed

* [server, dashboard] Prebuild logs: stream as UInt8Array instead of string, and make sure we send the last chunk before closing the response

* Make log buffer more efficient

Merging done with `TypedArray.prototype.set()` as suggested here:
https://stackoverflow.com/a/73074813/10199319

* [dashboard] PrebuildTaskTab: use hash(err.message) as toastId

* [server] prebuild logs: Only call res.end after a timeout, so clients can continue reading from the stream

* [dashboard] prebuild logs emitter: If we receive code "200", forward prefixChunk, and stop streaming

* fixup! [dashboard] PrebuildTaskTab: use hash(err.message) as toastId

---------

Co-authored-by: Filip Troníček <filip@gitpod.io>
2024-07-26 23:52:48 +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
Huiwen
2b13aea5f9
Filter out not available editors before update org and repository settings (#20030)
* Filter request args with available IDE keys

* validate on client side
2024-07-12 16:15:57 +02:00
Huiwen
f9c0969d7d
[JetBrains] support RustRover editor (#19839)
* [JetBrains] support RustRover

* Add startup json

* fixup generate

* Add svg icon
2024-06-05 04:04:16 +08:00
Sven Efftinge
e7d79c355e
[server] add workspace.deletionEligabilityTime (#19831) 2024-06-04 16:51:15 +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
Gero Posmyk-Leinemann
08847d07dd
[bridge] Remember last status update, and skip if they are identical (#19699)
* [bridge] Remember last status update, and skip if they are identical

* [bridge] More detailed logging, and fix workspaceType in metrics
2024-05-03 23:11:43 +08:00
Huiwen
7bde766789
White list GITPOD_IMAGE_AUTH env var name (#19579)
* White list `GITPOD_IMAGE_AUTH` env var name

* Add link to doc
2024-03-25 18:00:34 +01:00
Huiwen
3f20297034
Respond bad_request with reserved env var name prefix GITPOD_ (#19547)
Co-authored-by: Filip Troníček <filip@gitpod.io>
2024-03-19 14:47:28 +01: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
Pudong
6ecc991ff5
[experimental] add ssh certificate authorities as feature flags (#19208) 2023-12-07 22:59: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
Alex Tugarev
4c6cc4fb01
[papi] add user.proto and GetAuthenticatedUser – EXP-845 (#19132)
* [papi] add user.proto and GetAuthenticatedUser

* [papi] (generate.sh) Run end-of-file-fixer

* rename to EditoSettings

* clean up proto

* fix import

* update WorkspaceTimeoutSettings

* fix typo

* update WorkspaceTimeoutSettings

* clarify User.name is full name in doc line
2023-11-28 12:42:06 +02:00
Alex Tugarev
612b919699
[server] Extract ScmService to be used by both APIs (#19098)
* [server] add ScmService to be used by ScmServiceAPI (and WS API)

* add simple test for `getToken`

* refactor `ScmService.getToken` to return token of undefined

* fix duplicata validation

* add api converter tests

* just some docs
2023-11-22 16:27:00 +02:00
Alex Tugarev
3b85bf13e1
[server] remove unused getFeaturedRepositories (#19100) 2023-11-21 16:42:59 +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
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
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
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
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
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
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
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
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
8b4fbb4ff5
[server] relationship updates (#18369) 2023-07-28 20:35:30 +08:00
Alex Tugarev
6d703bdc48
Revert "[server] remove definitely-gp (#18278) (#18316)" (#18335)
This reverts commit aeb688404b41ac9a4d2e8b0dbb96dbbd21c7a546.
2023-07-25 15:31:41 +08:00
Sven Efftinge
aeb688404b
[server] remove definitely-gp (#18278) (#18316) 2023-07-20 17:50:36 +08:00
Manuel Alejandro de Brito Fontes
482412147f
Revert "[server] remove definitely-gp (#18278)" (#18306)
This reverts commit 0ea1b3acefaf1441c67a39b8616085f9ec4f89db.

Co-authored-by: Christian Weichel <chris@gitpod.io>
2023-07-19 16:59:35 +08:00
Sven Efftinge
0ea1b3acef
[server] remove definitely-gp (#18278) 2023-07-14 03:00:30 +08:00
Sven Efftinge
075e14c47f
[build] enabled some eslint rules (#18165) 2023-07-04 22:32:21 +08:00
Sven Efftinge
248a00eaa8
[server] clean up org-only migration code (#17939) 2023-06-22 15:03:12 +08:00