-
Notifications
You must be signed in to change notification settings - Fork 349
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
Pull-Requests no longer working on BitBucket Server 7.0 #287
Comments
🤷♂ Feel free to revert until some kind soul contributes the code for Bitbucket 7 |
Ok, trying to build a fix. |
Not seeing anything note worthy: https://developer.atlassian.com/server/bitbucket/reference/api-changelog/ so double 🤷♂ |
as a workaround i disable pr's and only build regular branches |
Hmm sure your it is not a one time thing: https://docs.atlassian.com/bitbucket-server/rest/7.0.1/bitbucket-rest.html#idp280 this is still documented as is. |
ok, updating to 7.01 to see if its a bitbucket bug |
The |
yes, i think there should be the commit id. |
You'd have to debug what the API is returning since that is somewhat unexpected 🤔 |
ok, np. i have some java experience. i also know the bitbucket api from our renovatebot 😅 |
Looks like 7.0.1 is working 🤔 |
😖 |
so closing this as it's working again. 🤷♂️ |
I'm also seeing this same issue with building PRs after upgrading to Bitbucket 7.0.1 yesterday. Anything I can do/test to help get this fixed? |
Nope, disabled pr build for now. Currently the only fix is to downgrade. |
|
The git refrences pull request refs (refs/pull-requests/*) have never been supported by BitBucket / Atlassian as part of their API. https://community.atlassian.com/t5/Bitbucket-questions/Difference-of-refs-pull-requests-lt-ID-gt-merge-and-refs-pull/qaq-p/772142 |
OK, trying to send a pr which uses the rest api |
Are I'm right that this need to be fixed here: Lines 101 to 110 in 3dbf6b6
|
Have we considered forcing the refs creation again by different call to API? Bad approach, but a quick-fix? (as discussed in https://issues.jenkins-ci.org/browse/JENKINS-61493) |
I tried the latest RC
Which then later times out with:
|
I can confirm this issue using Plugin Version 2.7.0 with Bitbucket Server 7.1.0 |
+1 on issue with BB 7.1.0 - our guys upgraded BB this weekend and all PRs no longer build (and we lean heavily on them) - is there a patch yet? |
We're having the same issue. The PR #294 seems to fix it. We got the build 2.8.1-rc648.98e3c549af77 from jenkins-ci repo. We enabled the "Call Changes API" option at https://SERVERADDRESS/configure like you guys said. Unfortunately, it still falls back to heavyweight checkout but at least the heavyweight checkout is working. 😄 |
lightweight checkout is no longer possible with bitbucket server v7 and merge build strategy, because bitbucket no longer computes a merge commit. |
Just another update from my side. Looking at the build logs and comparing it with PR #294 changes it didn't seem to be using the "Call changes API" code path. So I unchecked that option and ran the builds again and it still works... 🤷♂️ I guess the issue for me was something else that hasn't made it into stable release yet. More details if you guys need it:
|
@joaoportela actually that makes perfect sense if you didn't push any new changes in between. The "Call changes API" only needs to be called once to ensure the refs are created on Bitbucket. This is also what happens if you view the diff in the Bitbucket UI. Once the refs are created the plugin can do its thing (with the heavyweight checkout). |
With regards to my earlier comment: #287 (comment) This seems to be some mistake with the webhooks on our end. The latest releases have worked good for us (but since we need to roll this out to many Jenkins servers we are hoping on an official release soon) |
I just tested with 2.8.1-rc648.98e3c549af77 with "Call Changes api" activated and "Can Call Merge" deactivated against Bitbucket Server 7.1.2 and can confirm that PRs from within a repo as well as PRs from forks are triggered successfully.. The only thing that is still missing, is triggering a build when a PR gets pushed into. But I think for that, handling of the new webhook "Source branch updated" (#308) is needed. |
Another github user @Cyanoth (thanks!) created an alternative solution to this issue, creating a bitbucket plugin that executes the We've just installed this to our bitbucket server, and it works well. I'm not sure if it guarantees the I also like how this solution works regardless of the CI used. Would be best if this plugin still gets #294 though IMO |
I confirm tomk3030. 2.8.1-rc648.98e3c549af77 works with Bitbucket Server 7.1.0 setting "Call Changes API" |
Still seeing this issue on the first build of a multibranch pipeline with 2.8.1-rc648.98e3c549af77 installed. Subsequent, manually triggered builds seem to work. Running against Bitbucket Server 7.3.0 and happy to try out new builds of the plugin on Jenkins.
|
The first build for a new PR is also automatically triggered and successfully built on the before mentioned configuration of our systems. |
@spacehorst You mention "Bitbucket Server 7.1.0 setting "Call Changes API" true and "Can Call Merge" false" - where does one configure those? Were they non-default settings? |
There's a discussion on this a few posts up from myself.
Those options are in the settings for the plugin in Jenkins i.e. where you
configure the address etc. for your Bitbucket server.
They're not on by default because the developer doesn't want to assume that
everyone is using the latest version of Bitbucket, if you're running an
older version those options will cause the plugin to fail.
I believe I made the suggestion that the plugin could query the Bitbucket
REST API to find out what version of Bitbucket was being used and then
apply the correct setting accordingly.
I'm not a Java Dev so I don't really know how hard that is to actually
implement.
…On Fri, 12 Jun 2020, 01:18 Mike Sollanych, ***@***.***> wrote:
@spacehorst <https://github.com/spacehorst> You mention "Bitbucket Server
7.1.0 setting "Call Changes API" true and "Can Call Merge" false" - where
does one configure those? Were they non-default settings?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#287 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACQ62ZAWUQHFXV2JFL5S55TRWFX3VANCNFSM4LEBNNJQ>
.
|
Thanks @muppet3000, I have enabled that option and will report back when my devs have tested things out. |
Looks like we're good over here. Here's the top of the build output from a now-working PR. It would be nice if it didn't throw the exception, and instead have some way to detect this case and not litter build output with unnecessary errors.
|
That would have to be in Line 100 in a18e9d4
Be sure to test not just an empty node {
checkout scm
} |
I've just had a new issue brought to my attention on this and I don't know if it's as a result of the changes to the plugin or something else. Would be grateful if others could confirm. What happens is that the feature job finishes whilst the PR is still running and then updates the job status on the Bitbucket PR/commit to show that the feature branch has passed. This allows a PR to then be merged whilst a job (the PR job) is still running, breaking the whole point of having a PR build (All of our pipelines are configured to do more extensive tests when it's a PR, therefore if a feature branch sneaks in and sets the status to green while there are tests that still haven't been run code can get merged in with failures in it - without anyone realising). When the PR then finishes (slightly later) it then updates the job again with the status of it's build (to the one we actually care about). Has anyone else seen this behaviour? I'll do more investigation tomorrow to determine whether or not this is related to this plugin, or another plugin. I'll attempt to roll back the plugin we have installed on one of our instances to a "pre dev" build of this one and see if the behaviour persists or goes away, if it goes away then the issue is in this "fix". Can anyone else out there confirm whether they're seeing the same issue with this dev build of the plugin? We've just upgraded all of our Jenkins instances to the latest LTS and latest plugins, so there have been lots of changes that I need to rule out. |
@muppet3000 I've seen this too, this has nothing todo with this issue. So please file a new issue for that |
I understand that the symptoms are nothing to do with this issue. My
question is more whether or not someone has seen this issue when NOT using
this dev build of the plugin. In other words, have the changes implemented
to fix this issue accidentally caused a different issue?
…On Mon, 29 Jun 2020, 17:25 Michael Kriese, ***@***.***> wrote:
@muppet3000 <https://github.com/muppet3000> I've seen this too, this has
nothing todo with this issue. So please file a new issue for that
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#287 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACQ62ZE56ED62KD7ZWYT3QLRZC553ANCNFSM4LEBNNJQ>
.
|
@muppet3000 sorry, I've seen it before I switch to the dev build. I have some jobs which requires 15 and more minutes to succeed, so if I push a branch and open a PR shortly after it, I can see your behavior on all releases since ~1 year |
That's so weird, I'm certain that it used to post multiple build statuses
to Bitbucket one for each branch type in Jenkins. I'll put some effort into
debugging/analysing it properly tomorrow and log a new issue for people to
add their comments to.
…On Mon, 29 Jun 2020, 19:43 Michael Kriese, ***@***.***> wrote:
@muppet3000 <https://github.com/muppet3000> sorry, I've seen it before I
switch to the dev build. I have some jobs which requires 15 and more
minutes to succeed, so if I push a branch and open a PR shortly after it, I
can see your behavior on all releases since ~1 year
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#287 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACQ62ZDQKHUXRIP6OOTUR5DRZDOEXANCNFSM4LEBNNJQ>
.
|
Just run into an issue with falling back to heavyweight checkout. When faced with a repo that has LSF enabled, it tries to do LFS, which is not available on master. My two questions are - have the issue of falling back to heavyweight been resolved here and if not, is there a way to disable LFS during heavyweight checkout for purposes of this plugin while still having it enabled for actual checkout on the remote nodes? |
regarding LFS checkout, I toyed with the idea of either an extension plugin or a contribution to the git plugin to add a scm filter for ignoring LFS checkout on master. Never got anywhere but should be simple to write a filter. The issue of heavy checkout has not been resolved. One simple solution is to add this environment variable on Jenkins master: |
Added workarounds for LFS checkout on master in the above message so to write plugin might seem overkill. |
Thanks. For now I removed the LFS from my job config and added it manually in checkout step in Jenkinsfile(hurray for global libs) - but it would be much cleaner using the env variable being that master does not even have LFS installed, so it will not work in any case. |
Ya that's where the plugin would be useful when LFS is not installed on master. |
Your checklist for this issue
Jenkins version: 2.204.5
Plugin version: 2.7.0
Bitbucket cloud
Bitbucket server and version: 7.0.0, 7.0.1
Description
This plugin is no longer able to fetch and build pull-requests. Looks like thay changed the api without writing a note.
https://community.atlassian.com/t5/Bitbucket-questions/Bitbucket-Server-7-0-PR-fetch-from-not-working/qaq-p/1320053
The text was updated successfully, but these errors were encountered: