1804 Commits

Author SHA1 Message Date
Alex Tugarev
aa691ddf01
Remove Prebuild Events page and jsonrpc methods (#19069) 2023-11-14 14:13:52 +02:00
Anton Kosyakov
0ec003754e
[public-api] align with API guidelines (#19038) 2023-11-14 13:09:51 +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
Christian Weichel
bb51f07988
Collect workspace classes from workspace cluster (#19003)
* Extend ws-manager API to support workspace class descriptions

fixes ENG-1065

* Extend  DescribeCluster in ws-manager-mk2

to acurately report the available workspace classes

fixes ENG-1066

* Add workspace classes to cluster in DB

* Intergrate workspace cluster collection in ws-manager-bridge

* Feature flag off discovered workspace class usage

* Fix build

* Add unittest for getSupportedWorkspaceClasses

* Fix workspace class storage

* Adress review feedback
2023-11-10 13:13:48 +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
Anton Kosyakov
b786da190e
[server] remove gitpod support mention from errors (#19045) 2023-11-09 11:27:47 +02:00
Brad Harris
df7929ce8a
Adding ConfigurationServiceAPI (#19020)
* adding ConfigurationServiceAPI

* binding config service api to server

* use getConfiguration in dashboard

* adding missing binding

* use ApplicationError's

* add protobuf classes to query client hydration

* fixing pagination param & query

* changing to import statements for consistency and clarity on what the imports are for

* cleanup

* dropping config settings for create for now

* use protobuf field names in error messages

* removing optional on fields

* fixing converters to account for non-optional (undefined) fields

* update test

* adding more tests for findProjectsBySearchTerm

* fixing test to use offset correctly

* convert pagination args correctly
2023-11-08 22:42:46 +02:00
Huiwen
70a0f126a8
[papi] add watchWorkspace API (#19010)
* [papi] add watch workspace status api

* update import

* 1

* debug commit

* Add workspace_id to proto

* Add unit test for async generator

* Update usage of func

* update test cases

* fix json rpc watch

* 1

* remove test commit and fix missing field
2023-11-08 17:24:46 +02:00
Sven Efftinge
4c35db7587
Add "more elements" hint to repo search. (#19016) 2023-11-06 23:41:45 +02:00
Filip Troníček
e51d974c52
Local App v2 :) (#18971)
* Local App v2 :)

* bind variables correctly

* Play around with units

* Port more commands over

* Separate commands (1 per file)

* `gitpod workspace delete`

* Extract login

* Show help text when run without a command

* Fix login

* `gitpod logout`

* Simple logging

* Remove unused import

* Make host use consistent

* Fix GetToken

* Split distribution

* 🤷‍♂️

* Fix paths 🤷🤦

* Change URL of binaries

* Fix proxy binary handling

Co-authored-by: Pudong <tianshi8650@gmail.com>

* Improve logging

* Change workspace list to be up-to-spec

* `gitpod organizations list`

* Simplify table code

* `gitpod workspace get`

* Created at

* `gitpod organization get <id>`

* Hide open for now

* `workspace start --ssh`

* `ws start --open`

* server: OAuth client

* Use OAuth app

* logs

* `gitpod workspace create`

* Rename to follow singular noun semantics

* Fix nil pointers in list and go cmds

* `--field` for `gitpod organizations list`

* `gitpod ws list --field`

* Simplify some of the ws code

* Unify WS data structure

* Allow opening browser-based WSs

* `gitpod workspace open`

* Constants package to get rid of circular dependency issues

* No config file by default

* Guidance when missing in path

* Fix local companion maybe 🤷‍♂️

* Create wait for start by default

* Align scopes

* KeychainName constant

* Provide token via flag instead

* Host in scope error lookup message

* 🤷‍♂️

* Name for consistency

* Editors in go client of papi

* `gitpod workspace list-classes`

* `gitpod config`

* Infer orgs if applicable

* Remove redundant error log

* Retry mechanism for streaming

* More useful error message for unauthed

* README update

* Allow `function:getTeam`

* return org inference errors properly

* Replace config with context

* Fix config file path

* Wrap up pretty printer

* Name changes

* Remove unused vars

* 🇺🇸

* Update README

* Fix login

* [local-app] Add whoami command

* [local-app] Add context management

* Refactor common package

* Harmonise output and formatting

* Add error resolution support

* Improve resolution printing

* Add apology for system exceptions

* Add class resolutions

* Apologise more

* Add unknown field resolution

* Add better login context name

* Make it build

* `gitpod workspace list-editors`

* Fix multiple ws IDs for `ws get`

* Simplify open code

* Update local-app README with usage instructions

* Help for editor options

* Remove unused config code

* Call workspace ID field ID instead of workspace

* Improve long format output

* Fix whoami output

* Streamline workspace listing

* Introduce fancy intro

* Improve set-context feedback

* Remove common package

* Add first unit test

* Harmonise field order

* Consistency across get commands

* Consistency among list command aliases

* Fix column name in whoami

* Fix nil refs for empty hosts

* Make prettyprint writer typesafe

* Add resolutions for no token or no host found

* Fix typo

* Fix CI build

* Properly record org ID on login

* Print orgs in wide format

* Added "workspace up" functionality back in

but hidden

* Make "Git" casing consistent

https://english.stackexchange.com/questions/611711/tech-related-should-i-capitalize-the-word-git-in-this-context-or-not

* Introduce workspace up intermediary

* Fix proxied binary name

---------

Co-authored-by: Pudong <tianshi8650@gmail.com>
Co-authored-by: Christian Weichel (Chris) <chris@gitpod.io>
2023-11-06 16:32:44 +02:00
Sven Efftinge
0d19e87ff7
[dashboard] error message on ws-cluster update (#19015) 2023-11-06 15:59:44 +02:00
Sven Efftinge
f6bf401d38
[dashboard] use organization v2 shapes (#18970) 2023-11-06 15:18:44 +02:00
Sven Efftinge
59fb058cac
[dashboard] deduplicate repositories (#19013) 2023-11-05 18:24:43 +02:00
Siddhant Khare
98ea4f6e3d
Handle unknown routes to avoid stack traces leaks (#18972) 2023-11-04 09:41:42 +02:00
Siddhant Khare
9135435186
Detect Kotlin Gradle DSL & populate .gitpod.yml (#18974) 2023-11-04 09:40:42 +02:00
Sven Efftinge
0e897af454
[server] fix deleteUser permissions (#18989) 2023-10-31 21:30:38 +02:00
Filip Troníček
391266cd94
Fix ?until in BBS commit contexts (#18987)
* Fix `?until` in BBS commit contexts

* force branch name

* Change test name
2023-10-31 14:02:38 +02:00
Filip Troníček
99ff097d30
Automatically accept privacy policy upon registering (#18988) 2023-10-31 12:39:38 +02:00
Filip Troníček
15d2d34f7c
Only show privacy policy notice on Gitpod Cloud (#18985)
* Only show privacy policy notice on Gitpod Cloud

* Track dismisses
2023-10-31 11:03:38 +02:00
Anton Kosyakov
2bbf8ce6d9
[public-api] put back rate limiting (#18968)
This reverts commit 7f3b3c773cf99fa43da0f66a067b9a5adf0ab263.
2023-10-28 15:33:35 +03:00
Sven Efftinge
ae38d86476
[linting] Enable eslint/no-unsafe-argument (#18965) 2023-10-23 12:20:31 +03:00
Anton Kosyakov
38f02bdf12
[server] JWT cookie management tests (#18966) 2023-10-23 11:56:31 +03:00
Anton Kosyakov
b1a30dd8ba
[server] report internal errors to check permissions (#18964)
intead of reporting them as permission denied
2023-10-23 10:27:30 +03:00
Anton Kosyakov
7f3b3c773c
Ak/revert (#18959)
* Revert "fix JWT verification (#18957)"

This reverts commit 90c3541868da8d7dfa349632af2f385dc108a4f4.

* Revert "[public-api] add rate limiting in server (#18953)"

This reverts commit 01f100bbcbfdc2e5d1cf3098b95128f78e1d6fea.
2023-10-19 17:28:27 +03:00
Anton Kosyakov
90c3541868
fix JWT verification (#18957) 2023-10-19 16:24:27 +03:00
Anton Kosyakov
01f100bbcb
[public-api] add rate limiting in server (#18953) 2023-10-19 14:28:27 +03:00
Sven Efftinge
c46f9bf73c
[server] implement organization API (#18948) 2023-10-19 11:45:27 +03:00
Jean Pierre
b70e746af9
Increase project name max length (#18941)
* Increase project name max length

* 💄

* 💄
2023-10-18 18:22:26 +03:00
Anton Kosyakov
c7f8c35f64
[dashboard] integrate v2 WorkspaceService.getWorkspace (#18884) 2023-10-18 11:50:25 +03: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
Brad Harris
d2872f527d
adding create project modal (#18871)
* adding create project modal

* setting up portal w/ popover for dropdown

* Fixing issues with trying to display dropdown in a portal

* cleanup and adding filling in create project modal a bit

* Adding some git auth functionality

* add project id for now

* remove github logic that checks all repos

* reload projects when we create a new one

* fixing repo sorting to handle multiple projects better

* fill in repo name for projects

* excluding projects in repo results

* handling all new project buttons

* refactor Dropdown2 to use radix popover

* use radix css var for width

* remove project distinction for now

* maintain focus on search input

* adjusting validation logic on repo when creating a project

* remove scmService from server impl

* set project name on backend for now

* make w-full again

* simplify

* implement hasReadAccess for BBS

* remove canInstallWebhook and GitHub app check during webhook installation

* moving project validation into project service

* simplify

* ui cleanup

* handle case where there is no repoProvider

* mock repositoryProvider.hasReadAccess

* missed a Project.slug removal

* ui cleanup per feedback

* adding script to start on other port for local fe dev flow
2023-10-13 21:59:21 +03:00
Huiwen
eaef991c83
[papi] add ListTeamMembers and GetTeamInvitation APIs (#18919)
* [papi] add ListTeamMembers and GetTeamInvitation APIs

* fix server build
2023-10-13 18:01:21 +03:00
Gero Posmyk-Leinemann
8202ae563a
[server] Remove feature flag workspace_start_controller (#18735) 2023-10-13 11:11:21 +03:00
Gero Posmyk-Leinemann
d2adcd8e87
[spicedb] Fix application of migrations with ArgoCD (#18910)
* [spicedb] Make sure we remove the migrations job after execution

* [server] Bump RelationshipUpdater.version to 5

Reason: to trigger re-applying of all potentially broken "shared" relationships

* [spicedb] Bump version of generated types according to docker image used (v.1.25.0)
2023-10-12 11:01:20 +03:00
Gero Posmyk-Leinemann
9bde303c1e
ZedTokens: SpiceDBAuthorizer cleanup (#18898)
* [server] Extract RequextContext from EnhancedLogContext

* [spicedb] Cleanup SpiceDBAuthorizer

* [server] SpiceDB: Pass ZedToken to read requests as well
2023-10-11 10:20:19 +03:00
Sven Efftinge
55586b1ecd
[fga] bump version to redo migrations (#18907)
remove debugging code
2023-10-11 09:46:19 +03:00
Filip Troníček
3eb86ff8b7
Add cursor as an OAuth client (#18864)
* Add cursor as an OAuth client

* Template it
2023-10-10 20:22:18 +03:00
Sven Efftinge
1d3fe33e0c
[server] (re)move deprecated properties (#18894) 2023-10-10 14:12:18 +03:00
Sven Efftinge
b5d895f622
[fga] further debug sharing issue (#18903) 2023-10-10 13:13:18 +03:00
Gero Posmyk-Leinemann
7ce9553152
[server] SpiceDB: Add metric for consistency usage (#18901)
* [server] More tests for ZedTokenCache

* [server] Add metrics "incSpiceDBRequestsCheckTotal"
2023-10-10 13:02:18 +03:00
Gero Posmyk-Leinemann
e28a75620e
[server] SpiceDB: Add request-level caching based on AsyncLocalStorage+ZedTokens (#18893)
* [server] SpiceDB: Add request-level caching based on AsyncLocalStorage+ZedTokens

* [spicedb] Generate code for decoding DecodedZedToken (internal)
2023-10-10 09:55:18 +03:00
Jean Pierre
3b53a0ac4d
Update connect libraries (#18886)
* Update connect lib

* Update protoc-gen-connect-es

* Fix
2023-10-09 22:49:17 +03:00
Sven Efftinge
b9750dd110
[server] fix projcts-service (#18882) 2023-10-06 12:56:15 +03:00
Sven Efftinge
47ed26dbf3
[server] let me see the error (#18881) 2023-10-06 11:50:14 +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
Brad Harris
306061da1a
Load recent repos and not all repos for BBS (#18861)
* getting recent repos instead of all repos

* stale comment

* wrap recent repos w/ repo search flag check
2023-10-05 06:15:13 +03:00
Filip Troníček
07597d58fe
Implement searchRepos for GitLab Repository Provider (#18862)
Remove try/catch blocks

fix unused var
2023-10-05 00:22:13 +03:00
Anton Kosyakov
522dbfb050
[public-api] add request context (#18853)
* [public-api] add request context

* fix metrics and trace public api calls

* fix context

* simplify

* fix server side streams
2023-10-04 15:48:12 +03:00
Brad Harris
def4633256
Implement searchRepos for Bitbucket (#18856)
* implementing searchRepositories

* implement searchRepos for BBS

* limit fields

* remove fields

* adding gitlab searchRepos

* remove gitlab searchRepos - not working will do in a followup

* wrap calls w/ asyncBatch to limit concurrency
2023-10-03 17:25:12 +03:00