188 Commits

Author SHA1 Message Date
Gero Posmyk-Leinemann
d3eccd0169
[gp] Allow update of existing user-scoped env vars (#20193)
* [gp, protocol, server] Remove references to long-deprecated "getEnvVars" API method

* [gp, server] Allow users to update user-scopes env vars
2024-09-11 02:57:56 -04: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
9d947b04ea
[JetBrains] add more integration tests (#19913)
* [JetBrains] add more integration tests

* Add deps

* Add in workspace JetBrains integration test

* Support papi

* fixup

* Test succeed

* remove unnecessary code

* Fixup

* Remove warmup TODO item

* Add doc for sh file

* Increase timeout and make it run in parallel

* Use empty

* fixup

* Sleep

* db wait

* speed up
2024-06-19 11:51:14 +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
Huiwen
4cb5b6b9c0
Fix regular IDE integration tests (#19728)
* Test integration test

* Log ide settings

* Fix regular integration test

* fixup
2024-05-10 20:33:48 +08:00
Aminur Rahman
58156dcf60
Add adminVerifyUser command to gpctl (#19602) 2024-04-22 16:50:00 +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
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
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
Alex Tugarev
3b85bf13e1
[server] remove unused getFeaturedRepositories (#19100) 2023-11-21 16:42:59 +02:00
Alex Tugarev
0907ff51e1
[server] remove obsolete and unused getSuggestedContextURLs (#19074)
* [server] remove obsolete and unused `getSuggestedContextURLs`

* fixup papi
2023-11-16 13:17:54 +02:00
Christian Weichel
323fc19826
[supervisor] Don't panic if connection is already closed (#18956) 2023-10-19 11:50:26 +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
0f926eb721
adding missing fields to CreateAndStartWorkspace (#18874)
* adding some missing fields to CreateAndStartWorkspace

* updated mocks
2023-10-06 02:27: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
Alex Tugarev
d897a6c57b
Add deprecation note to github node in .gitpod.yml (#18788) 2023-09-29 17:08:08 +03:00
Manuel Alejandro de Brito Fontes
8ef82ff356
Update go modules to 1.21 (#18805) 2023-09-26 17:52:05 +03: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
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
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
8d4128b132
fix PAPI conversion (#18722) 2023-09-15 13:28:54 +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
Brad Harris
adf4e66cf6
Add CreateAndStartWorkspace to public-api (#18515)
* setting up CreateAndStartWorkspace handler

* adjust args

* adding createWorkspace scope for desktop app

* add getToken scope to desktop app oauth client

* remove for now

* adding region

* adding getToken while in here
2023-08-23 16:06:49 +02:00
Filip Troníček
112eefcc56
[papi] List editor options (#18530)
* options.init

* Respond with options

* Move to editor service

* Unused imports

* Mount ot the correct service

* Sort by orderkey

* Simplify enum name

* Add tests

* Options -> `result` for consistency

* fix result field
2023-08-18 11:19:44 +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
Filip Troníček
614007dde5
[papi]: Add GetSuggestedRepoURLs (#18514)
* [papi]: Add `GetSuggestedRepos`

* Rename method

* req to be consistent

* Move to SCMService

* Remove usr impl

* Add tests

* Revert billing test change

* Revert user changes

* --
2023-08-15 13:55:41 +02:00
Anton Kosyakov
b3ae12f956
git real time (#18323) 2023-08-03 20:51:28 +08:00
Filip Troníček
c5059f2dc3
Filter by organizationId in ListWorkspaces (#18402)
Remove `IncludeWithoutProject`
2023-08-02 05:20:27 +08:00
Alex Tugarev
29ace4982b
[server] Remove obsolete (Theia) User Storage Resource (#18377)
* [server] Remove obsolete (Theia) User Storage Resource

* more cleanup
2023-08-01 15:48:26 +08:00
Manuel Alejandro de Brito Fontes
54c2040632
Update go modules to 1.20 (#18360) 2023-07-27 22:24:29 +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
Jean Pierre
d57a39dbad
[public-api] Update getWorkspace api response implementation (#17821)
* Update getWorkspace api response implementation

* Only implement recent_folders

* Add additional tests
2023-07-06 01:24:22 +08:00
Sven Efftinge
caf26b812d
[server] remove getUserProjects (#18093) 2023-06-29 16:30:47 +08:00
Pudong
f74ba1cbc3
Add organization id in claims (#17954)
* add OrganizationId in claims.

* Update components/gitpod-protocol/go/gitpod-service.go

* fix
2023-06-26 16:37:50 +08:00
Milan Pavlik
0777246800
Remove getContentBlob Upload/Download URL (#17983)
* Remove getContentBlob Upload/Download URL

* fix
2023-06-21 16:18:11 +08:00
Milan Pavlik
5aa001f763
[server] Remove hasPermission from go API client (#17990) 2023-06-20 22:47:10 +08:00
Gero Posmyk-Leinemann
54307a551e
[server] Remove dead permissions code (#17918) 2023-06-19 17:45:10 +08:00
Pudong
4aede056ab
[IDP] set email_verified to false if user is not org-owned user (#17896)
* set email_verified to false if user is not org-owned user

* update test
2023-06-12 18:46:03 +08:00
Anton Kosyakov
3f3ece10e0
don't log http headers (#17827)
to avoid leaking tokens in logs
2023-06-06 16:37:56 +08:00
Jean Pierre
6652c98a1a
Add WorkspaceUpdates method (#17728)
* Add WorkspaceUpdates method

* Replace InstanceUpdates
2023-05-30 23:56:04 +08:00
Alex Tugarev
c8c4c3bda9
Root out obsolete self-hosted setup (#17729) 2023-05-25 15:44:59 +08:00
Pudong
176393a0c8
Add support to forward https protocol port (#17644)
* add support to forward https protocol port

* Update components/ws-proxy/pkg/proxy/routes.go

Co-authored-by: Kyle Brennan <kyle@gitpod.io>

---------

Co-authored-by: Kyle Brennan <kyle@gitpod.io>
2023-05-19 15:22:53 +08:00
Sven Efftinge
b7d01a7e25
Disallow deletion of teams (#17538) 2023-05-10 22:25:55 +08:00
Kyle Brennan
99eb2593d5
[test] Fix workspace integration tests (#17222)
* [tests] unique ContextURL for commit only

* [tests] include std output in the error message for commit

Sometimes commit fails with status 1 w/o error output...so it's helpful to look at StdOut

* [tests] Fix TestGitActions by using the test case context

Prior to this, createWorkspace was working, but getWorkspace could not find the created workspace.

* [test] bypass exit code 1 on `git commit` with `--allow-empty`

* [test] Fix gcloud auth, do setup before auth

* Show all output

Might remove later...

* [test] avoid using deleted user, identity, and token

* [test] add organizationId to CreateWorkspaceOptions

It's expected on the Typescript side:
90b7d65858/components/server/src/workspace/gitpod-server-impl.ts (L1227-L1235)

* [test] orgId is required on createWorkspace

But sometimes there's no team 🤷

* [test] fix git context tests

We use UBP now, there is no more unleashed.

Also, remove the "ff" feature flag code (which was for PVC). It was mutating the username, resulting in Code 460 errors on createWorkspace

* [test] Use example test as the example

* [test] fix context tests when run as gitpod-integration-test user

* [test] clean-up

* [test] wait for workspaces to stop

Tests intermittently fail with  to avoid intermittent failures

* [test] add code owners

This way, we can assert tests are passing for all teams prior to merging

* [test] limit # of tests that can run in parallel

* [test] no parallel tests

Test to see if flakeyness goes away...
...and bump the timeout because we reduced parallel runs

* [preview] update the VM image to have parity with production

This:
1. updates from K3s 1.23 to 1.26
2. requires that we remove PodSecurityPolicy changes (as it's no longer supported)
3. resolves intermittent disk pressure issues

* [preview] no PSP in support of VM image update

* We were getting PSP from rook/ceph, which I think was for PVC
* We were getting PSP from the monitoring-satellite

* [test] don't wait for workspace stop with git_test.go, we're testing git actions.

Why? We miss state transitions, it's not guaranteed each one will be returned, and there are other tests waiting.

For example, in the below log, we miss INITIALIZING, RUNNING, and STOPPING.

 workspace.go:369: attempt to create the workspace as user 0565bb3c-e724-4da9-84fb-22e2a7b23b8c, with context github.com/gitpod-io/gitpod-test-repo/tree/integration-test/commit
    workspace.go:411: attempt to get the workspace information: gitpodio-gitpodtestrepo-nscsowy1njb
    workspace.go:423: not preparing
    workspace.go:432: got the workspace information: gitpodio-gitpodtestrepo-nscsowy1njb
    workspace.go:460: wait for workspace to be fully up and running
    workspace.go:569: prepare for a connection with ws-manager
    workspace.go:590: established for a connection with ws-manager
    workspace.go:598: check if the status of workspace is in the running phase: 462f1325-3019-4547-8666-508e8353335e
    workspace.go:631: status: 462f1325-3019-4547-8666-508e8353335e, PENDING
    workspace.go:598: check if the status of workspace is in the running phase: 462f1325-3019-4547-8666-508e8353335e
    workspace.go:631: status: 462f1325-3019-4547-8666-508e8353335e, PENDING
    workspace.go:598: check if the status of workspace is in the running phase: 462f1325-3019-4547-8666-508e8353335e
    workspace.go:631: status: 462f1325-3019-4547-8666-508e8353335e, CREATING
    workspace.go:598: check if the status of workspace is in the running phase: 462f1325-3019-4547-8666-508e8353335e
    workspace.go:631: status: 462f1325-3019-4547-8666-508e8353335e, CREATING
    workspace.go:598: check if the status of workspace is in the running phase: 462f1325-3019-4547-8666-508e8353335e
    workspace.go:631: status: 462f1325-3019-4547-8666-508e8353335e, CREATING
    workspace.go:598: check if the status of workspace is in the running phase: 462f1325-3019-4547-8666-508e8353335e
    workspace.go:504: waiting for stopping the workspace: 462f1325-3019-4547-8666-508e8353335e
    workspace.go:514: attemp to delete the workspace: 462f1325-3019-4547-8666-508e8353335e
    workspace.go:797: confirmed the worksapce is stopped: 462f1325-3019-4547-8666-508e8353335e, STOPPED
    workspace.go:538: successfully terminated workspace
    git_test.go:172: failed to wait for the workspace to start up: cannot wait for workspace: context deadline exceeded

* [preview] retry installing trust-manager

And use trust-manager from the packer image

* [test] clarify USER_TOKEN value for preview environments

* Cleanup

* [preview] remove commented out yaml related to PodSecurityPolicy
2023-05-04 04:07:41 +08:00
Alex Tugarev
341491a1da
Removing ONBOARDING_IN_PROGRESS condition (#17417)
because it blocks all API calls needed during the onboarding.
2023-04-28 03:07:35 +08:00