www-infrastructure-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Wu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (INFRA-11026) Jenkins Plugin: github pull request builder plugin cannot merge PR to master branch automatically
Date Mon, 18 Jan 2016 03:21:39 GMT

    [ https://issues.apache.org/jira/browse/INFRA-11026?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15104100#comment-15104100
] 

Michael Wu commented on INFRA-11026:
------------------------------------

Hi Andrew,

Recently, I was constantly blocked by the failure of builds of my project
when a new PR came up. The job is at:
https://builds.apache.org/job/incubator-eagle-pr-reviewer/93/console

>From the console log, I saw the commit sha in PR merged to master, but when
the job tried to push back the status to github, a wrong commit sha is
referred to and the status were always "failed". I captured some log here,
could you please help check what's wrong with it and guide me how to make
it push to the right commit sha? thanks.

In below log fragment, the 08376deaac1636b394211af48b00cfa2e5d389db is the
latest commit sha in the PR, and after the merge step, I guess a
80b27a928b1767e43cb4b57140c33de82940d373 is generated, and it's the wrong
commit sha to push status back (see in the stacktrace). Is there any way to
avoid this, or point the right one my configuration?
***********************

Merging refs/tags/changes/93
 > git rev-parse refs/tags/changes/93^{commit} # timeout=10
 > git merge 08376deaac1636b394211af48b00cfa2e5d389db # timeout=10
 > git rev-parse master^{commit} # timeout=10
Checking out Revision 80b27a928b1767e43cb4b57140c33de82940d373 (master)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f 80b27a928b1767e43cb4b57140c33de82940d373
 > git rev-parse origin/master^{commit} # timeout=10
 > git rev-list 48870eafe49dc4088d73303cf111c6636c7abe83 # timeout=10
[incubator-eagle-pr-reviewer] $ /bin/bash -xe /tmp/hudson45606259230689151.sh
+ echo 48
48
+ echo https://github.com/apache/incubator-eagle/pull/48https://github.com/apache/incubator-eagle/pull/48
+ echo incubator-eagle
incubator-eagle
Setting commit status on GitHub for
https://github.com/apache/incubator-eagle/commit/80b27a928b1767e43cb4b57140c33de82940d373
ERROR: Publisher 'Set build status on GitHub commit' aborted due to
exception: java.io.FileNotFoundException
<http://stacktrace.jenkins-ci.org/search?query=java.io.FileNotFoundException>:
{"message":"No commit found for SHA:
80b27a928b1767e43cb4b57140c33de82940d373","documentation_url":"https://developer.github.com/v3/repos/statuses/"}
	at org.kohsuke.github.Requester.handleApiError(Requester.java:511)
<http://stacktrace.jenkins-ci.org/search/?query=org.kohsuke.github.Requester.handleApiError&entity=method>
	at org.kohsuke.github.Requester._to(Requester.java:250)
<http://stacktrace.jenkins-ci.org/search/?query=org.kohsuke.github.Requester._to&entity=method>
	at org.kohsuke.github.Requester.to(Requester.java:196)
<http://stacktrace.jenkins-ci.org/search/?query=org.kohsuke.github.Requester.to&entity=method>
	at org.kohsuke.github.GHRepository.createCommitStatus(GHRepository.java:860)
<http://stacktrace.jenkins-ci.org/search/?query=org.kohsuke.github.GHRepository.createCommitStatus&entity=method>
	at com.cloudbees.jenkins.GitHubCommitNotifier.updateCommitStatus(GitHubCommitNotifier.java:142)
<http://stacktrace.jenkins-ci.org/search/?query=com.cloudbees.jenkins.GitHubCommitNotifier.updateCommitStatus&entity=method>
	at com.cloudbees.jenkins.GitHubCommitNotifier.perform(GitHubCommitNotifier.java:111)
<http://stacktrace.jenkins-ci.org/search/?query=com.cloudbees.jenkins.GitHubCommitNotifier.perform&entity=method>
	at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:74)
<http://stacktrace.jenkins-ci.org/search/?query=hudson.tasks.BuildStepCompatibilityLayer.perform&entity=method>
	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
