974 Commits

Author SHA1 Message Date
Anton Kosyakov
e2068d6b6b
ts scrubbing initial (#17915) 2023-06-29 14:43: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
Sven Efftinge
248a00eaa8
[server] clean up org-only migration code (#17939) 2023-06-22 15:03:12 +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
Gero Posmyk-Leinemann
909955d2c4
[db, ts] Introduce a generic db.transaction() (#17980)
* [ts] Upgrade inversify 5.0.1 -> 6.0.1

* [server, db] Introduce TransactionalDB for User, Workspace, Projects

* Fix tests
2023-06-21 16:12:11 +08:00
Milan Pavlik
5aa001f763
[server] Remove hasPermission from go API client (#17990) 2023-06-20 22:47:10 +08:00
Milan Pavlik
cf84bf01a7
[server] Remove hasPermission rpc (#17981) 2023-06-20 21:24:11 +08:00
Gero Posmyk-Leinemann
54307a551e
[server] Remove dead permissions code (#17918) 2023-06-19 17:45:10 +08:00
Gero Posmyk-Leinemann
1f42bd03d9
Allow user env vars for GitLab subgroups (#17831)
* [server] Move from owner/repo to potentially longer env var patterns

* review suggestions

* fix and double-wildcard

* Adjust TestsEnvVarService for double wild card
2023-06-15 22:52:06 +08:00
Sven Efftinge
097d178910
[server] remove user relation from gitpod_token (#17923) 2023-06-14 03:53:04 +08:00
Alex Tugarev
4fd4f66667
Remove unused workspace port auth (#17870)
* remove unused worspace port auth

* fix
2023-06-13 14:27:03 +08:00
Brad Harris
27f539cbad
track a verificaitonId during phone verification (#17898)
* track a verificaitonId during phone verification

* use snake case property names for tracking

* validate verificationId is uuid

* move validation into service

* typo in error msg
2023-06-12 22:42:02 +08:00
Wouter Verlaek
a18361e5a0
Return and show error when stopping workspace in maintenance mode (#17880)
* Show error when stopping workspace in maintenance mode

* Fix import

* Feedback

* Fix return

* Fix mutate error catch, use try/catch for stopWs
2023-06-12 21:55:03 +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
Alex Tugarev
c44e74cd7a
User.getPrimaryEmail to return email of SSO identity – WEB-437 (#17897)
* User.getPrimaryEmail to return email of SSO identity

* fixing issue with email not being editable

---------

Co-authored-by: Brad Harris <bmharris@gmail.com>
2023-06-10 02:04:00 +08:00
Gero Posmyk-Leinemann
f0f3dfe7bb
[server] Removed deprecated api.getEnvVars (#17832) 2023-06-07 19:01:58 +08:00
Alex Tugarev
f7fd787088
Read email from SSO profile – WEB-437 (#17819)
* [protocol] remove unnecessary User.censor

* Read email from SSO profile

* [gitpod-db] Add Identity.lastSigninTime

* revert useOIDCClientsQuery changes

* make use of lastSigninTime on Account page

* [server] update lastSigninTime on signin

* fixup tests

* fixup update of lastSigninTime
2023-06-06 16:50:57 +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
Alex Tugarev
9f6b6c0943
Validate cloneUrl agains accessible repositories – WEB-402 (#17809)
* [orgs] Disallow creating Projects under User

* [Projects] Validate cloneUrl against accessible repositories

* fixup condition in createProject
2023-06-05 20:49:56 +08:00
Alex Tugarev
6436f44274
[gitpod-db] remove deprected/unused tokens column – WEB-400 (#17813)
* [gitpod-db] remove deprected/unused `tokens` column

* fix db model
2023-06-02 19:08:07 +08:00
Milan Pavlik
a05ea2c9eb
[server] Remove self-hosted installation admin telemetry endpoint (#17787)
* [server] Remove self-hosted installation admin telemetry endpoint

* Fix

* fix

* fix

* fix

* Fix

* fix
2023-06-02 16:15:07 +08:00
Jean Pierre
6652c98a1a
Add WorkspaceUpdates method (#17728)
* Add WorkspaceUpdates method

* Replace InstanceUpdates
2023-05-30 23:56:04 +08:00
Sven Efftinge
734e144bf5
[server] expose API for blocked email domains (#17754) 2023-05-26 04:12:59 +08:00
Alex Tugarev
c8c4c3bda9
Root out obsolete self-hosted setup (#17729) 2023-05-25 15:44:59 +08:00
Sven Efftinge
44e92bfd2b
Show migration message after migration (#17672) 2023-05-24 02:08:57 +08:00
Sven Efftinge
dd7f5f70ba
[dedicated] explicit single-org config (#17547) 2023-05-22 20:08:56 +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
7b75c00dd3
[dashboard] fix reload (#17575) 2023-05-15 16:53:00 +08:00
Sven Efftinge
28e3649850
Org slugs are kept in sync with name (#17596) 2023-05-12 20:42:57 +08:00
Sven Efftinge
9f58bcd2bc
[dashboard] no editing email for org users (#17594) 2023-05-12 20:15:57 +08:00
Sven Efftinge
b7d01a7e25
Disallow deletion of teams (#17538) 2023-05-10 22:25:55 +08:00
Brad Harris
2eaf257d89
removing setup intent related code (#17539) 2023-05-10 01:41:54 +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
Sven Efftinge
c632b7e0fe
[dashboard] don't ask again on ws creation (#17297) 2023-05-03 17:33:41 +08:00
Alex Tugarev
af796f2825
[server] Compute state of Dedicated Onboarding (#17466) 2023-05-03 14:27:41 +08:00
Milan Pavlik
6f6b0a8d7c
[server] Fix parsing of go duration (#17458) 2023-05-02 21:08:40 +08:00
Sven Efftinge
050c83110b
[dashboard] handle organizationOwned users (#17444) 2023-05-02 02:17:39 +08:00
Huiwen
93f39f317f
Revert "[dashboard] send heartbeat telemetry (#17358)" (#17426)
This reverts commit c520c72398235104a2a870014d20e476ac211890.
2023-04-28 15:39:38 +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
Anton Kosyakov
8f1640ed0b
[supervisor-frontend] fix metrics reporting (#17361)
* [supervisor-frontend] fix metrics reporting

when workspace URL contains search, hash or path

* ensure that GitpodHostUrl always trim search, hash, path

+ remove unused arg type and function
2023-04-28 02:55:36 +08:00
Huiwen
c520c72398
[dashboard] send heartbeat telemetry (#17358)
* [dashboard] send heartbeat telemetry

* 💄

* Reset after telemetry sent

* Update components/gitpod-protocol/src/frontend-dashboard-service.ts

Co-authored-by: Milan Pavlik <milan@gitpod.io>

* Fix and send final telemetry

* fix build

---------

Co-authored-by: Milan Pavlik <milan@gitpod.io>
2023-04-26 20:03:37 +08:00
Jan Keromnes
d40efae2df
Stop asking for company website during user onboarding (#17390) 2023-04-26 17:48:34 +08:00
Mirco Kater
6c73ccaf4a
New roles (#17059)
* draft

* Update permission.ts

changed admin-role into admin-permissions

* Update gitpod-server-impl.ts

changed admin-role into admin-permissions

* [server] Grant "admin" and "admin-permissions" for first user

---------

Co-authored-by: Gero Posmyk-Leinemann <gero@gitpod.io>
2023-04-25 23:05:46 +08:00
Gero Posmyk-Leinemann
179e55b98a
[preview] Configure with-dedicated-emulation (#17337)
* [preview] Disable stripe secrets on GITPOD_WITH_DEDICATED_EMU

* [preview] Disable linkedin secrets on GITPOD_WITH_DEDICATED_EMU

* [dashboard, db] Don't show onboarding dialogues for "admin-user"

* [preview] Configure stripe/linkedin in the same code block
2023-04-25 16:04:46 +08:00
Sven Efftinge
d18edfe28c
[orgs-only] Show Information before migration. (#17319) 2023-04-25 15:39:45 +08:00
Milan Pavlik
eb2ceadb76
[server/dash] Remove license RPCs/view WEB-214 (#17342)
* [server/dash] Remove license RPCs/view

* remove licence refs

* Fix

* fix
2023-04-24 22:29:45 +08:00
Sven Efftinge
3a3d99edd3
[admin] show workspace instances (#17322) 2023-04-24 21:23:45 +08:00
Alex Tugarev
b7872c1372
Remove deprecated and unused getPortAuthenticationToken method (#17321) 2023-04-24 16:02:45 +08:00
Brad Harris
0f88afefb8
adding backend support for payment intents (#17309)
* adding support for payment intents

* support payment intents in server

* handling new arg

* adjust hold to be 1.00

* removing old comment
2023-04-22 03:05:42 +08:00
Sven Efftinge
ecfbfd3580
[server] use options from last instances on start (#17298) 2023-04-22 00:41:42 +08:00