984 Commits

Author SHA1 Message Date
Gero Posmyk-Leinemann
d42b06d3b0
[CLC-2032] Block login and workspace operations for Classic PAYG sunset (#21100)
* [CLC-2032] Block login and workspace operations for Classic PAYG sunset

Implement feature flag-based blocking for Gitpod Classic PAYG users:

Backend:
- Add utility functions to check if user is blocked by sunset
- Block login attempts in /login route handler, redirect to app.ona.com
- Block workspace creation and start operations in workspace-service-api
- Exempt users with roles/permissions and users in exempted organizations

Frontend:
- Update login page to show 'Login with Ona' button when sunset is enabled
- Keep SSO login form visible for exempted organizations
- Hide sunset notice banner when flag is enabled
- Update heading to 'Gitpod Classic has sunset'

Feature flag: classic_payg_sunset_enabled (JSON with enabled boolean and exemptedOrganizations array)

Co-authored-by: Ona <no-reply@ona.com>

* Add oldLogin parameter to show full login UI for exempted orgs

When sunset is enabled on gitpod.io, users now see a simplified UI:
- 'Continue with Ona' button (default)
- Link to show all login options (?oldLogin=true)

With ?oldLogin=true parameter:
- Shows all OAuth provider buttons
- Shows SSO login form
- Full functionality for exempted organizations

The link preserves returnToPath parameter if present.

Co-authored-by: Ona <no-reply@ona.com>

* Refactor backend sunset checks into separate functions

Split sunset blocking logic into two functions:
- isUserLoginBlockedBySunset: checks roles/permissions exemption for login
- isWorkspaceStartBlockedBySunset: checks org-level exemption for workspace ops

Move ClassicPaygSunsetConfig interface to gitpod-protocol for reusability.
Pass organizationId explicitly to workspace blocking checks.

Co-authored-by: Ona <no-reply@ona.com>

* Use typed ClassicPaygSunsetConfig in frontend feature flag

Import ClassicPaygSunsetConfig type from gitpod-protocol and use it
as the default value for classic_payg_sunset_enabled feature flag.

This leverages TypeScript's generic type inference in useFeatureFlag:
- useFeatureFlag<K extends keyof FeatureFlags> returns FeatureFlags[K]
- For classic_payg_sunset_enabled, it now returns ClassicPaygSunsetConfig
- Other flags continue to return their respective types (boolean, string, etc.)

Updated Login.tsx to access .enabled property with type guard to handle
the union type (ClassicPaygSunsetConfig | boolean) during loading state.

This ensures type safety and consistency between frontend and backend.

Co-authored-by: Ona <no-reply@ona.com>

* Parse JSON string for classic_payg_sunset_enabled feature flag

ConfigCat text flags return strings, so we need to parse JSON on both
frontend and backend.

Backend (featureflags.ts):
- Send JSON.stringify(defaultConfig) to ConfigCat
- Parse returned string with JSON.parse()
- Handle errors gracefully with fallback to default

Frontend (featureflag-query.ts):
- Add parseFeatureFlagValue() helper for JSON flags
- Send stringified default for classic_payg_sunset_enabled
- Parse returned string value
- Maintain type safety with generic return types

This allows ConfigCat to store the flag as text while maintaining
the typed object structure in our code.

Co-authored-by: Ona <no-reply@ona.com>

* Exempt dedicated installations from sunset blocking

Add isDedicatedInstallation parameter to sunset check functions.
Dedicated installations always return false (not blocked) regardless
of feature flag state.

Changes:
- isUserLoginBlockedBySunset: add isDedicatedInstallation param
- isWorkspaceStartBlockedBySunset: add isDedicatedInstallation param
- UserController: pass config.isDedicatedInstallation to login check
- WorkspaceServiceAPI: inject Config and pass isDedicatedInstallation

This ensures the sunset only affects gitpod.io (PAYG) and not
dedicated installations.

Co-authored-by: Ona <no-reply@ona.com>

* update login page for Gitpod classic `gitpod.io` users

* fix

* Improve sunset UI: use primary button and remove redundant subheading

Co-authored-by: Ona <no-reply@ona.com>

* Update sunset UI heading to focus on Ona value proposition

Co-authored-by: Ona <no-reply@ona.com>

---------

Co-authored-by: Ona <no-reply@ona.com>
Co-authored-by: Siddhant Khare <siddhant@gitpod.io>
Co-authored-by: Cornelius A. Ludmann <github@cornelius-ludmann.de>
2025-10-15 09:06:36 -04:00
Cornelius A. Ludmann
e585bf7d8d
fix: resolve workspace timeout parsing bug for mixed-unit durations (#21035)
* fix: resolve workspace timeout parsing bug for mixed-unit durations

Fixes critical bug where organization timeout settings like '90m' (displayed as '1h30m')
were incorrectly parsed as '1m' instead of the intended 90 minutes.

Root cause: Custom parsing logic used:
- duration.slice(-1) to get unit (only last character)
- parseInt(duration.slice(0, -1), 10) to get value (stopped at first non-digit)

This caused '1h30m' → '1m', '2h15m' → '2m', etc.

Solution: Replace custom validation with @arcjet/duration library:
- Exact TypeScript port of Go's time.ParseDuration
- Handles all Go duration formats correctly including mixed units
- Zero dependencies, professionally maintained
- Comprehensive test coverage added

Impact: Organization admins can now set workspace timeouts like '90m'
and they will correctly result in 90-minute timeouts instead of 1-minute.

Co-authored-by: Ona <no-reply@ona.com>

* fix: migrate from @arcjet/duration to parse-duration library

- Replace @arcjet/duration with parse-duration for better Go duration format support
- Fix workspace timeout validation to handle milliseconds instead of seconds
- Add regex validation to reject bare numbers without units
- Update parseGoDurationToMs to handle null returns properly
- All 108 tests passing, mixed-unit duration bug completely resolved

The @arcjet/duration library had usage warnings and parsing issues with
mixed-unit durations like '1h30m' being incorrectly parsed as '1m'.
parse-duration is better maintained (367 dependents, 285k weekly downloads),
has zero dependencies, and provides perfect Go duration format compatibility.

Co-authored-by: Ona <no-reply@ona.com>

* fix: handle empty/whitespace strings in parseGoDurationToMs

The parseGoDurationToMs function was throwing errors for empty strings
and whitespace-only strings, but these should return 0 duration.
This was causing failures in public-api tests that expect empty strings
to be converted to 0 duration.

- Handle empty or whitespace-only strings as 0 duration
- Maintain existing error handling for invalid duration formats
- All tests now pass (108/108 gitpod-protocol, 87/87 public-api)

Co-authored-by: Ona <no-reply@ona.com>

---------

Co-authored-by: Ona <no-reply@ona.com>
2025-09-02 11:24:03 -04:00
Gero Posmyk-Leinemann
c5a55dd02a
[claude/cline] See if it works to integrate memory-bank into Claude Code (#20913)
* [cline] Fix memory-bank rules

* [claude] Integrate with memory-bank (attempt)
2025-06-19 11:41:02 -04:00
Cornelius A. Ludmann
f1dc3a5bc2
[scrubber] Scrub Git URLs in log messages (#20843) 2025-06-02 15:04:10 -04:00
iQQBot
301f1b73da
upgrade golang to 1.24.3 (#20846)
* upgrade golang to 1.24.3

* fix caddy

* update go debug

* fix non-constant format string in call to fmt Format method
2025-05-28 13:32:00 -04:00
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
Cornelius A. Ludmann
1f06a5330f
Update Gitpod client libraries (#20825) 2025-05-20 16:01:05 -04:00
Gero Posmyk-Leinemann
52848de54f
[server, dashboard, db] Org-wide "maintenance mode" (#20813)
* [dashboard] Initial infra rollout page, incl. list running workspaces

* [server, db, dashboard] Allow org-owner to stop workspace on all workspaces in the organization

Also, fix maintenanceMode update

* [public-api, db, server, dashboard] Introduce MaintenanceNofitication banner that can be configured per org

* review comments: use mutation instead of callback for state mutation

* Fix workspace start prevention

* Review comments around banners and rendering

 - permissions issues
 - add banner to /new page
 - a bunch of rendering issues and alignments
 - renaming some things for clarity (dropped "Scheduled" prefixes)
 - only allow up to 255 characters in notification messages

* [dashboard] Only show Admin entry for dedicated

* [server] Fix permissions for setMaintenanceMode to "maintenance"

* [dashboard] Adjusted copy incl. default notification message

* Review coments: re-use and fix styles, and naming

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

* Minor copy improvements

* [server] Fix bogus permission check in stopWorkspace

---------

Co-authored-by: Filip Troníček <filip@gitpod.io>
2025-05-15 09:57:00 -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
6a6052fe11
[server, dashboard] Map USER_DELETED properly through the API (#20796)
* [server] Fix OrganizationService.addOrUpdateMember

* [server] OrganizationService test: apply withTestCtx

* [server, dashboard] Replace USER_DELETED with NOT_FOUND + error details, and ensure it's properly mapped across the API
2025-05-07 10:57:53 -04:00
Gero Posmyk-Leinemann
5d557f73c8
[spicedb] Fix intermittent "Error: 4 DEADLINE_EXCEEDED...Waiting for LB pick" (#20637)
* [dev] Bump grpc/grpc-js 1.10.8 -> 1.12.6 and authzed/authzed-node 0.15.0 -> 1.2.2

Tool: gitpod/catfood.gitpod.cloud

* [server] Streamline spicedb gRPC client usage and creation options

 - instead of doing retries on two levels, rely on the gRPC-level retries
 - to mitigate the loss of insights, introduce createDebugLogInterceptor
  - client options: use sane defaults derived from the documentation instead of the excessive ones we had in place before
  - use "waitForReady" option: it should a) make our calls for responsive on re-connects, while b) - because we keep re-trying on DEADLINE_EXCEEDED - should be as reliable as before

Tool: gitpod/catfood.gitpod.cloud

* [protocol] Centralize grpc.isConnectionAlive

Tool: gitpod/catfood.gitpod.cloud

* [server] SpiceDB client: retry with new client on "Waiting for LB pick" error

Tool: gitpod/catfood.gitpod.cloud
2025-03-17 05:13:46 -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
dd50c2aee8
[api, server, dashboard] Cleanup UpdateOrganizationSettings API (#20603)
* [api, server, dashboard] Cleanup UpdateOrganizationSettings API

Tool: gitpod/catfood.gitpod.cloud

* Org settings partial updates improvements (#20626)

Tool: gitpod/catfood.gitpod.cloud

* review comment

Tool: gitpod/catfood.gitpod.cloud
2025-02-25 08:58:11 -05:00
Filip Troníček
04f590de85
Organization onboarding welcome message (#20577)
* squashed (- oidc/newUser)

Tool: gitpod/catfood.gitpod.cloud

* [server, db] Cleanup UpdateOrgSettings API handling

Tool: gitpod/catfood.gitpod.cloud

* [dashboard] Render WelcomeMessage based on a) user.createdAt and b) localStorage

Tool: gitpod/catfood.gitpod.cloud

* [api, server] Add missing update_allowed_workspace_classes field

Tool: gitpod/catfood.gitpod.cloud

* [dashboard] Fix updateOrgSettings API usage

Tool: gitpod/catfood.gitpod.cloud

* [dashboard, server] Fix duration handling/conversion

Tool: gitpod/catfood.gitpod.cloud

---------

Co-authored-by: Gero Posmyk-Leinemann <gero@gitpod.io>
2025-02-14 08:14:50 -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
Filip Troníček
754dc9eb38
Organization-recommended repositories (#20559)
* [server] implement `recommendedRepositories` API field

Tool: gitpod/catfood.gitpod.cloud

* [dashboard] implement org-suggested repositories

Tool: gitpod/catfood.gitpod.cloud

* [dashboard] Spacing and pill labels

Tool: gitpod/catfood.gitpod.cloud

* update copy

Tool: gitpod/catfood.gitpod.cloud

* Get rid of debug fluff

Tool: gitpod/catfood.gitpod.cloud

* Fix onboarding page heading

Tool: gitpod/catfood.gitpod.cloud

* minor nitfix

Tool: gitpod/catfood.gitpod.cloud

* Cascade project deletions to repo recommendations

Tool: gitpod/catfood.gitpod.cloud

* Fix db tests

Tool: gitpod/catfood.gitpod.cloud

* Fix docs link

Tool: gitpod/catfood.gitpod.cloud

* add db test

Tool: gitpod/catfood.gitpod.cloud

* Fix showing suggested repos even with no user contributions

Tool: gitpod/catfood.gitpod.cloud

* Add organization suggested repositories to RepositoryFinder

Tool: gitpod/catfood.gitpod.cloud

* Don't add recommended repos to workspace list for now

Tool: gitpod/catfood.gitpod.cloud

* Regular repo icon for org-suggested repos

Tool: gitpod/catfood.gitpod.cloud
2025-02-04 08:31:19 -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
Filip Troníček
9b574a9022
[server] make gRPC clients viable in non-HTTP/2-compatible environments (#20565)
* [server] make gRPC clients viable in non-HTTP/2-compatible environments

Tool: gitpod/catfood.gitpod.cloud

* Address review comments

Co-authored-by: Gero Posmyk-Leinemann <gero@gitpod.io>
Tool: gitpod/catfood.gitpod.cloud

---------

Co-authored-by: Gero Posmyk-Leinemann <gero@gitpod.io>
2025-01-30 07:00:19 -05:00
Filip Troníček
c24b8f4aed
Add optional, org-wide Gitpod commit annotation (#20525)
* [supervisor] Add Gitpod commit annotation

* server and API changes

* [dashboard] add org setting for commit annotation

* Fix things

* Fix label for annotation switch

* Revert accidental rename

* minor docs fixes

* Add a feature flag for the setting: `commit_annotation_setting_enabled`

* Register hook in the cloned repo instead of under /etc/

* don't override existing hooks

* `gp git-commit-message-helper` to use `git interpret-trailers`

* Test it!

* 🧹 indeed

* Update timestamp of DB migration
2025-01-24 08:11:14 -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
Filip Troníček
d54bd04999
Enteprise onboarding settings (#20508)
* UI reorg

* generated stuffs

* Make it woooooooork

* Classier placeholder

* Remove unneeded fragment

* Introduce `enterprise_onboarding_enabled` flag

* move things properly

* add ipv6 localhost
2025-01-08 11:05:23 -05:00
Filip Troníček
7ac347a771
[server] log all deletion eligibility time updates (#20497) 2025-01-06 06:08:21 -05:00
Filip Troníček
b29e06a67e
[server] Fix workspace service's workspace ID validation (#20468) 2024-12-19 10:34:04 -05:00
Filip Troníček
55b486ee5f
Introduce max_parallel_running_workspaces for orgs (#20448)
* Introduce `max_parallel_running_workspaces` for orgs

* Add migration

* Add UI and org settings server changes

* Rough edges

* Number inputs (:trollface:)

* Move LazyOrganizationService to UBP entitlement service to get rid of circ. dep. errs

* Fix tests

* Update components/gitpod-db/src/typeorm/entity/db-team-settings.ts

Co-authored-by: Gero Posmyk-Leinemann <gero@gitpod.io>

* Rename `isPaidPlan` to `isPaidOrDedicated` and get rid of `update_max_parallel_running_workspaces`

* Update components/server/src/workspace/workspace-service.ts

Co-authored-by: Gero Posmyk-Leinemann <gero@gitpod.io>

* Deduplicate instance counting logic

---------

Co-authored-by: Gero Posmyk-Leinemann <gero@gitpod.io>
2024-12-16 09:06:02 -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
5bb738a530
Add WS image metrics to workspace instances (#20426)
* Add WS image metrics to workspace instances

* Update tests

* fix ws-manager-api field description

* Prefer existing DB values for metrics

* Copy proto comments over to protocol type
2024-12-09 05:01:16 -05:00
mustard
83bfa202ca
[papi] add editor info to experimental.v1 (#20405)
* Update proto

* proto gen

* protocol update

* convert ide config

* proto def +1

* proto gen +1

* papi impl +1

* impl + 2

* Update components/public-api-server/pkg/apiv1/workspace.go

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

---------

Co-authored-by: iQQBot <tianshi8650@gmail.com>
2024-11-29 16:08:06 -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
Filip Troníček
9d42ec3ede
Follow-ups from #20269 (#20272)
* Follow-ups from #20269

* `matchesNewWorkspaceIdExactly` to handle `undefined`
2024-10-07 06:15:22 -04:00
Filip Troníček
3f0fc73f50
Fix spicedb throwing on invalid arguments (#20269) 2024-10-07 03:55:22 -04:00
Filip Troníček
7095780d3e
Non-project repository starting restrictions (#20234)
* add proto

* codegen

* impl

* WIP UI

* make it work

* Make it work

* Empty state

* Update copies (thx Fernando!)

* Fix tip flexbox

* fix newline for role restriction empty state

* When arbitrary repos are restricted, don't suggest them
2024-09-27 14:36:13 -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
Filip Troníček
fdbf605e80
Cell Disabled mode (#20222)
* wip

* Implement UI

* remove commented out code

* Cell disabled check for websockets
2024-09-18 04:06:03 -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
mustard
02b49524eb
Add full clone setting for prebuilds (#20177)
* proto update

Co-authored-by: Filip Troníček <filip@gitpod.io>
Co-authored-by: Gero Posmyk-Leinemann <32448529+geropl@users.noreply.github.com>

* dashboard + server

---------

Co-authored-by: Filip Troníček <filip@gitpod.io>
Co-authored-by: Gero Posmyk-Leinemann <32448529+geropl@users.noreply.github.com>
2024-09-11 04:44:57 -04:00
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
Filip Troníček
8e8a5db974
[PAPI] Retry steams upon not receiving data for 10 seconds (#20172)
* [PAPI] Retry steams upon not receiving data for 10 seconds

* [PAPI] Retry steams upon not receiving data for 10 seconds (#20176)

* debug message

* Do not listen for ws updates globally and do not timeout for those calls

* Timeout signal as a getter

* use ff for disablement

* accesor fn => getter

* send empty initial data in papi for global ws watch requests

---------

Co-authored-by: Gero Posmyk-Leinemann <gero@gitpod.io>
2024-09-06 04:31:49 -04:00
Gero Posmyk-Leinemann
414ee45983
[supervisor] Frontend: re-try + track "checkReady" (#20175)
* [ws-proxy] Log whenever we can't connect to an upstream

* [protocol] Fix linter error

* [supervisor] Frontend: re-connect every 5s + track behavior

* [supervisor] Frontend: Guard connection re-try with feature flag "supervisor_check_ready_retry"
2024-09-05 10:54:48 -04:00
Filip Troníček
acae8deec5
Lower fetch priority of metrics (#20158)
* Minor improvements to metrics requests

* Fix builds
2024-08-30 11:46:43 -04:00
Filip Troníček
f5acd61fcd
Organization timeout defaults (#20099)
* Organization timeout defaults proto

* Generated code

* Implement TimeoutSettings on the API layer

* Add timeout setting UI

* Actually change default workspace timeout based on org settings

workspace starter fixes

* Add alert for free plans

* denyUserTimeouts

* [dashboard] Fix check for "timeout config eligibility" by using BillingMode

* [server] Drop FF "disable_set_timeout"

* fix

* Move to team policies

* don't include `timeoutSettings` if not set

* [dashboard] TeamPolicies: Disable "save" if workspace timeouts are disabled

---------

Co-authored-by: Gero Posmyk-Leinemann <gero@gitpod.io>
2024-08-13 03:51:15 -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
Gero Posmyk-Leinemann
a03a28ef63
[audit log] Fix audit log persistence (#20054)
* [audit] Catch + log errors properly

* [audit] Properly serialize BigInts

* [public-api] Fix PublicApiConverter toAuditLog by re-using the BigIntToJson.replacer
2024-07-22 10:13:30 +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
Filip Troníček
6b2187ae23
Activity-based prebuilds (#20006)
* Start prebuilds on started workspaces

* Fix circl dep

* move out to workspace creation

* Do it in the workspace service

* remove webhook tests

* remove webhook handling code

* Revert "remove webhook handling code"

This reverts commit d7c4550ec6b16091344607bfeee234b1f0e5705b.

* Anotate new setups with an `activity-based` activation strategy

* Update tests

* Alert banner

* add correct changelog path

* fix tests

* Remove code for registering prebuilds

* Still pass prebuild preconditions in order to run

* Re-add link to prebuild history of a repo

* Rename to trigger strategy and change project activity indicator
2024-07-12 17:49:51 +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
Gero Posmyk-Leinemann
fbc0d76554
Prebuild issues roundup (#20000)
* redirect in the offline case

* [public-api] generate noise

* [server] Refactor Prebuild resolution to happen in a single place

* [dashboard, api] Show Prebuild details

* fixup! [server] Refactor Prebuild resolution to happen in a single place

* [bridge] Revive Prebuild QUEUED state: it's everything before running

* [server] Fix dead-end for streaming logs when starting too early

* [dashboard] Adds SHA + duration, fix re-rendering when prebuildId changes, and uses the new/old streaming logic

WIP because still has the "duplicate (sometimes triple!) logs" react re-rendering issue

* Prevent unnecessary re-renders of task output

* remove double-comment

* Duration display improvements

* Properly dismiss toasts and render durations

* Remove SHA from prebuild list

* Clean up and implement the `reset` event for workspace logs

* fix comment

* Tiny cleanup

---------

Co-authored-by: Filip Troníček <filip@gitpod.io>
2024-07-10 04:50:55 -04:00