Project

Profile

Help

Issue #1784

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

Added by gmbnomis over 4 years ago. Updated over 1 year 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

Associated revisions

Revision 0ea85725 View on GitHub
Added by Austin Macdonald over 4 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

Revision 0ea85725 View on GitHub
Added by Austin Macdonald over 4 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

History

#1 Updated by mhrivnak over 4 years ago

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

#2 Updated by amacdona@redhat.com over 4 years ago

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

#3 Updated by mhrivnak over 4 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"]}}]}}}'

#5 Updated by semyers over 4 years ago

  • Platform Release changed from 2.8.1 to 2.8.2

#6 Updated by amacdona@redhat.com over 4 years ago

  • Status changed from ASSIGNED to POST

#7 Updated by Anonymous over 4 years ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100

#8 Updated by semyers over 4 years ago

  • Platform Release changed from 2.8.2 to 2.8.3

#10 Updated by pthomas@redhat.com over 4 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 ~]# 

#11 Updated by semyers over 4 years ago

  • Status changed from MODIFIED to 5

#12 Updated by pthomas@redhat.com over 4 years ago

  • Status changed from 5 to 6

#13 Updated by semyers over 4 years ago

  • Status changed from 6 to CLOSED - CURRENTRELEASE

#15 Updated by bmbouter over 1 year ago

  • Tags Pulp 2 added

Please register to edit this issue

Also available in: Atom PDF