Bug 1131030 - [REST API] using from filter in an event search doesn't work
Summary: [REST API] using from filter in an event search doesn't work
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: oVirt
Classification: Retired
Component: ovirt-engine-core
Version: 3.5
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: ---
: 3.5.0
Assignee: Eli Mesika
QA Contact: sefi litmanovich
URL:
Whiteboard: infra
Depends On:
Blocks: 1073943
TreeView+ depends on / blocked
 
Reported: 2014-08-18 12:11 UTC by sefi litmanovich
Modified: 2016-02-10 19:35 UTC (History)
11 users (show)

Fixed In Version: ovirt-3.5.0_rc2
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-10-17 12:43:43 UTC
oVirt Team: Infra


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
oVirt gerrit 32486 master MERGED core: Fixing events search with from keyword Never
oVirt gerrit 32499 ovirt-engine-3.5 MERGED core: Fixing events search with from keyword Never

Description sefi litmanovich 2014-08-18 12:11:21 UTC
Description of problem:

a query for an event using rest api didn't filter the results accordingly.


e.g. using the example found on the technical guide:

GET

https://{engine_address}/api/events;from=2795?search=type%3D30

HTTP/1.1
Accept: application/xml

also tried the old format:

https://{engine_address}/api/events?search=type%3D30&from=2795

playing with the value of the from key, it seems that this parameter is ignored.


Actual results:

I get all the events of type 30, as well as events with id < 2795

Expected results:

I should get all the events of type 30 with id > 2795

Comment 1 Juan Hernández 2014-08-20 10:13:42 UTC
As far as I can tell this "from" parameter has never been implemented, so we can remove it from the documentation or implement it as an enhancement for 3.6. What do we want to do?

Comment 2 Juan Hernández 2014-08-27 14:38:31 UTC
This is a side effect of the following change:

  http://gerrit.ovirt.org/28135

Now the "from" parameter of search queries is effectively ignored, no piece of code in the engine calls the SearchContainer.getSearchForm() method.

Comment 3 Juan Hernández 2014-08-27 14:42:03 UTC
Eli, can you take a look? I think it is a serious issue, as it breaks backwards compatibility for users of the RESTAPI.

Comment 4 Eli Mesika 2014-09-04 01:54:01 UTC
(In reply to Juan Hernández from comment #3)
> Eli, can you take a look? I think it is a serious issue, as it breaks
> backwards compatibility for users of the RESTAPI.

Yes, I agree , this is a real regression!
We should restore the 'from' support on top of that patch ...

Comment 5 Sven Kieske 2014-09-05 08:49:15 UTC
When was this regression introduced?
Should this get backported to 3.4.4 ? Should this block 3.4.4 release
when it is present in this version?

Comment 6 Juan Hernández 2014-09-05 08:59:11 UTC
This regression was introduced in ovirt-engine-3.5.0_beta1, it doesn't affect 3.4.

Comment 7 sefi litmanovich 2014-09-16 10:33:10 UTC
Verified with rhevm-3.5.0-0.12.beta.el6ev.noarch.

the format: 
https://{engine_address}/api/events;from=415?search=type%3D30

returns the expected result.

Comment 8 Sandro Bonazzola 2014-10-17 12:43:43 UTC
oVirt 3.5 has been released and should include the fix for this issue.


Note You need to log in before you can comment on or make changes to this bug.