149 Commits

Author SHA1 Message Date
Huiwen
0acd42e106
Migrate gRPC VerificationService (#19143)
* Implement

* use on dashboard

* Add test case

* fixup

* fix build

* Update proto

* Update

* 💄

* 💄

* [verificationservice] added mock impl for previews

---------

Co-authored-by: Jean Pierre Huaroto <jeanp413@hotmail.com>
Co-authored-by: Sven Efftinge <sven@gitpod.io>
2023-11-28 17:56:06 +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
Jean Pierre
c201a2d9df
[public-api] migrate ssh service (#19110)
* migrate ssh service

* 💄

* 💄

* fix build

* Fix

---------

Co-authored-by: Huiwen <mhqnwt@gmail.com>
2023-11-23 07:12:00 +02:00
Huiwen
fa3cca46c0
Migrate CreateAndStartWorkspace method in dashboard (#19076)
* Migrate WorkspaceService.CreateAndStartWorkspace

* Add unit tests

* Fix rebase build error
2023-11-22 18:23:59 +02:00
Alex Tugarev
9374be99f7
[papi] Rename SearchSCMTokens RPC (#19104)
* [papi] rename to SearchSCMTokens

* doc RPCs
2023-11-22 12:17:00 +02:00
Brad Harris
73a1c76985
Add sorting to imported repos list and corresponding API (#19097)
* adding sorting support for ListConfigurations

* Getting sortable headers partially setup

* killing the global button styles

* Updating sortable headers

* cleanup

* adding comment about sort field

* Update components/dashboard/src/app/Blocked.tsx

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

* Update components/dashboard/src/components/Button.tsx

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

* Update components/dashboard/src/components/podkit/buttons/Button.tsx

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

* Update components/dashboard/src/components/toasts/Toast.tsx

remove redundant styles

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

* Update components/dashboard/src/components/podkit/tables/SortableTable.tsx

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

* Update components/dashboard/src/usage/UsageDateFilters.tsx

remove redundant style

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

* Update components/dashboard/public/complete-auth/index.html

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

* extracting to a local LoginButton component

* whoopsie

---------

Co-authored-by: Filip Troníček <filip@gitpod.io>
2023-11-22 00:08:59 +02:00
Jean Pierre
4aef5ceb84
[public-api] Some renaming (#19095)
* 💄

* 💄

* 💄
2023-11-22 00:07:59 +02:00
Filip Troníček
6f7ff4f7f4
updateConfiguration (#19080)
* `updateConfiguration`

* typdate

* Try with no deeply nested property

* JKADFkosaNcISADFuisabnfhjl hjkafb ashjdbjbhj

* Constrain even further

* Return the configuration

* Fix update mutation

* Only update necessary properties

* Implement name changes

* typastuff

* 🙄

* Mutation update

* 🤷‍♂️

* Type fixes

* Conditionally pass in name

* Partials

* Fix type mishap

* Update mutation name

* Tweak types

* Reduce abstractions

* Only supply name if applicable

* Better partial assignment

* Deepmerge with originals

* Only update fully when necessary

* Fix name conversion in papi converter

Co-authored-by: Gero Posmyk-Leinemann <32448529+geropl@users.noreply.github.com>

* Assert some converted properties to not exist

* Disallow empty configuration names

* Add cache update todo

* fix type vs class

* Error toasts

* Be less strict about value of name

* Toast the actual updated name

* Fix tests :-)

---------

Co-authored-by: Gero Posmyk-Leinemann <32448529+geropl@users.noreply.github.com>
2023-11-21 22:42:00 +02:00
Anton Kosyakov
6933bab2b6
[public-api] migrate PrebuildService (#19062) 2023-11-21 17:14:58 +02:00
Anton Kosyakov
0a5d89cecc
[public-api] define error details (#19102)
+ ensure consistent formatting
2023-11-21 16:00:58 +02:00
Alex Tugarev
41a89f34f9
[papi] Add proto for SCMService (#19075)
* [papi] Add proto for SCMService

* fixup: add missing pagination to list method
2023-11-21 13:40:58 +02:00
Brad Harris
a409eb0792
Adding pagination tokens for config service (#19078)
* wip for getting pagination tokens setup

* swapping pagination for token based load more UI

* disable refetch on window focus

* partially working infiniteQuery

* updating proto files for pagination

* updatnig pagination to handle load more approach

* adding bottom margin

* adding tests

* encode search term query param

* validate params

* change button variant

* making sure we don't drop some props

* Update components/dashboard/src/data/configurations/configuration-queries.ts

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

---------

Co-authored-by: Filip Troníček <filip@gitpod.io>
2023-11-20 17:09:58 +02:00
Jean Pierre
9748ce3c1e
[public-api] Add ssh key proto (#19090)
* add ssh key proto

* Update
2023-11-20 15:09:58 +02:00
Jean Pierre
f7e11f50ef
Add envvar proto file (#19085) 2023-11-17 10:52:55 +02:00
Huiwen
4324fcb0a0
[papi] migrate ListWorkspaces and WatchWorkspaceStatus (#19022)
* [papi] migrate ListWorkspaces and WatchWorkspaceStatus

* bump up cache version
2023-11-16 20:44:54 +02:00
Anton Kosyakov
a290b8b7d3
[public-api] define PrebuildService (#19082) 2023-11-16 15:10:54 +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
Wouter Verlaek
185c0428c2
[scrubber] Improve KeyValue performance (#19052)
* [scrubber] Improve KeyValue performance

* Update benchmark comment

* update go mod

* Add metaID to hashed fields

---------

Co-authored-by: Pudong Zheng <pudong@gitpod.io>
2023-11-10 16:17:48 +02:00
Alex Tugarev
f38e12e758
add authprovider.proto to public-api (#19041)
* add authprovider.proto to public-api

* update proto according to guidelines
2023-11-10 11:26: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
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
f6bf401d38
[dashboard] use organization v2 shapes (#18970) 2023-11-06 15:18:44 +02:00
Sven Efftinge
c46f9bf73c
[server] implement organization API (#18948) 2023-10-19 11:45:27 +03:00
Anton Kosyakov
2338184cfb
[public-api] add v2 WorkspaceService.getWorkspace (#18930) 2023-10-17 11:06:25 +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
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
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
Anton Kosyakov
352484b34d
node grpc spike dashboard to server (#18691)
* [public-api] add dummy service for testing

* [public-api] proxy dummy to server

* [public-api] hello service server impl

* [server] fix API contribution bindings

* [dashboard] emulate unary call

* only if actually called

* [dummy] auth

* fix tests

* [server] add interceptor to public api

* add server side observability

* fix port name

* change to unimplemented for unknown methods

* [public-api] client metrics

* fix metrics imports

* align server metrics

* actually fix metrics

* add feature flags

* fix server side streams

* [dashboard] hook error reporting

* rebase and fix imports

* feature flagged metrics from dashboard

* revert GRPC_TYPE

* address feedback
2023-09-15 13:46:54 +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
Sven Efftinge
71912f721b
Allow renaming project (#18630)
remove project#slug
2023-09-04 09:42:01 +02:00
Filip Troníček
694f8eaeaf
[papi] List workspace classes (#18546)
* [papi] List workspace classes

Adds the `ListWorkspaceClasses` method on `WorkspacesService`.

* Add test for class listing

* `Title` -> `DisplayName`

* fix rename in tests

* Update generated
2023-08-24 10:53:50 +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
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
Manuel Alejandro de Brito Fontes
513ca768f6
Update buildkit to v0.12.1 (#18505)
* Update buildkit to v0.12.1

* Update DisplaySolveStatus signature

* Switch to github.com/containerd/typeurl/v2
2023-08-15 09:17:40 +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
Manuel Alejandro de Brito Fontes
61f89f8436
Update go modules (#18372) 2023-07-28 16:20:30 +08:00
Manuel Alejandro de Brito Fontes
8c6d8e28f3
Update dependencies (#18362)
* Update k8s dependencies to v1.27.3

* Update opencontainers/runtime-spec to v1.1.0

* Update controller runtime to v0.15.0

* Update go modules

* Fix build

* Cleanup

* Fix ws-manager e2e tests
2023-07-27 23:34:29 +08:00
Manuel Alejandro de Brito Fontes
54c2040632
Update go modules to 1.20 (#18360) 2023-07-27 22:24:29 +08:00
Filip Troníček
d9f8a099ed
Add Repository to WS info in Public API (#18330)
* Add more Git details to Public API

* Only add `Repository`

* Remove remaining branch references

* Update workspace tests

* Remove additional unneeded metadata

* Swap arg order to match proto
2023-07-26 16:20:42 +08:00
Manuel Alejandro de Brito Fontes
57c605ddc4
Cleanup scrubber go module dependency (#18149) 2023-07-04 16:37:21 +08:00
Anton Kosyakov
f580e6bd00
fix SID-285: hook scrubber as logrus formatter (#17781) 2023-06-29 17:16:47 +08:00