Description of problem: Beaker XMLRPC interface does not provide all actions as Beaker GUI. Specifically Job search is possible using following creteria: [freznice@dhcp-26-251 bkr]$ bkr job-list -h Usage: bkr.exe job-list [options] ... Options: -h, --help show this help message and exit --username=USERNAME specify user --password=PASSWORD specify password -f FAMILY, --family=FAMILY Family for which the Job is run against -c COMPLETEDAYS, --completeDays=COMPLETEDAYS Number of days job has been completed for -t TAG, --tag=TAG Jobs with a particular tag -p PRODUCT, --product=PRODUCT Jobs for a particular product What is missing (very minimalistic): - search by job number (ranged) - search by owner - search by whiteboard Generally Beaker XMLRPC interface should allow at least the options which can be selected using Beaker Web UI. Version-Release number of selected component (if applicable): beaker-0.8.2-5.el5 brewbuild How reproducible: 100% Steps to Reproduce: 1 bkr job-list -h Actual results: XMLRPC job search very limited Expected results: XMLRPC job search more flexible
*** Bug 696540 has been marked as a duplicate of this bug. ***
Hi Frantisek, A number of the things you have mentioned has now been added as patches against a couple of other bugs. (See: https://bugzilla.redhat.com/show_bug.cgi?id=679458 and https://bugzilla.redhat.com/show_bug.cgi?id=822387). Would you be able to let me know what kind of use case are you targeting for the search by job ID range? If it is to filter out old jobs, would it be better if there was a way to search by the job submission date? Thanks.
On Gerrit: http://gerrit.beaker-project.org/#/c/1426/
(In reply to comment #2) > Hi Frantisek, > > A number of the things you have mentioned has now been added as patches > against a couple of other bugs. (See: > https://bugzilla.redhat.com/show_bug.cgi?id=679458 and > https://bugzilla.redhat.com/show_bug.cgi?id=822387). > > Would you be able to let me know what kind of use case are you targeting for > the search by job ID range? If it is to filter out old jobs, would it be > better if there was a way to search by the job submission date? Fair enough. Submission date works for me as well (if it is ranged). The use case was to be able to narrow other search result by time, for instance: - combination search by owner in last 1000 jobs (I'm fine with modification search by owner in last N days) - search by whiteboard but ignore last 2000 jobs > > Thanks.
The proposed patch adds support for --min-id and --max-id options which allows you to specify a minimum Job ID, a maximum Job ID or both. You can then use queries such as: List all jobs with IDs between 10-100 (both inclusive): $ bkr job-list --min-id=10 --maxid=100 List all scratch jobs with IDs between 10-100: $ bkr job-list --tag=scratch --min-id=10 --max-id=100 List all scratch jobs with min ID of 10: $ bkr job-list --tag=scratch --min-id=10 Does that help you?
(In reply to comment #6) > The proposed patch adds support for --min-id and --max-id options which > allows you to specify a minimum Job ID, a maximum Job ID or both. You can > then use queries such as: > > List all jobs with IDs between 10-100 (both inclusive): > > $ bkr job-list --min-id=10 --maxid=100 > > List all scratch jobs with IDs between 10-100: > > $ bkr job-list --tag=scratch --min-id=10 --max-id=100 > > List all scratch jobs with min ID of 10: > > $ bkr job-list --tag=scratch --min-id=10 > > > Does that help you? Yes it does. Thanks.
Verified with beaker-client-0.9.4-2.git.96.40f4404 Now beaker-client provide the support for --min-id and --max-id options for job-list command like the following: # bkr job-list --min-id=10 --max-id=100 [['J:100', 'J:99', 'J:98', 'J:97', 'J:96', 'J:95', 'J:92', 'J:91', 'J:90', 'J:89', 'J:88', 'J:87', 'J:86', 'J:85', 'J:84', 'J:83', 'J:82', 'J:81', 'J:80', 'J:67', 'J:63', 'J:62', 'J:60', 'J:59', 'J:54', 'J:53', 'J:29', 'J:25', 'J:23', 'J:22', 'J:19', 'J:14'], 'Count: 32'] # bkr job-list --tag=scratch --min-id=10 --max-id=100 [['J:100', 'J:99', 'J:98', 'J:97', 'J:96', 'J:95', 'J:92', 'J:91', 'J:90', 'J:89', 'J:88', 'J:87', 'J:86', 'J:85', 'J:84', 'J:83', 'J:82', 'J:81', 'J:80', 'J:67', 'J:63', 'J:62', 'J:60', 'J:59', 'J:54', 'J:53', 'J:29', 'J:25', 'J:23', 'J:22', 'J:19', 'J:14'], 'Count: 32'] # bkr job-list --tag=scratch --min-id=10 [['J:195', 'J:194', 'J:193', 'J:192', 'J:191', 'J:190', 'J:189', 'J:188', <snip> 'J:59', 'J:54', 'J:53', 'J:29', 'J:25', 'J:23', 'J:22', 'J:19', 'J:14'], 'Count: 126']
This has now been released