Project

Profile

Help

Issue #344

pulp-admin rpm repo content rpm's "--sort" flag not sorting

Added by strobert@strobe.net almost 7 years ago. Updated almost 3 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
2.0.6
Platform Release:
2.6.0
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

Description of problem:
"pulp-admin rpm repo content rpm" --sort is not sorting. in fact it looks to be removing the sorting.

Version-Release number of selected component (if applicable):
2.0.7-0.2.beta.noarch

How reproducible:
Always

Steps to Reproduce:
1. create a repo, for example pulp el6 RPMs:
pulp-admin rpm repo create --repo-id pulp-el6 --relative-url rhels6/pulp --feed http://repos.fedorapeople.org/repos/pulp/pulp/v2/beta/6/x86_64/ --skip drpm

2. sync it
3. run without a --sort flag:
pulp-admin rpm repo content rpm --repo-id pulp-el6 --fields name,version,release,arch
4. run with a --sort flag:
pulp-admin rpm repo content rpm --repo-id pulp-el6 --sort name,ascending --fields name,version,release,arch

Actual results:
--sort produces unsorted output

Expected results:
--sort name (with or without the ,ascending) would cause the output to be sorted by name

Additional info:

+ This bug was cloned from Bugzilla Bug #896278 +

History

#1 Updated by mhrivnak almost 7 years ago

Looking in ~/.pulp/server_calls.log, it seems that the CLI is specifying that the requested sort field be applied to the association, not to the content unit. Since the association doesn't have a "name" field, no sorting is applied.

By default, we only show the content unit attributes and not the association attributes, so it is confusing to sort on the ones that are hidden by default.

+ This comment was cloned from Bugzilla #896278 comment 1 +

#2 Updated by jason.dobies@redhat.com almost 7 years ago

Sliding this out to 2.3 to be addressed as a bigger story of revisiting criteria specifications in the CLI.

+ This comment was cloned from Bugzilla #896278 comment 2 +

#3 Updated by peter.hehn@ft.com almost 7 years ago

A closely related issue I think - when any sort field is added to a query for puppet modules, it breaks entirely giving the following error in admin.log...

pulp-admin puppet repo modules --repo-id=myrepo --str-eq name=mymodulename --str-eq author=me --fields=name,version --sort=version

File "/usr/lib/python2.6/site-packages/pulp/client/extensions/core.py", line 478, in run
  exit_code = Cli.run(self, args)
File "/usr/lib/python2.6/site-packages/okaara/cli.py", line 921, in run
  exit_code = command_or_section.execute(self.prompt, remaining_args)
File "/usr/lib/python2.6/site-packages/pulp/client/extensions/extensions.py", line 224, in execute
  return self.method(*arg_list, **clean_kwargs)
File "/usr/lib/python2.6/site-packages/pulp_puppet/extensions/admin/repo/modules.py", line 46, in run
  map(lambda x : x['metadata'].pop('checksums', None), modules)
File "/usr/lib/python2.6/site-packages/pulp_puppet/extensions/admin/repo/modules.py", line 46, in <lambda>
  map(lambda x : x['metadata'].pop('checksums', None), modules)
AttributeError: 'NoneType' object has no attribute 'pop'

+ This comment was cloned from Bugzilla #896278 comment 3 +

#4 Updated by cduryee almost 7 years ago

The scenarios in the original bugzilla entry and in comment #3 work for me on pulp 2.4.3.

Marking BZ as MODIFIED for 2.5.1.

+ This comment was cloned from Bugzilla #896278 comment 4 +

#5 Updated by cduryee almost 7 years ago

fixed in pulp 2.6.0-0.2.beta

+ This comment was cloned from Bugzilla #896278 comment 5 +

#6 Updated by pthomas@redhat.com almost 7 years ago

verified,
[root@cloud-qe-4 ~]# rpm -qa pulp-server
pulp-server-2.6.0-0.5.beta.el7.noarch
[root@cloud-qe-4 ~]#

Tested the original issue and comment#3

[root@cloud-qe-4 ~]# pulp-admin puppet repo modules --repo-id=repo1 --str-eq author=puppetlabs --fields=name,version --sort=version
Name: logentries
Version: 0.0.1

Name: kwalify
Version: 0.0.1

Name: vcli_rsyslog
Version: 0.0.1

Name: sqlite
Version: 0.0.1

Name: node_gce
Version: 0.0.1

Name: appdirector
Version: 0.0.1

Name: lib_puppet
Version: 0.0.1

Name: mount_providers
Version: 0.0.2

Name: cloudformation
Version: 0.0.2

Name: newrelic
Version: 0.0.3

Name: node_openstack
Version: 0.0.4

Name: dashboard
Version: 0.0.4

Name: drbd
Version: 0.1.0

Name: stunnel
Version: 0.1.0

Name: transition
Version: 0.1.0

Name: pe_gem
Version: 0.1.0

Name: strings
Version: 0.1.1

Name: awsdemo_profiles
Version: 0.1.1

Name: reboot
Version: 0.1.9

Name: mongodb
Version: 0.10.0

Name: razor
Version: 0.11.0

Name: gcc
Version: 0.2.0

Name: aws
Version: 0.2.0

Name: tftp
Version: 0.2.2

Name: git
Version: 0.3.0

Name: vswitch
Version: 0.3.0

Name: dhcp
Version: 0.3.0

Name: lvm
Version: 0.4.0

Name: ruby
Version: 0.4.0

Name: gce_compute
Version: 0.5.0

Name: nodejs
Version: 0.7.1

Name: registry
Version: 1.0.3

Name: powershell
Version: 1.0.4

Name: acl
Version: 1.0.4

Name: haproxy
Version: 1.1.0

Name: dism
Version: 1.1.0

Name: grizzly
Version: 1.1.1

Name: concat
Version: 1.1.2

Name: cloud_provisioner
Version: 1.1.4

Name: vcsrepo
Version: 1.2.0

Name: apache
Version: 1.2.0

Name: inifile
Version: 1.2.0

Name: motd
Version: 1.2.0

Name: firewall
Version: 1.3.0

Name: java
Version: 1.3.0

Name: boundary
Version: 1.3.0

Name: xinetd
Version: 1.4.0

Name: apt
Version: 1.7.0

Name: mcollective
Version: 2.0.0

Name: pe_upgrade
Version: 2.1.1

Name: tempest
Version: 3.0.0

Name: mysql
Version: 3.1.0

Name: splunk
Version: 3.1.1

Name: ntp
Version: 3.3.0

Name: postgresql
Version: 4.1.0

Name: puppetdb
Version: 4.1.0

Name: ceilometer
Version: 4.2.0

Name: keystone
Version: 4.2.0

Name: horizon
Version: 4.2.0

Name: heat
Version: 4.2.0

Name: cinder
Version: 4.2.0

Name: nova
Version: 4.2.0

Name: neutron
Version: 4.3.0

Name: stdlib
Version: 4.5.1

Name: openstack
Version: 5.0.1

Name: nginx
Version: 99.99.99

+ This comment was cloned from Bugzilla #896278 comment 6 +

#7 Updated by bmbouter almost 7 years ago

  • Severity changed from Medium to 2. Medium

#8 Updated by rbarlow over 6 years ago

  • Status changed from 6 to CLOSED - CURRENTRELEASE

#10 Updated by bmbouter almost 3 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF