jenkinsci / jenkinsci/workflow-durable-task-step-plugin

[JENKINS-48882] Build Executor number is not consistent with EXECUTOR_NUMBER

Open
#551 5 comments 0 reactions 0 assignees View on GitHub
component:workflow-durable-task-step-plugin imported-jira-issue priority:blocker resolution:unresolved
Dominant language
Java
Stars
46
Forks
110
PR merge metrics
No merged PRs in 30d

Description

Build Executor display number is not consistent with the number is provided by EXECUTOR_NUMBER variable.

Display number should always by EXECUTOR_NUMBER+1 but it randomly shows different values.

When using 4-5 executors per node (master included) seemed to be easier to replicate but not 100%.

It seems to only be an issue on the display side.

When using EXECUTOR_NUMBER to separate folders of maven repository artifacts, to build in parallel, the value is very important to avoid "cross contamination".

We also use this variable to avoid constant download artifacts on every build, by mounting /var/lib/jenkins/.m2/repository/EXECUTOR_NUMBER inside a container.

Jenkinsfile:

node('master') {

stage('on master') {
echo EXECUTOR_NUMBER
sleep 30
sh 'echo ${EXECUTOR_NUMBER}'
}
}

node('docker') {
stage('on slave') {
echo EXECUTOR_NUMBER
sleep 30
sh 'echo ${EXECUTOR_NUMBER}'
}
}


Not sure if there is some way to get the Build Executor display number, so to compare, I took a screenshot from the nodes page, during the build.

---
Originally reported by ncosta, imported from: Build Executor number is not consistent with EXECUTOR_NUMBER


  • status: Open
  • priority: Blocker
  • component(s): workflow-durable-task-step-plugin
  • resolution: Unresolved
  • votes: 4
  • watchers: 9
  • imported: 20251212-090250

Raw content of original issue

Build Executor display number is not consistent with the number is provided by EXECUTOR_NUMBER variable.
Display number should always by EXECUTOR_NUMBER+1 but it randomly shows different values.

When using 4-5 executors per node (master included) seemed to be easier to replicate but not 100%.

It seems to only be an issue on the display side.
When using EXECUTOR_NUMBER to separate folders of maven repository artifacts, to build in parallel, the value is very important to avoid "cross contamination".
We also use this variable to avoid constant download artifacts on every build, by mounting /var/lib/jenkins/.m2/repository/EXECUTOR_NUMBER inside a container.

Jenkinsfile:



node('master') {

stage('on master') {
echo EXECUTOR_NUMBER
sleep 30
sh 'echo ${EXECUTOR_NUMBER}'
}
}

node('docker') {
stage('on slave') {
echo EXECUTOR_NUMBER
sleep 30
sh 'echo ${EXECUTOR_NUMBER}'
}
}



Not sure if there is some way to get the Build Executor display number, so to compare, I took a screenshot from the nodes page, during the build.

  • environment: Centos7 on both master and slave. Jenkins 2.97.

3 attachments

- [Screenshot_20180110_144412.png](https://issues.jenkins.io/secure/attachment/41093/Screenshot_20180110_144412.png)
> ![Screenshot_20180110_144412.png](https://issues.jenkins.io/secure/attachment/41093/Screenshot_20180110_144412.png)
- [Screenshot_20180110_144447.png](https://issues.jenkins.io/secure/attachment/41092/Screenshot_20180110_144447.png)
> ![Screenshot_20180110_144447.png](https://issues.jenkins.io/secure/attachment/41092/Screenshot_20180110_144447.png)
- [Screenshot_20180110_150544.png](https://issues.jenkins.io/secure/attachment/41094/Screenshot_20180110_150544.png)
> ![Screenshot_20180110_150544.png](https://issues.jenkins.io/secure/attachment/41094/Screenshot_20180110_150544.png)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.