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

Merge request polling fails upon upgrade to 1.2.0 #60

Closed
samrocketman opened this Issue Apr 29, 2014 · 8 comments

Comments

Projects
None yet
7 participants
@samrocketman

samrocketman commented Apr 29, 2014

I upgraded to the new plugin version and merge request polling stopped working. In the console log is the following messages.

2014-04-28 23:45:22,001 WARNING [hudson.triggers.Trigger] (Jenkins-cron-thread-2) org.jenkinsci.plugins.gitlab.GitlabBuildTrigger.run() failed for icinga-conf_merge_request
java.lang.NullPointerException
        at org.jenkinsci.plugins.gitlab.GitlabMergeRequestWrapper.latestCommitIsNotReached(GitlabMergeRequestWrapper.java:101)
        at org.jenkinsci.plugins.gitlab.GitlabMergeRequestWrapper.check(GitlabMergeRequestWrapper.java:86)
        at org.jenkinsci.plugins.gitlab.GitlabRepository.check(GitlabRepository.java:83)
        at org.jenkinsci.plugins.gitlab.GitlabRepository.check(GitlabRepository.java:65)
        at org.jenkinsci.plugins.gitlab.GitlabMergeRequestBuilder.run(GitlabMergeRequestBuilder.java:27)
        at org.jenkinsci.plugins.gitlab.GitlabBuildTrigger.run(GitlabBuildTrigger.java:101)
        at hudson.triggers.Trigger.checkTriggers(Trigger.java:255)
        at hudson.triggers.Trigger$Cron.doRun(Trigger.java:203)
        at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:54)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
        at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)
2014-04-28 23:50:21,902 WARNING [hudson.triggers.Trigger] (Jenkins-cron-thread-10) org.jenkinsci.plugins.gitlab.GitlabBuildTrigger.run() failed for icinga-conf_merge_request
java.lang.NullPointerException
        at org.jenkinsci.plugins.gitlab.GitlabMergeRequestWrapper.latestCommitIsNotReached(GitlabMergeRequestWrapper.java:101)
        at org.jenkinsci.plugins.gitlab.GitlabMergeRequestWrapper.check(GitlabMergeRequestWrapper.java:86)
        at org.jenkinsci.plugins.gitlab.GitlabRepository.check(GitlabRepository.java:83)
        at org.jenkinsci.plugins.gitlab.GitlabRepository.check(GitlabRepository.java:65)
        at org.jenkinsci.plugins.gitlab.GitlabMergeRequestBuilder.run(GitlabMergeRequestBuilder.java:27)
        at org.jenkinsci.plugins.gitlab.GitlabBuildTrigger.run(GitlabBuildTrigger.java:101)
        at hudson.triggers.Trigger.checkTriggers(Trigger.java:255)
        at hudson.triggers.Trigger$Cron.doRun(Trigger.java:203)
        at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:54)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
        at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)
2014-04-28 23:55:21,885 WARNING [hudson.triggers.Trigger] (Jenkins-cron-thread-3) org.jenkinsci.plugins.gitlab.GitlabBuildTrigger.run() failed for icinga-conf_merge_request
java.lang.NullPointerException
        at org.jenkinsci.plugins.gitlab.GitlabMergeRequestWrapper.latestCommitIsNotReached(GitlabMergeRequestWrapper.java:101)
        at org.jenkinsci.plugins.gitlab.GitlabMergeRequestWrapper.check(GitlabMergeRequestWrapper.java:86)
        at org.jenkinsci.plugins.gitlab.GitlabRepository.check(GitlabRepository.java:83)
        at org.jenkinsci.plugins.gitlab.GitlabRepository.check(GitlabRepository.java:65)
        at org.jenkinsci.plugins.gitlab.GitlabMergeRequestBuilder.run(GitlabMergeRequestBuilder.java:27)
        at org.jenkinsci.plugins.gitlab.GitlabBuildTrigger.run(GitlabBuildTrigger.java:101)
        at hudson.triggers.Trigger.checkTriggers(Trigger.java:255)
        at hudson.triggers.Trigger$Cron.doRun(Trigger.java:203)
        at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:54)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
        at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317) 
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)

When I downgraded the plugin it started working again immediately.

@timols timols added the bug label May 13, 2014

@eddiemonge

This comment has been minimized.

Show comment
Hide comment
@eddiemonge

eddiemonge May 13, 2014

see #59 and #62

I think only a release is needed to fix this now

eddiemonge commented May 13, 2014

see #59 and #62

I think only a release is needed to fix this now

@Jotschi

This comment has been minimized.

Show comment
Hide comment
@Jotschi

Jotschi Jun 25, 2014

Contributor

I get the same error with a build i made from the current master 0567155

WARNING: org.jenkinsci.plugins.gitlab.GitlabBuildTrigger.run() failed for hudson.maven.MavenModuleSet@57c542ef[node-merge-request]
java.lang.NullPointerException
        at org.jenkinsci.plugins.gitlab.GitlabMergeRequestWrapper.latestCommitIsNotReached(GitlabMergeRequestWrapper.java:101)
        at org.jenkinsci.plugins.gitlab.GitlabMergeRequestWrapper.check(GitlabMergeRequestWrapper.java:86)
        at org.jenkinsci.plugins.gitlab.GitlabRepository.check(GitlabRepository.java:83)
        at org.jenkinsci.plugins.gitlab.GitlabRepository.check(GitlabRepository.java:65)
        at org.jenkinsci.plugins.gitlab.GitlabMergeRequestBuilder.run(GitlabMergeRequestBuilder.java:27)
        at org.jenkinsci.plugins.gitlab.GitlabBuildTrigger.run(GitlabBuildTrigger.java:100)
        at hudson.triggers.Trigger.checkTriggers(Trigger.java:266)
        at hudson.triggers.Trigger$Cron.doRun(Trigger.java:214)
        at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:54)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
        at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:619)

Somehow i think this NPE only occurs on a single merge request job. There are other jobs which work with the MRB.

Contributor

Jotschi commented Jun 25, 2014

I get the same error with a build i made from the current master 0567155

WARNING: org.jenkinsci.plugins.gitlab.GitlabBuildTrigger.run() failed for hudson.maven.MavenModuleSet@57c542ef[node-merge-request]
java.lang.NullPointerException
        at org.jenkinsci.plugins.gitlab.GitlabMergeRequestWrapper.latestCommitIsNotReached(GitlabMergeRequestWrapper.java:101)
        at org.jenkinsci.plugins.gitlab.GitlabMergeRequestWrapper.check(GitlabMergeRequestWrapper.java:86)
        at org.jenkinsci.plugins.gitlab.GitlabRepository.check(GitlabRepository.java:83)
        at org.jenkinsci.plugins.gitlab.GitlabRepository.check(GitlabRepository.java:65)
        at org.jenkinsci.plugins.gitlab.GitlabMergeRequestBuilder.run(GitlabMergeRequestBuilder.java:27)
        at org.jenkinsci.plugins.gitlab.GitlabBuildTrigger.run(GitlabBuildTrigger.java:100)
        at hudson.triggers.Trigger.checkTriggers(Trigger.java:266)
        at hudson.triggers.Trigger$Cron.doRun(Trigger.java:214)
        at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:54)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
        at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:619)

Somehow i think this NPE only occurs on a single merge request job. There are other jobs which work with the MRB.

@Jotschi

This comment has been minimized.

Show comment
Hide comment
@Jotschi

Jotschi Jun 25, 2014

Contributor

I'm not sure whether this is helpful but i remote debugged the NPE and found that GitlabRepository#check(..) is retrieving the MR's from the _mergeRequests map. The GitlabMergeRequestWrapper entries in that map somehow don't have a _mergeRequestStatus set. This causes the NPE in GitlabMergeRequestWrapper#latestCommitIsNotReached. Are the MR's somehow persisted? Once i did a _mergeRequests.clear() inside a breakpoint the NPE was gone since the MR's were reloaded and everthing worked perfectly.

