-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[server] createProject should not query all repositories – EXP-459 #18532
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
except for github.com when using the GitHub App.
ed2075f
to
c3e4f87
Compare
c3e4f87
to
a15a073
Compare
type === "GitLab" || | ||
type === "Bitbucket" || | ||
type === "BitbucketServer" || | ||
(type === "GitHub" && (authProvider?.host !== "github.com" || !this.config.githubApp?.enabled)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feels like we are checking for all types we support explicitly. I wonder for which cases this code is not applicable...? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(reviewing now 👀 ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Repo listing and project creation works like it's supposed to
} else { | ||
return await this.scmService.canInstallWebhook(currentUser, cloneURL); | ||
|
||
// note: the GitHub App based check is not included in the ProjectService due |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To me this is kind of a red flag to not but both things togehter in a SCMService, honestly. Also, most of that functionality seems util functions around HostContext and the likes, maybe we can place them in such a place (without injection) which resolves/avoids the cycle.
I would be ok to merge this today in favor of turnarounds, if we resolve it tomorrow maybe? 🙃
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's resolve this in a different context 🙏🏻
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM, tested and works ✔️
the nit here can be adressed async
/unhold |
This is to fix issues when listing all repositories is super expensive and might even burn all the rate limit at the Git provider.
Description
Summary generated by Copilot
🤖 Generated by Copilot at 8c04321
This pull request adds a new method to check the user's ability to create a Gitpod project from a GitHub repository using the GitHub App integration. It also refactors the
createProject
API method to use the new check.Related Issue(s)
Fixes EXP-459
How to test
See that you can create projects as it's used to be.
Documentation
Preview status
Gitpod was successfully deployed to your preview environment.
Build Options
Build
Run the build with werft instead of GHA
Run Leeway with
--dont-test
Publish
Installer
Add desired feature flags to the end of the line above, space separated
Preview Environment / Integration Tests
If enabled this will build
install/preview
If enabled this will create the environment on GCE infra
Valid options are
all
,workspace
,webapp
,ide
,jetbrains
,vscode
,ssh
. If enabled,with-preview
andwith-large-vm
will be enabled./hold