[JIRA] (JENKINS-52900) Invalid refspec in pull request. Doesn't check for changes in origin branch

120 views
Skip to first unread message

leandro.narosky@gmail.com (JIRA)

unread,
Aug 6, 2018, 11:59:02 AM8/6/18
to jenkinsc...@googlegroups.com
Leandro Narosky created an issue
 
Jenkins / Bug JENKINS-52900
Invalid refspec in pull request. Doesn't check for changes in origin branch
Issue Type: Bug Bug
Assignee: Kirill Merkushev
Components: blueocean-plugin, github-plugin, pollscm-plugin
Created: 2018-08-06 15:58
Priority: Major Major
Reporter: Leandro Narosky

Blue ocean correctly discovers new pull requests, but it doesn't triggers a new build when a new commit is added to them.

I'm using the pollSCM trigger:

triggers {            
    pollSCM('H/5 * * * *')        
}

It triggers the check every 5 minutes, but it never checks for PR updates.

Git log: (I've censored the url)

Started on Aug 6, 2018 11:49:00 AM
Using strategy: Specific revision
[poll] Last Built Revision: Revision 1d41cbe536045aec37887e191923237f064af7ca (PR-36)
 > git --version # timeout=10
using GIT_ASKPASS to set credentials GitHub Access Token
 > git ls-remote -h https://github.com/<user>/<repo> # timeout=10
Found 12 remote heads on https://github.com/<user>/<repo>
Ignoring refs/heads/refactoring_to_java8 as it doesn't match any of the configured refspecs
Ignoring refs/heads/test-jenkins as it doesn't match any of the configured refspecs
Ignoring refs/heads/RC as it doesn't match any of the configured refspecs
Ignoring refs/heads/test_charla as it doesn't match any of the configured refspecs
Ignoring refs/heads/jenkins-test as it doesn't match any of the configured refspecs
Ignoring refs/heads/postsale as it doesn't match any of the configured refspecs
Ignoring refs/heads/master as it doesn't match any of the configured refspecs
Ignoring refs/heads/historyBookAlarm as it doesn't match any of the configured refspecs
Ignoring refs/heads/implementing_geo as it doesn't match any of the configured refspecs
Ignoring refs/heads/test as it doesn't match any of the configured refspecs
Ignoring refs/heads/implementing_atp as it doesn't match any of the configured refspecs
no polling baseline in /var/lib/jenkins/workspace/f-minion_PR-36-QKHUPNS3B4RPOEDZVQ7JEMAWKCLXDX5JRPMBGJJUVRFZ2MYNLSMQ@libs/jenkins-pipelines-scripts on 
Using strategy: Specific revision
[poll] Last Built Revision: Revision 1d41cbe536045aec37887e191923237f064af7ca (PR-36)
 > git --version # timeout=10
using GIT_ASKPASS to set credentials GitHub Access Token
 > git ls-remote -h https://github.com/<user>/<repo> # timeout=10
Found 12 remote heads on https://github.com/<user>/<repo>
Ignoring refs/heads/refactoring_to_java8 as it doesn't match any of the configured refspecs
Ignoring refs/heads/test-jenkins as it doesn't match any of the configured refspecs
Ignoring refs/heads/RC as it doesn't match any of the configured refspecs
Ignoring refs/heads/test_charla as it doesn't match any of the configured refspecs
Ignoring refs/heads/jenkins-test as it doesn't match any of the configured refspecs
Ignoring refs/heads/postsale as it doesn't match any of the configured refspecs
Ignoring refs/heads/master as it doesn't match any of the configured refspecs
Ignoring refs/heads/historyBookAlarm as it doesn't match any of the configured refspecs
Ignoring refs/heads/implementing_geo as it doesn't match any of the configured refspecs
Ignoring refs/heads/test as it doesn't match any of the configured refspecs
Ignoring refs/heads/implementing_atp as it doesn't match any of the configured refspecs
Using strategy: Specific revision
[poll] Last Built Revision: Revision 1d41cbe536045aec37887e191923237f064af7ca (PR-36)
 > git --version # timeout=10
using GIT_ASKPASS to set credentials GitHub Access Token
 > git ls-remote -h https://github.com/<user>/<repo> # timeout=10
Found 12 remote heads on https://github.com/<user>/<repo>
Ignoring refs/heads/refactoring_to_java8 as it doesn't match any of the configured refspecs
Ignoring refs/heads/test-jenkins as it doesn't match any of the configured refspecs
Ignoring refs/heads/RC as it doesn't match any of the configured refspecs
Ignoring refs/heads/test_charla as it doesn't match any of the configured refspecs
Ignoring refs/heads/jenkins-test as it doesn't match any of the configured refspecs
Ignoring refs/heads/postsale as it doesn't match any of the configured refspecs
Ignoring refs/heads/master as it doesn't match any of the configured refspecs
Ignoring refs/heads/historyBookAlarm as it doesn't match any of the configured refspecs
Ignoring refs/heads/implementing_geo as it doesn't match any of the configured refspecs
Ignoring refs/heads/test as it doesn't match any of the configured refspecs
Ignoring refs/heads/implementing_atp as it doesn't match any of the configured refspecs
Done. Took 4.9 sec
No changes

It says "no changes" but it has a new commit.

 

If I go to the instance and look at the refspecs in the PR folder with:

su -c "git config --get remote.origin.fetch" -s /bin/sh jenkins

I get

+refs/heads/dev:refs/remotes/origin/dev

I think there it should be a ref to the pull request, or the origin branch, instead of the "dev" branch which is the pull request destination, in order to detect the update

I'm using blue ocean with declarative syntax.

Shouldn't it work without any additional configuration?

Is there any workaround for this problem just using some code in the pipeline?
We have the pipeline in a shared library that covers a lot of projects, so it would be easier to fix it just there instead of going to every jenkins installation.

Thanks!

Regards.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.10.1#710002-sha1:6efc396)

amirbarkal@sparkbeyond.com (JIRA)

unread,
Mar 4, 2019, 3:11:17 PM3/4/19
to jenkinsc...@googlegroups.com
Amir Barkal commented on Bug JENKINS-52900
 
Re: Invalid refspec in pull request. Doesn't check for changes in origin branch

Same problem here with jenkins core version 2.150.
Very annoying...

This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

amirbarkal@sparkbeyond.com (JIRA)

unread,
Mar 4, 2019, 4:37:02 PM3/4/19
to jenkinsc...@googlegroups.com
Amir Barkal edited a comment on Bug JENKINS-52900
Same problem here with jenkins core version 2.150.

Our use case is setting up a nightly job that can auto-discover newly created branches and trigger builds only if there were SCM changes. I thought I can achieve this by:

1. Create a multi-branch pipeline job that has the "suppress auto SCM triggering" =  on
(To disable merge/push web hooks)
2. Enable the "Scan periodically if not otherwise run"
(To add/remove new/deleted branches)
3. Add {quote}triggers { pollSCM('H 22 * * *') }{quote} to the pipeline Jenkinsfile

Unfortunately I'm getting the same behavior reported by OP.
Very annoying...

amirbarkal@sparkbeyond.com (JIRA)

unread,
Mar 4, 2019, 4:37:03 PM3/4/19
to jenkinsc...@googlegroups.com

amirbarkal@sparkbeyond.com (JIRA)

unread,
Mar 4, 2019, 4:37:04 PM3/4/19
to jenkinsc...@googlegroups.com
Amir Barkal edited a comment on Bug JENKINS-52900
Same problem here with jenkins core version 2.150.

Our use case is setting up a nightly job that can auto-discover newly created branches and trigger builds only if there were SCM changes. I thought I can achieve this by:

1. Create a multi-branch pipeline job that has the "suppress auto SCM triggering" =  on
(To disable merge/push web hooks)

2. Enable the "Scan periodically if not otherwise run"
(To add/remove new/deleted branches)

3. Add "triggers { pollSCM('H 22 * * *') }" to the pipeline Jenkinsfile


Unfortunately I'm getting the same behavior reported by OP. Very annoying...
Reply all
Reply to author
Forward
0 new messages