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

[JENKINS-49644] API does not return all running builds

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

Description

Fetching node information from a node running a pipeline build returns very little information about the executor.

Hitting this URL - https://JENKINS_URL/computer//api/json?depth=2 - returns this about the executors:

```
...
"executors": [{
"currentExecutable": null,
"idle": false,
"likelyStuck": false,
"number": 0,
"progress": 5
}, {
"currentExecutable": {
"_class": "hudson.model.FreeStyleBuild",
"actions": [{
"_class": "hudson.model.CauseAction",
"causes": [{
"_class": "hudson.triggers.TimerTrigger$TimerTriggerCause",
"shortDescription": "Started by timer"
}]
}, {
"_class": "jenkins.metrics.impl.TimeInQueueAction"
},
...
```

The problem with this comes when we use the Python SDK because that uses the currentExecutable key to gather information about running builds:

https://github.com/openstack/python-jenkins/blob/16007e01858cc5d36afdc31d22b5644f91a1f935/jenkins/__init__.py#L1149

We discovered this because the automation we use to scale our build cluster up and down doesn't see any jobs running on nodes which are running pipeline builds and so they get terminated mid-build.

This did work with previous versions of Jenkins/Pipeline but I can't find any mention of a regression anywhere.

---
Originally reported by grahamlyons, imported from: API does not return all running builds


  • status: Open
  • priority: Major
  • component(s): workflow-durable-task-step-plugin
  • resolution: Unresolved
  • votes: 3
  • watchers: 5
  • imported: 20251212-090250

Raw content of original issue

Fetching node information from a node running a pipeline build returns very little information about the executor.

Hitting this URL - https://JENKINS_URL/computer/<NODE_NAME>/api/json?depth=2 - returns this about the executors:



...

"executors": [{
"currentExecutable": null,
"idle": false,
"likelyStuck": false,
"number": 0,
"progress": 5
}, {
"currentExecutable": {
"_class": "hudson.model.FreeStyleBuild",
"actions": [{
"_class": "hudson.model.CauseAction",
"causes": [{
"_class": "hudson.triggers.TimerTrigger$TimerTriggerCause",
"shortDescription": "Started by timer"
}]
}, {
"_class": "jenkins.metrics.impl.TimeInQueueAction"
},
...

The problem with this comes when we use the Python SDK because that uses the currentExecutable key to gather information about running builds:
https://github.com/openstack/python-jenkins/blob/16007e01858cc5d36afdc31d22b5644f91a1f935/jenkins/__init__.py#L1149

We discovered this because the automation we use to scale our build cluster up and down doesn't see any jobs running on nodes which are running pipeline builds and so they get terminated mid-build.

This did work with previous versions of Jenkins/Pipeline but I can't find any mention of a regression anywhere.

  • environment: Jenkins 2.89.3, Pipeline 2.5

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.