-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[bitbucket] make less requests and fail on error #11651
Conversation
@@ -15,10 +15,7 @@ export class BitbucketFileProvider implements FileProvider { | |||
@inject(BitbucketApiFactory) protected readonly apiFactory: BitbucketApiFactory; | |||
|
|||
public async getGitpodFileContent(commit: Commit, user: User): Promise<MaybeContent> { | |||
const yamlVersion1 = await Promise.all([ | |||
this.getFileContent(commit, user, ".gitpod.yml"), | |||
this.getFileContent(commit, user, ".gitpod"), |
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.
I don't know where all the API calls are coming from, but asking for .gitpod
every time is unnecessary.
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.
Do we have any metrics that would allow us to trace this? Could we add the metrics first to understand the source of these requests?
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.
I agree we need to better understand why we run into the limit (atlassian says the limit is 1000/hour [1]). But we have customers sitting on a bad experience today and removing this call does make sense in anyway even if it doesn't help with the rate limit. So I'd like to go ahead with this change and follow up with investigation of the api calls.
started the job as gitpod-build-sefftinge-bitbucket-failed-calls-11649.1 because the annotations in the pull request description changed |
Turns out that a lot of calls are coming from config inferrer |
fixes [BitBucket] Failed calls to fetch `.gitpod.yml` are silently ignored #11649
77432ff
to
d7d1d0f
Compare
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.
Change looks sensible, but I frankly don't have sufficient context around this part of config resolution to know if there are skeletons. Adding hold in case you want to wait for a review from someone with more context.
/hold
This PR makes the logic for finding a gitpod.yml sequential.
Currently, we run the gitpod.yml inference on every workspace start, which sends lots of requests (around 20) to the git provider in order to check for build files. Since this is a fallback mode that is only relevant in those cases where there is no
.gitpod.yml
I have changed the logic so it is sequential and only runs when really needed.fixes #11649
How to test
Start workspaces on repositories with gitpod.yml and without.
Make sure the right gitpod.yml is used.
Release Notes
Werft options: