Project

Profile

Help

Issue #1784

closed

regression: "pulp-admin rpm repo search" with filters does not work as expected

Added by gmbnomis about 8 years ago. Updated about 5 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
High
Category:
-
Sprint/Milestone:
-
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
Actions #1

Updated by mhrivnak about 8 years ago

  • Priority changed from Normal to High
  • Platform Release set to 2.8.1
  • Triaged changed from No to Yes
Actions #2

Updated by amacdona@redhat.com about 8 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to amacdona@redhat.com
Actions #3

Updated by mhrivnak about 8 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"]}}]}}}'
Actions #5

Updated by semyers about 8 years ago

  • Platform Release changed from 2.8.1 to 2.8.2
Actions #6

Updated by amacdona@redhat.com about 8 years ago

  • Status changed from ASSIGNED to POST

Added by Austin Macdonald about 8 years ago

Revision 0ea85725 | View on GitHub

Make translate recursive to handle nested queries

Criteria searches will be translated recursively to ensure that nested queries are translated as well.

closes #1784

Added by Austin Macdonald about 8 years ago

Revision 0ea85725 | View on GitHub

Make translate recursive to handle nested queries

Criteria searches will be translated recursively to ensure that nested queries are translated as well.

closes #1784

Actions #7

Updated by Anonymous about 8 years ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100
Actions #8

Updated by semyers about 8 years ago

  • Platform Release changed from 2.8.2 to 2.8.3
Actions #10

Updated by pthomas@redhat.com about 8 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 ~]# 
Actions #11

Updated by semyers almost 8 years ago

  • Status changed from MODIFIED to 5
Actions #12

Updated by pthomas@redhat.com almost 8 years ago

  • Status changed from 5 to 6
Actions #13

Updated by semyers almost 8 years ago

  • Status changed from 6 to CLOSED - CURRENTRELEASE
Actions #15

Updated by bmbouter about 5 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF