1953 Commits

Author SHA1 Message Date
Filip Troníček
77f3fde7a2
[server] Add organization image auth context to workspace image validation (#20560)
* [server] Add organization image auth context to workspace image validation

Tool: gitpod/catfood.gitpod.cloud

* Introduce `listOrgEnvVarsWithValues`

Tool: gitpod/catfood.gitpod.cloud
2025-01-29 04:48:18 -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
5c8700e427
[dashboard] Add org resources to the top of the workspace list (#20520)
* UI reorg

* generated stuffs

* Make it woooooooork

* Enterprise workspace list overhaul

Todo:
- [ ] only enable on dedicated installs
- [ ] add org setting for org-wide suggestions
- [ ] possibly adopt `Recommended` badges from figma
- [ ] open configurationId instead of cloneUrl if possible

* Conditionally show top sections

* Refactor PillLabel component usage and improve workspace card layout

* Reduce PR scope

* Behave nicely in dedicated emulated preview envs

* Make Getting started dismissible

* Still show old empty ws page for PAYG

* Use ff to display

* accordions are stylish (and clean u user prefs)

* Approach accordions differently (feat. @geropl)

* Revert things for later

* Get rid of debug logs!

* Use pk colors
2025-01-16 06:09:31 -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
Nandaja Varma
4bd992439c
[oidc] Fix the HEAD method call that checks reachability (#20474)
* [oidc] Fix the HEAD method call that checks reachability

* [server] Fix setup flow

---------

Co-authored-by: Gero Posmyk-Leinemann <gero@gitpod.io>
2024-12-20 03:01:05 -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
da1d931464
[server] fix private GitHub avatars (#20461)
* [server] fix private GitHub avatars

* Improve comment and don't delete all search params
2024-12-17 04:20:02 -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
Filip Troníček
a303660a5f
Add insights page (#20437)
* Add WS image metrics to workspace instances

* Update tests

* fix ws-manager-api field description

* [dashboard] Org Insights page

* Pagination, date filters and downloads

* Safety limits for pagination and prettier icons

* UI improvements

* Enhance `from` date to capture whole day

* some more props for the CSVs

* Include git context with workspace responses

* Context url segments in CSV

* ide => editor to align with papi convention

* Remove duplicate fc

* revert route deletion

* Update papi converter tests and revert unecessary changes

* fix error rendering

* partly revert ws api svc changes

* Remove debug lines

* fix proto typo

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

* Remove org member listing from frontend

* Shorter == better 😎

* Move workspace.metadata.context onto a top-level `WorkspaceSession` property

---------

Co-authored-by: Gero Posmyk-Leinemann <gero@gitpod.io>
2024-12-12 08:55:33 -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
2db6b3f43a
[server] Fix permission check for logs streaming (#20423) 2024-12-05 04:04:12 -05:00
Filip Troníček
26d2b1cc6f
[server] Add SCM repo search integration tests (#20413)
* [server] Add SCM repo search integration tests

* bbs prefix search test
2024-12-03 08:28:10 -05:00
Filip Troníček
c4d64c06e2
[server] fix more revealing BB error logs (#20402)
* [server] fix more revealing BB error logs

* MOORe

* Introduce `BitbucketHttpError` to redact more effectively

* Make it work?

* comment fix

* 💶
2024-11-30 14:23:07 -05:00
Filip Troníček
050942fe05
Don't be so chatty when hasReadAccess throws (#20400) 2024-11-29 03:39:06 -05:00
Filip Troníček
cc6e7a0e92
Clean up repositoryFinderSearch feature flag (#20399)
* Clean up `repositoryFinderSearch`feature flag

* Fix `test_getUserRepos_ok` test
2024-11-28 08:59:05 -05:00
Filip Troníček
fc65cf1751
[server] increase getToken bucket size (#20398) 2024-11-28 04:51:05 -05:00
iQQBot
490f507422
[server] move getToken api to separate group (#20391) 2024-11-27 06:14:04 -05:00
Filip Troníček
e389b85b4b
Enable collaborators (#20353)
* Enable collaborators

* Fix forgotten debug logs

* Such a dumb typo I wonder who wrote it

* Fix schema

* Fix typo

* Fix prebuild page button a11y

* Update permissions

* Fix prebuild checks

* Change names around
2024-11-22 09:14:00 -05:00
Filip Troníček
ba7dce5445
Fix SCM integration tests and run them on build (#20379)
* Fix SCM integration tests

* fixup bbs test expectation with official testing token

* Add note about GitLab search

* Update GHA

* Add ADO token definition
2024-11-20 09:18:58 -05:00
Filip Troníček
2cd06706f6
Fix prebuild lookup for prebuilds run in reverse-chronological order (#20360)
* Fix prebuild lookup for prebuilds run in reverse-chronological order

* Minor fixes

* 🧹

* Simplify prebuild ordering

* [server] Prefer exact matches plus order incremental matches by commit history

* Do expensive image and prebuild promises in parallel

* [server] Prefer exact matches plus order incremental matches by commit history

* Fix test comment typo

* Do commit index computation once + better logs

---------

Co-authored-by: Gero Posmyk-Leinemann <gero@gitpod.io>
2024-11-15 09:53:53 -05:00
Filip Troníček
7d3f447bc9
Fix dockerfile paths with relative decorators (#20365) 2024-11-14 05:18:52 -05:00
Filip Troníček
177367e4d2
Fix GitHub Integration tests (#20363) 2024-11-14 02:23:52 -05:00
Filip Troníček
e5eb61ddc7
Fix Bitbucket Server repository provider tests (#20364) 2024-11-13 10:42:52 -05:00
Gero Posmyk-Leinemann
4a709610ae
[server] Add more tests around "prebuild selection" (#20358)
* [server] Extend and fix context parser tests around prebuild discovery

* [server] Add more "prebuild selection" tests to ContextService

* review comments

* [server] Fix order of commits in MockRepositoryProvider to be aligned with actual implementation

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

---------

Co-authored-by: Filip Troníček <filip@gitpod.io>
2024-11-12 09:28:50 -05:00
Filip Troníček
8e7678a122
Log edge case for updateDeletionEligibilityTime (#20354) 2024-11-08 10:21:04 -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
810f5e9a01
[WS CLI] Make env --scope=user compatible with GitLab groups (#20279)
* [WS CLI] Make `env --scope=user` compatible with GitLab groups

* Allow updating `*/*` scoped vars for backwards compat

* Fix test races
2024-10-22 13:39:52 -04:00
Filip Troníček
33942e7179
[ws-gc] WS soft deletion improvements (#20271)
* [ws-gc] Additional logging

* typo fix

* test update

* Workspace is active now if it just stopped, started or just got created

* Don't ever GC currently running workspaces

* Fix tests

* Fix tests

* No more async filter predicates

* More prevention logging

* Log all timestamps and don't update `lastActive` when `activeNow === true`

* even cooler timestamps

* Add instance id to log context

* Remove filtering for only non-running workspaces
2024-10-15 08:25:12 -04:00
Filip Troníček
b1b2214bef
Provide a nicer image build failed message (#20281)
* Provide a nicer image build failed message

* an error message that actually shows up

* Tweak error message

* Make env retrieval consistent in supervisor config

* Fix broken docs link in dashboard
2024-10-15 05:53:11 -04:00
Filip Troníček
6f87a7a3d7
Repository finder & context parsing improvements (#20296) 2024-10-14 04:15:10 -04:00
mustard
b429e9373c
Disable JetBrains local ports forwarding with FF (#20274)
* Disable gitpod port forwarding

* Use FF and env to control port exposing

* Rename to `forwarding`

* disable local ports forwarding only
2024-10-11 10:18:26 -04:00
Filip Troníček
2a5da84ea8
Improve handling of missing files for BB and BBS (#20267)
* Fix repo names for Bitbucket (Server)

* remove unused project mutation

* Update tests

* Improve handling missing files for BB and BBS

* add tests
2024-10-07 08:51:22 -04: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
91e9cb4b2d
[Bitbucket Server] better tag context handling (#20245) 2024-09-26 10:52:11 -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
cfe795c6ee
Prebuild trigger checks (#20228)
* Add `GetConfigurationWebhookActivityStatus` to proto

* codegen

* `GetConfigurationWebhookActivityStatus` impl

* give it a UI

* Revert trigger strategy on webhook event

* debug: enable webhooks again

* fix UI

* maybe fix build?

* Automatically convert to activity-based prebuilds

* 🤷‍♂️

* don't limit to a week when converting to activity-based

* Change copy

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

* Less cyclic deps

* removing warning and add informative trigger strategy field

* fix sizing of prebuild trigger strategy info

* Revert "debug: enable webhooks again"

This reverts commit 1c47067734b9f19bbe7e72522eab387fec6022b5.

---------

Co-authored-by: Gero Posmyk-Leinemann <gero@gitpod.io>
2024-09-23 09:00:08 -04:00
Filip Troníček
abb191fce0
Hashed user ID cookie improvements (#20232)
* refetch JWT cookie 20s after load

* set cookie on login

* make the cookie trigger at the right place
2024-09-18 21:57:04 -04:00
Siddhant Khare
92f3ec07d2
Implement hashed user ID cookie for analytics on Gitpod domains (#20231)
* Set hashed user ID cookie on JWT refresh for specific Gitpod domains

* refactor: Update setHashedUserIdCookie method in session handler for testing purposes

* attempt 2 to fix test

* refactor: Clear gitpod_hashed_user_id cookie after logout
2024-09-18 09:50:03 -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
Siddhant Khare
d5208cbc7e
refactor: Update setHashedUserIdCookie method in analytics controller (#20229)
* refactor: Update setHashedUserIdCookie method in analytics controller

This commit updates the setHashedUserIdCookie method in the analytics controller. The changes include:
- Adding a server-side implementation to determine the appropriate domain for setting the cookie based on the request hostname

* nit fix :)

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

---------

Co-authored-by: Filip Troníček <filip@gitpod.io>
2024-09-18 02:46:03 -04:00
Siddhant Khare
b0596ee60b
chore: Add hashed user ID cookie in analytics controller service (#20226) 2024-09-17 07:58:02 -04:00
Filip Troníček
35f53b9386
Enforce minimum scopes in the UI (#20217) 2024-09-16 03:56:02 -04:00
Filip Troníček
c79f478362
Reduce required Bitbucket scopes (#20195) 2024-09-13 03:16:59 -04:00