Actions
Issue #1784
closedregression: "pulp-admin rpm repo search" with filters does not work as expected
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
2.8.0
Platform Release:
2.8.3
OS:
CentOS 7
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:
Description
on a freshly installed Pulp 2.8.0 install (CentOS 7), pulp-admin behaves different to 2.7.1 when searching RPM repos.
There is a single RPM repo with id "sum42" on Pulp. Searching for it using the example syntax given in the command's help text yields nothing:
$ pulp-admin rpm repo search --fields id --str-eq="id=sum42"
+----------------------------------------------------------------------+
Repositories
+----------------------------------------------------------------------+
However, using "repo_id" as attribute name works:
$ pulp-admin rpm repo search --fields id --str-eq="repo_id=sum42"
+----------------------------------------------------------------------+
Repositories
+----------------------------------------------------------------------+
Id: sum42
Interestingly, a raw JSON Mongo filter seems to accept both "id" and "repo_id":
$ pulp-admin rpm repo search --fields id --filters '{"id": "sum42"}'
+----------------------------------------------------------------------+
Repositories
+----------------------------------------------------------------------+
Id: sum42
Updated by mhrivnak about 7 years ago
- Priority changed from Normal to High
- Platform Release set to 2.8.1
- Triaged changed from No to Yes
Updated by amacdona@redhat.com almost 7 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to amacdona@redhat.com
Updated by mhrivnak almost 7 years ago
Here's an example from katello that also fails currently:
curl -s -k -u admin:admin https://localhost/pulp/api/v2/content/units/erratum/search/ -d '{"criteria": {"filters":{"$or": [{"id": {"$in": ["RHEA-2012:0002"]}}]}}}'
Updated by semyers almost 7 years ago
- Platform Release changed from 2.8.1 to 2.8.2
Updated by amacdona@redhat.com almost 7 years ago
- Status changed from ASSIGNED to POST
Added by Austin Macdonald almost 7 years ago
Added by Austin Macdonald almost 7 years ago
Make translate recursive to handle nested queries
Criteria searches will be translated recursively to ensure that nested queries are translated as well.
closes #1784
Updated by Anonymous almost 7 years ago
- Status changed from POST to MODIFIED
- % Done changed from 0 to 100
Applied in changeset pulp|0ea85725b3fbdb9c1e79437271ce601427994920.
Updated by semyers almost 7 years ago
- Platform Release changed from 2.8.2 to 2.8.3
Updated by pthomas@redhat.com almost 7 years ago
Verified
[root@qe-blade-03 ~]# rpm -qa pulp-server
pulp-server-2.8.3-0.1.beta.git.44.70215c3.el7.noarch
[root@qe-blade-03 ~]#
root@qe-blade-03 ~]# pulp-admin rpm repo search --fields id --str-eq="id=zoo"
+----------------------------------------------------------------------+
Repositories
+----------------------------------------------------------------------+
Id: zoo
[root@qe-blade-03 ~]# pulp-admin rpm repo search --fields id --str-eq="repo_id=zoo"
+----------------------------------------------------------------------+
Repositories
+----------------------------------------------------------------------+
Id: zoo
root@qe-blade-03 ~]# curl -s -k -u admin:admin https://localhost/pulp/api/v2/content/units/erratum/search/ -d '{"criteria": {"filters":{"$or": [{"id": {"$in": ["RHEA-2012:0002"]}}]}}}'
[{"_href": "/pulp/api/v2/content/units/erratum/f6f68339-f770-45ba-adfa-17431e47bcf3/", "issued": "2012-01-27 16:08:06", "references": [], "pulp_user_metadata": {}, "_content_type_id": "erratum", "id": "RHEA-2012:0002", "from": "errata@redhat.com", "severity": "", "title": "Sea_Erratum", "children": {}, "version": "1", "reboot_suggested": false, "type": "security", "pkglist": [{"packages": [{"src": "http://www.fedoraproject.org", "name": "walrus", "sum": null, "filename": "walrus-0.71-1.noarch.rpm", "epoch": null, "version": "0.71", "release": "1", "arch": "noarch"}, {"src": "http://www.fedoraproject.org", "name": "penguin", "sum": null, "filename": "penguin-0.9.1-1.noarch.rpm", "epoch": null, "version": "0.9.1", "release": "1", "arch": "noarch"}, {"src": "http://www.fedoraproject.org", "name": "shark", "sum": null, "filename": "shark-0.1-1.noarch.rpm", "epoch": null, "version": "0.1", "release": "1", "arch": "noarch"}], "name": "1", "short": ""}], "status": "stable", "updated": "", "description": "Sea_Erratum", "_last_updated": "2016-04-13T14:52:15Z", "pushcount": "", "rights": "", "solution": "", "summary": "", "release": "1", "_id": "f6f68339-f770-45ba-adfa-17431e47bcf3"}][root@qe-blade-03 ~]#
Updated by semyers almost 7 years ago
- Status changed from 6 to CLOSED - CURRENTRELEASE
Actions
Make translate recursive to handle nested queries
Criteria searches will be translated recursively to ensure that nested queries are translated as well.
closes #1784