<http://stacktrace.jenkins-ci.org/search/?query=hudson.tasks.BuildStepMonitor$1.perform&entity=method>
	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:776)
<http://stacktrace.jenkins-ci.org/search/?query=hudson.model.AbstractBuild$AbstractBuildExecution.perform&entity=method>
	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723)
<http://stacktrace.jenkins-ci.org/search/?query=hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps&entity=method>
	at hudson.model.Build$BuildExecution.post2(Build.java:183)
<http://stacktrace.jenkins-ci.org/search/?query=hudson.model.Build$BuildExecution.post2&entity=method>
	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:670)
<http://stacktrace.jenkins-ci.org/search/?query=hudson.model.AbstractBuild$AbstractBuildExecution.post&entity=method>
	at hudson.model.Run.execute(Run.java:1763)
<http://stacktrace.jenkins-ci.org/search/?query=hudson.model.Run.execute&entity=method>
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
<http://stacktrace.jenkins-ci.org/search/?query=hudson.model.FreeStyleBuild.run&entity=method>
	at hudson.model.ResourceController.execute(ResourceController.java:98)
<http://stacktrace.jenkins-ci.org/search/?query=hudson.model.ResourceController.execute&entity=method>
	at hudson.model.Executor.run(Executor.java:381)
<http://stacktrace.jenkins-ci.org/search/?query=hudson.model.Executor.run&entity=method>
Caused by: java.io.FileNotFoundException
<http://stacktrace.jenkins-ci.org/search?query=java.io.FileNotFoundException>:
https://api.github.com/repos/apache/incubator-eagle/statuses/80b27a928b1767e43cb4b57140c33de82940d373
	at com.squareup.okhttp.internal.huc.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:240)
<http://stacktrace.jenkins-ci.org/search/?query=com.squareup.okhttp.internal.huc.HttpURLConnectionImpl.getInputStream&entity=method>
	at com.squareup.okhttp.internal.huc.DelegatingHttpsURLConnection.getInputStream(DelegatingHttpsURLConnection.java:210)
<http://stacktrace.jenkins-ci.org/search/?query=com.squareup.okhttp.internal.huc.DelegatingHttpsURLConnection.getInputStream&entity=method>
	at com.squareup.okhttp.internal.huc.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:25)
<http://stacktrace.jenkins-ci.org/search/?query=com.squareup.okhttp.internal.huc.HttpsURLConnectionImpl.getInputStream&entity=method>
	at org.kohsuke.github.Requester.parse(Requester.java:468)
<http://stacktrace.jenkins-ci.org/search/?query=org.kohsuke.github.Requester.parse&entity=method>
	at org.kohsuke.github.Requester._to(Requester.java:229)
<http://stacktrace.jenkins-ci.org/search/?query=org.kohsuke.github.Requester._to&entity=method>
	... 14 more
Putting comment on the pull request
Finished: FAILURE

***********************

Thanks.
Michael




> Jenkins Plugin: github pull request builder plugin cannot merge PR to master branch automatically
> -------------------------------------------------------------------------------------------------
>
>                 Key: INFRA-11026
>                 URL: https://issues.apache.org/jira/browse/INFRA-11026
>             Project: Infrastructure
>          Issue Type: Bug
>          Components: Jenkins
>            Reporter: Michael Wu
>            Assignee: Andrew Bayer
>            Priority: Minor
>
> Following the instruction on page https://blogs.apache.org/infra/entry/github_pull_request_builds_now,
I setup CI job https://builds.apache.org/job/incubator-eagle-pr-reviewer/.
> However, I found when the job built, it didn't merge the updates in PRs to master branch
successfully. 
> According to official doc of "Github pull request builder plugin" at https://wiki.jenkins-ci.org/display/JENKINS/GitHub+pull+request+builder+plugin,
there should be some "Environment Variables" configurable with the plugin, then I tried to
configure some of them, but they cannot be recognized and replace the configured placeholders
with its real value.
> So, I'd like to ask for your help, could you guide me, how shall I configure the job
to let it merge updates in PRs to master branch?
> BTW, I noticed the job starts to build, holding the PR number, then how can I get the
PR number in configuration, e.g. is there any variable available to point to the PR number?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message