-
Notifications
You must be signed in to change notification settings - Fork 351
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
[JENKINS-71355] Avoid Fetching all branches and Tags to retrieve SCM … #708
Conversation
I have run tests against Bitbucket Server branches, tags and PR from origin. |
Failing in Bitbucket Cloud because the
Seems like this is a known problem but that in the context the PR commits are never initialized (we never go through the BitbucketCloudBranch#initHeadCommitInfo) method. Called lazily when retrieving information about the PR ( |
Thanks @Dohbedoh for this (and also providing tests), I will merge in shortly |
@lifeofguenter wait, see my previous comment. I need to adjust this to get the commit IDs from branches in case of Bitbucket Cloud. Will commit shortly. |
@lifeofguenter ready for review |
When upgrading this plugin from v803 to v804 multibranch pipeline jobs "don't run" anymore. I can trigger the job but it gets stuck at the very beginning (there's literally no job log) and eventually times out after a couple of minutes. If I kill the job I get the following log:
Jenkins LTS 2.401.1 Any idea what's going on here? Happy to provide additional information or to raise a bug. |
…Head
See JENKINS-71355. When retrieving a single SCM Head, BitbucketBranchSource currently fetches all branches (and also tags in the case of a Tag) although it is not necessary.
Note: One challenge / limitation is with Bitbucket Server API that does not have an endpoint to get a single branch information. We can however send a filterText parameter to get what we want and then use a predicate to make sure we have the correct branch (because per my understanding the filter may returns several matches if for example a branch name is a substring of another one). But in most cases, just the branch we look for will be returned.
Your checklist for this pull request