Comment 1 for bug 1771319

Revision history for this message
Roscoe Pyell (roscoejp) wrote :

This also effects any other function calls that rely on queries passed to get_info - which after a quick ctrl+f appears to be just get_all_jobs() atm.

Since _build_url() is used for constructing the url with base, it should be a relatively simple fix of replacing 'INFO' with 'url' to get this functioning as described. It might also be good to set url = INFO before checking for the existence of item or query to keep the current functionality available as a call to get_info() without any params.

I'll work on a PR for this later if I have time. It's such a simple fix but has caused headaches for me over the past 2 days after finding that get_all_jobs() didn't actually work as advertised.

ercpe@ - you can work around this by making your own call to your instance with your query:

j = jenkins.Jenkins(...)
query = '?tree=views[name]'
url = jenkins.INFO + QUERY
results = j.jenkins_open(jenkins.requests.Request('GET', j._build_url(url)))