Without fully understanding the issue i would assume that it might be possible to just change the check call to:

    public void check(GitlabMergeRequest gitlabMergeRequest) {

        if (_mergeRequestStatus == null) {
            _mergeRequestStatus = new GitlabMergeRequestStatus();
        }
Contributor

Jotschi commented Jun 25, 2014

I'm not sure whether this is helpful but i remote debugged the NPE and found that GitlabRepository#check(..) is retrieving the MR's from the _mergeRequests map. The GitlabMergeRequestWrapper entries in that map somehow don't have a _mergeRequestStatus set. This causes the NPE in GitlabMergeRequestWrapper#latestCommitIsNotReached. Are the MR's somehow persisted? Once i did a _mergeRequests.clear() inside a breakpoint the NPE was gone since the MR's were reloaded and everthing worked perfectly.

Without fully understanding the issue i would assume that it might be possible to just change the check call to:

    public void check(GitlabMergeRequest gitlabMergeRequest) {

        if (_mergeRequestStatus == null) {
            _mergeRequestStatus = new GitlabMergeRequestStatus();
        }
@emredenizozer

This comment has been minimized.

Show comment
Hide comment
@emredenizozer

emredenizozer Jan 8, 2015

I also get a resembling error which is:

SEVERE: Merge Request without commits.
Jan 08, 2015 5:03:10 PM hudson.triggers.Trigger checkTriggers
WARNING: org.jenkinsci.plugins.gitlab.GitlabBuildTrigger.run() failed for hudson.model.FreeStyleProject@42c11a8f[ema-mr]
java.lang.NullPointerException
    at org.jenkinsci.plugins.gitlab.GitlabMergeRequestWrapper.check(GitlabMergeRequestWrapper.java:89)
    at org.jenkinsci.plugins.gitlab.GitlabRepository.check(GitlabRepository.java:83)
    at org.jenkinsci.plugins.gitlab.GitlabRepository.check(GitlabRepository.java:65)
    at org.jenkinsci.plugins.gitlab.GitlabMergeRequestBuilder.run(GitlabMergeRequestBuilder.java:27)
    at org.jenkinsci.plugins.gitlab.GitlabBuildTrigger.run(GitlabBuildTrigger.java:100)
    at hudson.triggers.Trigger.checkTriggers(Trigger.java:266)
    at hudson.triggers.Trigger$Cron.doRun(Trigger.java:214)
    at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:54)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)

This happened after I downloaded the latest jenkins.war file, replaced it with the oldest one and ran it on the server. What might be the possible explanation for that? And is there anyone who knows how to upgrade Jenkins manually on Ubuntu? The websites did not help me until now..

emredenizozer commented Jan 8, 2015

I also get a resembling error which is:

SEVERE: Merge Request without commits.
Jan 08, 2015 5:03:10 PM hudson.triggers.Trigger checkTriggers
WARNING: org.jenkinsci.plugins.gitlab.GitlabBuildTrigger.run() failed for hudson.model.FreeStyleProject@42c11a8f[ema-mr]
java.lang.NullPointerException
    at org.jenkinsci.plugins.gitlab.GitlabMergeRequestWrapper.check(GitlabMergeRequestWrapper.java:89)
    at org.jenkinsci.plugins.gitlab.GitlabRepository.check(GitlabRepository.java:83)
    at org.jenkinsci.plugins.gitlab.GitlabRepository.check(GitlabRepository.java:65)
    at org.jenkinsci.plugins.gitlab.GitlabMergeRequestBuilder.run(GitlabMergeRequestBuilder.java:27)
    at org.jenkinsci.plugins.gitlab.GitlabBuildTrigger.run(GitlabBuildTrigger.java:100)
    at hudson.triggers.Trigger.checkTriggers(Trigger.java:266)
    at hudson.triggers.Trigger$Cron.doRun(Trigger.java:214)
    at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:54)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)

This happened after I downloaded the latest jenkins.war file, replaced it with the oldest one and ran it on the server. What might be the possible explanation for that? And is there anyone who knows how to upgrade Jenkins manually on Ubuntu? The websites did not help me until now..

@baskaran-md

This comment has been minimized.

Show comment
Hide comment
@baskaran-md

baskaran-md Oct 3, 2015

Am still facing the issue. Any workarounds?

baskaran-md commented Oct 3, 2015

Am still facing the issue. Any workarounds?

@samrocketman

This comment has been minimized.

Show comment
Hide comment
@samrocketman

samrocketman Oct 4, 2015

@baskaran-md it would be useful if you provided your Jenkins version, the plugin version, and a stack trace of the error you're encountering.

@emredenizozer seems your null pointer exception happened inside of the following function

