jenkinsci / jenkinsci/workflow-durable-task-step-plugin
[JENKINS-51948] ExecutorStepExecution.PlaceholderTask getEnclosingLabel/computeEnclosingLabel incorrectly calculate node resulting in mislabeled stages in parallel if they don't have an agent
- Dominant language
- Java
- Stars
- 46
- Forks
- 110
- PR merge metrics
- No merged PRs in 30d
Description
The best I've managed to debug is to finger this code:
I think it should be replaced/rewritten to use the same code methodology as flowGraphTable
I've attached a jenkinsfile, you'll need to change the agent "pipeline" to an agent class that you have on your system. Then run the job and look at the build executor status.
You should see two nodes, one with (Code) and one with (Frontend), instead you'll see two with the former and none with the latter.
The logic in the highlighted code block doesn't actually pick nodes, it sort of picks a potential name, leaves it in a reachable variable, and then loops. Also, afaict, the n.equals method seems to spuriously result in true – i.e., whatever logic the author was expecting to use it to deterministically identify the right corresponding node fails miserably.
---
Originally reported by jsoref, imported from: ExecutorStepExecution.PlaceholderTask getEnclosingLabel/computeEnclosingLabel incorrectly calculate node resulting in mislabeled stages in parallel if they don't have an agent
Raw content of original issue
The best I've managed to debug is to finger this code:
I think it should be replaced/rewritten to use the same code methodology as flowGraphTable
I've attached a jenkinsfile, you'll need to change the agent "pipeline" to an agent class that you have on your system. Then run the job and look at the build executor status.
You should see two nodes, one with (Code) and one with (Frontend), instead you'll see two with the former and none with the latter.The logic in the highlighted code block doesn't actually pick nodes, it sort of picks a potential name, leaves it in a reachable variable, and then loops. Also, afaict, the n.equals method seems to spuriously result in true – i.e., whatever logic the author was expecting to use it to deterministically identify the right corresponding node fails miserably.
1 attachment
- [Jenkinsfile](https://issues.jenkins.io/secure/attachment/42878/Jenkinsfile)
Contributor guide
Assessment
This issue has not been assessed yet.