build_job() always returns an empty string, no way to track resulting ID
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Python Jenkins |
Fix Released
|
Undecided
|
Ken Dreyer |
Bug Description
Since Jenkins version 1.519 (released 2013/06/17), build_job() always returns an empty string (the empty HTTP body from the POST request).
The Jenkins REST API currently returns an HTTP response with a "Location" header that includes a queue item number for the job. This queue item number is only valid for a few minutes until Jenkins removes it from memory, but in the meantime, while it's available, clients can poll it to find the eventual job ID / URL.
Instead of returning the HTTP response body, we should parse this Location HTTP header and return the queue ID. This will require a new jenkins_urlopen() method, since the main jenkins_open() method only returns the body without regard for any headers.
We can also implement a get_queue_item() method to discover a queued job's status, and possibly a job URL.
summary: |
- build_job() always returns an empty string + build_job() always returns an empty string, no way to track resulting ID |
Changed in python-jenkins: | |
assignee: | nobody → Ken Dreyer (ktdreyer) |
status: | New → In Progress |
https:/ /review. openstack. org/#/q/ project: openstack/ python- jenkins+ topic:bug/ 1724932