public void check(GitlabMergeRequest gitlabMergeRequest) {
if (_mergeRequestStatus == null) {
_mergeRequestStatus = new GitlabMergeRequestStatus();
}
if (_iid == null) {
_iid = gitlabMergeRequest.getIid();
}
if (_targetBranch == null) {
_targetBranch = gitlabMergeRequest.getTargetBranch();
}
if (_sourceBranch == null) {
_sourceBranch = gitlabMergeRequest.getSourceBranch();
}
if (_sourceProject == null) {
try {
GitlabAPI api = _builder.getGitlab().get();
_sourceProject = getSourceProject(gitlabMergeRequest, api);
} catch (IOException e) {
_logger.log(Level.SEVERE, "Failed to get source project for Merge request " + gitlabMergeRequest.getId() + " :\n" + e.getMessage());
return;
}
}
if (isAllowedByTargetBranchRegex(_targetBranch)) {
_logger.log(Level.INFO, "The target regex matches the target branch {" + _targetBranch + "}. Source branch {" + _sourceBranch + "}");
_shouldRun = true;
} else {
_logger.log(Level.INFO, "The target regex did not match the target branch {" + _targetBranch + "}. Not triggering this job. Source branch {" + _sourceBranch + "}");
return;
}
try {
GitlabAPI api = _builder.getGitlab().get();
GitlabNote lastJenkinsNote = getJenkinsNote(gitlabMergeRequest, api);
GitlabNote lastNote = getLastNote(gitlabMergeRequest, api);
GitlabCommit latestCommit = getLatestCommit(gitlabMergeRequest, api);
String assigneeFilter = _builder.getTrigger().getAssigneeFilter();
String assignee = getAssigneeUsername(gitlabMergeRequest);;
String triggerComment = _builder.getTrigger().getTriggerComment();
if (lastJenkinsNote == null) {
_logger.info("Latest note from Jenkins is null");
_shouldRun = latestCommitIsNotReached(latestCommit);
} else if (latestCommit == null) {
_logger.log(Level.SEVERE, "Failed to determine the lastest commit for merge request {" + gitlabMergeRequest.getId() + "}. This might be caused by a stalled MR in gitlab.");
return;
} else {
_logger.info("Latest note from Jenkins: " + lastJenkinsNote.getBody());
_shouldRun = latestCommitIsNotReached(latestCommit);
_logger.info("Latest commit: " + latestCommit.getId());
if (lastNote.getBody().equals(triggerComment)) {
_shouldRun = true;
}
}
if (_shouldRun) {
if (assigneeFilterMatch(assigneeFilter, assignee)) {
_logger.info("Build is supposed to run");
_mergeRequestStatus.setLatestCommitOfMergeRequest(_id.toString(), latestCommit.getId());
} else {
_shouldRun = false;
}
}
if (_shouldRun) {
Map<String, String> customParameters = getSpecifiedCustomParameters(gitlabMergeRequest, api);
build(customParameters);
}
} catch (IOException e) {
_logger.log(Level.SEVERE, "Failed to fetch commits for Merge Request " + gitlabMergeRequest.getId());
}
}

Also your stack trace appears to be completely different than the problem I encountered.

I haven't used this plugin in a few years (nor GitLab in a few years) so I'm afraid I can't help much more than that.

samrocketman commented Oct 4, 2015

@baskaran-md it would be useful if you provided your Jenkins version, the plugin version, and a stack trace of the error you're encountering.

@emredenizozer seems your null pointer exception happened inside of the following function

public void check(GitlabMergeRequest gitlabMergeRequest) {
if (_mergeRequestStatus == null) {
_mergeRequestStatus = new GitlabMergeRequestStatus();
}
if (_iid == null) {
_iid = gitlabMergeRequest.getIid();
}
if (_targetBranch == null) {
_targetBranch = gitlabMergeRequest.getTargetBranch();
}
if (_sourceBranch == null) {
_sourceBranch = gitlabMergeRequest.getSourceBranch();
}
if (_sourceProject == null) {
try {
GitlabAPI api = _builder.getGitlab().get();
_sourceProject = getSourceProject(gitlabMergeRequest, api);
} catch (IOException e) {
_logger.log(Level.SEVERE, "Failed to get source project for Merge request " + gitlabMergeRequest.getId() + " :\n" + e.getMessage());
return;
}
}
if (isAllowedByTargetBranchRegex(_targetBranch)) {
_logger.log(Level.INFO, "The target regex matches the target branch {" + _targetBranch + "}. Source branch {" + _sourceBranch + "}");
_shouldRun = true;
} else {
_logger.log(Level.INFO, "The target regex did not match the target branch {" + _targetBranch + "}. Not triggering this job. Source branch {" + _sourceBranch + "}");
return;
}
try {
GitlabAPI api = _builder.getGitlab().get();
GitlabNote lastJenkinsNote = getJenkinsNote(gitlabMergeRequest, api);
GitlabNote lastNote = getLastNote(gitlabMergeRequest, api);
GitlabCommit latestCommit = getLatestCommit(gitlabMergeRequest, api);
String assigneeFilter = _builder.getTrigger().getAssigneeFilter();
String assignee = getAssigneeUsername(gitlabMergeRequest);;
String triggerComment = _builder.getTrigger().getTriggerComment();
if (lastJenkinsNote == null) {
_logger.info("Latest note from Jenkins is null");
_shouldRun = latestCommitIsNotReached(latestCommit);
} else if (latestCommit == null) {
_logger.log(Level.SEVERE, "Failed to determine the lastest commit for merge request {" + gitlabMergeRequest.getId() + "}. This might be caused by a stalled MR in gitlab.");
return;
} else {
_logger.info("Latest note from Jenkins: " + lastJenkinsNote.getBody());
_shouldRun = latestCommitIsNotReached(latestCommit);
_logger.info("Latest commit: " + latestCommit.getId());
if (lastNote.getBody().equals(triggerComment)) {
_shouldRun = true;
}
}
if (_shouldRun) {
if (assigneeFilterMatch(assigneeFilter, assignee)) {
_logger.info("Build is supposed to run");
_mergeRequestStatus.setLatestCommitOfMergeRequest(_id.toString(), latestCommit.getId());
} else {
_shouldRun = false;
}
}
if (_shouldRun) {
Map<String, String> customParameters = getSpecifiedCustomParameters(gitlabMergeRequest, api);
build(customParameters);
}
} catch (IOException e) {
_logger.log(Level.SEVERE, "Failed to fetch commits for Merge Request " + gitlabMergeRequest.getId());
}
}

