Hello.
We have build-blocker plugin installed on our Jenkins installation in my 
company, and we discovered that the node level blocking does not work.
Scheduling two mutually excluded jobs on the same node for example succeeds.
>From a quick google search i found out that there is a similar issue 
reported on jira JENKINS-50187 
<https://issues.jenkins-ci.org/browse/JENKINS-50187>

I cloned the repo and managed to run the plugin, and by going through the 
code i think that the issue may be on getBuildBlockerProperty method.
When *canRun* method of *BuildBlockerQueueTaskDispatcher* class is called 
the method correctly returns the property object.
But when *canTake* method is called it returns null, which implies that the 
node can take this job in order to build it.

@CheckForNull
private BuildBlockerProperty getBuildBlockerProperty(Queue.Item item) {
    if (!(item.task instanceof Job)) {
        return null;
    }
    Job<?,?> job = (Job<?,?>) item.task;

    return job.getProperty(BuildBlockerProperty.class);
}


Can anyone who is familiar with Pipeline API to point me to a direction 
where i can solve this issue?


-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/54a364ab-e585-41f9-9752-eb07634e6cf3%40googlegroups.com.

Reply via email to