* [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>
* [JetBrains] add more integration tests
* Add deps
* Add in workspace JetBrains integration test
* Support papi
* fixup
* Test succeed
* remove unnecessary code
* Fixup
* Remove warmup TODO item
* Add doc for sh file
* Increase timeout and make it run in parallel
* Use empty
* fixup
* Sleep
* db wait
* speed up
* 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>
* 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
* 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>
* 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
* 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
* [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