Also your stack trace appears to be completely different than the problem I encountered.

I haven't used this plugin in a few years (nor GitLab in a few years) so I'm afraid I can't help much more than that.

@baskaran-md

This comment has been minimized.

Show comment
Hide comment
@baskaran-md

baskaran-md Oct 7, 2015

Jenkins: 1.609
"Gitlab Merge Request Builder" Plugin for Jenkins: 1.2.2
GitLab: 7.7.0 c04f11d

WARNING: org.jenkinsci.plugins.gitlab.GitlabBuildTrigger.run() failed for hudson.model.FreeStyleProject@66176ae8[Feature_Sanity]
java.lang.NullPointerException
        at org.jenkinsci.plugins.gitlab.GitlabMergeRequestWrapper.check(GitlabMergeRequestWrapper.java:89)
        at org.jenkinsci.plugins.gitlab.GitlabRepository.check(GitlabRepository.java:83)
        at org.jenkinsci.plugins.gitlab.GitlabRepository.check(GitlabRepository.java:65)
        at org.jenkinsci.plugins.gitlab.GitlabMergeRequestBuilder.run(GitlabMergeRequestBuilder.java:27)
        at org.jenkinsci.plugins.gitlab.GitlabBuildTrigger.run(GitlabBuildTrigger.java:100)
        at hudson.triggers.Trigger.checkTriggers(Trigger.java:265)
        at hudson.triggers.Trigger$Cron.doRun(Trigger.java:214)
        at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:51)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)

I am planning to upgrade my Gitlabs to 7.9.1 or higher based on this comment.
Ref: #69 (comment)

baskaran-md commented Oct 7, 2015

Jenkins: 1.609
"Gitlab Merge Request Builder" Plugin for Jenkins: 1.2.2
GitLab: 7.7.0 c04f11d

WARNING: org.jenkinsci.plugins.gitlab.GitlabBuildTrigger.run() failed for hudson.model.FreeStyleProject@66176ae8[Feature_Sanity]
java.lang.NullPointerException
        at org.jenkinsci.plugins.gitlab.GitlabMergeRequestWrapper.check(GitlabMergeRequestWrapper.java:89)
        at org.jenkinsci.plugins.gitlab.GitlabRepository.check(GitlabRepository.java:83)
        at org.jenkinsci.plugins.gitlab.GitlabRepository.check(GitlabRepository.java:65)
        at org.jenkinsci.plugins.gitlab.GitlabMergeRequestBuilder.run(GitlabMergeRequestBuilder.java:27)
        at org.jenkinsci.plugins.gitlab.GitlabBuildTrigger.run(GitlabBuildTrigger.java:100)
        at hudson.triggers.Trigger.checkTriggers(Trigger.java:265)
        at hudson.triggers.Trigger$Cron.doRun(Trigger.java:214)
        at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:51)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)

I am planning to upgrade my Gitlabs to 7.9.1 or higher based on this comment.
Ref: #69 (comment)

@AndreaGiardini

This comment has been minimized.

Show comment
Hide comment
@AndreaGiardini

AndreaGiardini Oct 7, 2015

Contributor

Jenkins: 1.609
"Gitlab Merge Request Builder" Plugin for Jenkins: latest (git clone + mvn package)
GitLab: 7.13.5

Works like a charm, can't reproduce this bug

Contributor

AndreaGiardini commented Oct 7, 2015

Jenkins: 1.609
"Gitlab Merge Request Builder" Plugin for Jenkins: latest (git clone + mvn package)
GitLab: 7.13.5

Works like a charm, can't reproduce this bug

@timols timols closed this Oct 8, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment