-
Bug
-
Resolution: Unresolved
-
Major
-
None
The /computer/api/json endpoint returns a null value for "currentExecutable" field for all KubernetesComputers defined in pipeline. For example:
kubernetes { label "openjdk1-8-0-265-openjdk1-11-0-8" cloud "k8s-cluster" namespace "build" yamlFile '.ci/k8s/build.yaml'}
The KubernetesComputers defined using UI and referenced by label are not affected.
Response for KubernetesComputer defined in pipeline:
"_class": "org.csanchez.jenkins.plugins.kubernetes.KubernetesComputer", "executors": [ { "currentExecutable": null, "idle": false } ], "offline": false, "offlineCause": null, "offlineCauseReason": "", "containers": []}
Repospone for KubernetesComputer defined in UI view:
{ "_class": "org.csanchez.jenkins.plugins.kubernetes.KubernetesComputer", "executors": [ { "currentExecutable": { "_class": "org.jenkinsci.plugins.workflow.support.steps.ExecutorStepExecution$PlaceholderTask$PlaceholderExecutable", "timestamp": 1603455886141, "url": "<build url>" }, "idle": false } ], "offline": false, "offlineCause": null, "offlineCauseReason": "", "containers": []}
[JENKINS-64020] /computer/api/json returns null value for "currentExecutable" field for non-idle KubernetesComputer defined in a pipeline
Description |
Original:
The /computer/api/json endpoint returns a null value for "currentExecutable" field for all KubernetesComputers defined in pipeline. For example: {code:java} kubernetes { label "openjdk1-8-0-265-openjdk1-11-0-8" cloud "k8s-cluster" namespace "build" yamlFile '.ci/k8s/build.yaml'}{code} The KubernetesComputers defined using UI and referenced by label are not affected. Response for KubernetesComputer defined in pipeline: {code:java} "_class": "org.csanchez.jenkins.plugins.kubernetes.KubernetesComputer", "executors": [ { "currentExecutable": null, "idle": false } ], "offline": false, "offlineCause": null, "offlineCauseReason": "", "containers": []} {code} Repospone for KubernetesComputer defined in UI view: {code:java} { "_class": "org.csanchez.jenkins.plugins.kubernetes.KubernetesComputer", "executors": [ { "currentExecutable": { "_class": "org.jenkinsci.plugins.workflow.support.steps.ExecutorStepExecution$PlaceholderTask$PlaceholderExecutable", "timestamp": 1603455886141, "url": "<build url>" }, "idle": false } ], "offline": false, "offlineCause": null, "offlineCauseReason": "", "containers": []} {code} The /computer/api/xml endpoint returns correct data for both types. (KubernetesComputer defined in pipeline and in UI view). |
New:
The /computer/api/json endpoint returns a null value for "currentExecutable" field for all KubernetesComputers defined in pipeline. For example: {code:java} kubernetes { label "openjdk1-8-0-265-openjdk1-11-0-8" cloud "k8s-cluster" namespace "build" yamlFile '.ci/k8s/build.yaml'}{code} The KubernetesComputers defined using UI and referenced by label are not affected. Response for KubernetesComputer defined in pipeline: {code:java} "_class": "org.csanchez.jenkins.plugins.kubernetes.KubernetesComputer", "executors": [ { "currentExecutable": null, "idle": false } ], "offline": false, "offlineCause": null, "offlineCauseReason": "", "containers": []} {code} Repospone for KubernetesComputer defined in UI view: {code:java} { "_class": "org.csanchez.jenkins.plugins.kubernetes.KubernetesComputer", "executors": [ { "currentExecutable": { "_class": "org.jenkinsci.plugins.workflow.support.steps.ExecutorStepExecution$PlaceholderTask$PlaceholderExecutable", "timestamp": 1603455886141, "url": "<build url>" }, "idle": false } ], "offline": false, "offlineCause": null, "offlineCauseReason": "", "containers": []} {code} |