Bug 857960

Summary: repo units results are not getting sorted
Product: [Retired] Pulp Reporter: Preethi Thomas <pthomas>
Component: user-experienceAssignee: Jay Dobies <jason.dobies>
Status: CLOSED NOTABUG QA Contact: Preethi Thomas <pthomas>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 2.0.6   
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-09-17 15:44:32 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Preethi Thomas 2012-09-17 15:21:39 UTC
Description of problem:
Looks like repo units results are not getting sorted or even displaying results as per cli command 

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.create and sync a repo
2. run repo units with --ascending and --descending and
3.
  
Actual results:

[root@preethi-el6-pulp ~]#  pulp-admin repo units drpm --repo-id drpm --sort ascending  --limit 2 |more
Created:       2012-09-14T11:52:34
Id:            505352c2196f453ed5004562
Metadata:      
  Checksum:     b37b6efe09ddfb360b754f259fe3a6b8183d48a4815fcf8983a8f39d50f62a3c
  Checksumtype: sha256
  Epoch:        0
  Filename:     drpms/yum-3.4.3-18.fc16_3.4.3-19.fc16.noarch.drpm
  New Package:  yum-0:3.4.3-19.fc16.noarch
  Release:      18.fc16
  Sequence:     yum-3.4.3-18.fc16-a784c801daf29ec27728fd73b416b30221114132124212
                122242121212424212121272421212121212a12121212862424212121230ff21
                0cf2109f210ee2108e210ad2108f110de110ae110fd110bc1108c110db110ab1
                10fa110ca110e9110d8110a8110f710c710e6108610d510a510f4109410d310a
                310f2109210e11
  Size:         96409
  Version:      3.4.3
Owner Id:      yum_importer
Owner Type:    importer
Repo Id:       drpm
Unit Id:       f8157d13-4693-4995-b939-1289bdcb1140
Unit Type Id:  drpm
Updated:       2012-09-14T11:52:34


[root@preethi-el6-pulp ~]# pulp-admin repo units drpm --repo-id drpm --sort descending --limit 2 |more
Created:       2012-09-14T11:52:34
Id:            505352c2196f453ed5004562
Metadata:      
  Checksum:     b37b6efe09ddfb360b754f259fe3a6b8183d48a4815fcf8983a8f39d50f62a3c
  Checksumtype: sha256
  Epoch:        0
  Filename:     drpms/yum-3.4.3-18.fc16_3.4.3-19.fc16.noarch.drpm
  New Package:  yum-0:3.4.3-19.fc16.noarch
  Release:      18.fc16
  Sequence:     yum-3.4.3-18.fc16-a784c801daf29ec27728fd73b416b30221114132124212
                122242121212424212121272421212121212a12121212862424212121230ff21
                0cf2109f210ee2108e210ad2108f110de110ae110fd110bc1108c110db110ab1
                10fa110ca110e9110d8110a8110f710c710e6108610d510a510f4109410d310a
                310f2109210e11
  Size:         96409
  Version:      3.4.3
Owner Id:      yum_importer
Owner Type:    importer
Repo Id:       drpm
Unit Id:       f8157d13-4693-4995-b939-1289bdcb1140
Unit Type Id:  drpm
Updated:       2012-09-14T11:52:34

--More--




Expected results:


Additional info:

Comment 1 Jay Dobies 2012-09-17 15:29:47 UTC
The command looks incorrect. And thankfully, I can actually point to usage text that describes why:

  --sort        - field name, a comma, and either the word "ascending" or
                  "descending". The comma and direction are optional, and the
                  direction defaults to ascending. Do not put a space before or
                  after the comma. For multiple fields, use this option multiple
                  times. Each one will be applied in the order supplied.

I don't think we can call that a parsing thing that the CLI should catch. Since just a single word is considered the field name, technically "--sort ascending" is saying "sort on a field called ascending". Unlikely, perhaps, but also technically possible and I'd be hesistant to flag that as an invalid call.

Comment 2 Preethi Thomas 2012-09-17 15:44:32 UTC
user error. closing

[root@preethi-el6-pulp ~]#  pulp-admin repo units drpm --repo-id drpm --sort id,ascending  --limit 2 
Created:       2012-09-14T11:52:33
Id:            505352c1196f453ed500453a
Metadata:      
  Checksum:     e348519427b367a13f1898f3fc02235acb756cfdb834b3ca391416216b423a9e
  Checksumtype: sha256
  Epoch:        0
  Filename:     drpms/yum-3.4.3-10.fc16_3.4.3-11.fc16.noarch.drpm
  New Package:  yum-0:3.4.3-11.fc16.noarch
  Release:      10.fc16
  Sequence:     yum-3.4.3-10.fc16-7036d252de253db92316d108308831d521114132124212
                1222421212124242121272421212121212a1212121286272121212309f210ee2
                10be2108e210fc210de110ae110fd110cd1108c110db110ab110fa110ca1109a
                110b9110a8110f710c710e6108610d510a510f4109410d310a310f2109210e11
  Size:         78465
  Version:      3.4.3
Owner Id:      yum_importer
Owner Type:    importer
Repo Id:       drpm
Unit Id:       4dde678e-9371-480a-a3b4-99361913a0bd
Unit Type Id:  drpm
Updated:       2012-09-14T11:52:33


Created:       2012-09-14T11:52:33
Id:            505352c1196f453ed500453d
Metadata:      
  Checksum:     ee53584b0b26e9071699f7c7e3633c53f0c0f5bf6563f53791756181a67f9c2a
  Checksumtype: sha256
  Epoch:        0
  Filename:     drpms/yum-cron-3.4.3-11.fc16_3.4.3-16.fc16.noarch.drpm
  New Package:  yum-cron-0:3.4.3-16.fc16.noarch
  Release:      11.fc16
  Sequence:     yum-cron-3.4.3-11.fc16-4b0a8c6fbbf8f4101d8591497adc46e2021160
  Size:         29709
  Version:      3.4.3
Owner Id:      yum_importer
Owner Type:    importer
Repo Id:       drpm
Unit Id:       42722e2e-856e-4853-b0ae-13eb1fd5689a
Unit Type Id:  drpm
Updated:       2012-09-14T11:52:33


[root@preethi-el6-pulp ~]# 


[root@preethi-el6-pulp ~]# pulp-admin repo units drpm --repo-id drpm --sort id,descending --limit 2 
Created:       2012-09-14T11:52:34
Id:            505352c2196f453ed5004574
Metadata:      
  Checksum:     705d6dd9ab7431995dce501ac311b55a328c6939888de97c8d82d5f3f5f1f7cd
  Checksumtype: sha256
  Epoch:        0
  Filename:     drpms/yum-3.4.3-20.fc16_3.4.3-22.fc16.noarch.drpm
  New Package:  yum-0:3.4.3-22.fc16.noarch
  Release:      20.fc16
  Sequence:     yum-3.4.3-20.fc16-7413d83087d895fd6549ce90c092324e21114132124212
                122242121212424212121272421212121212a12121212862424212121230ff21
                0cf2109f210ee2108e210ad2108f110de110ae110fd110bc1108c110db110ab1
                10fa110ca110e9110d8110a8110f710c710e6108610d510a510f4109410d310a
                310f2109210e11
  Size:         145717
  Version:      3.4.3
Owner Id:      yum_importer
Owner Type:    importer
Repo Id:       drpm
Unit Id:       e9663e4c-df05-4233-bedd-73309dd7113b
Unit Type Id:  drpm
Updated:       2012-09-14T11:52:34


Created:       2012-09-14T11:52:34
Id:            505352c2196f453ed5004572
Metadata:      
  Checksum:     45ef41a474de15f4ec5ab1fd92778e15917c06b71b809876921112ba45d94780
  Checksumtype: sha256
  Epoch:        0
  Filename:     drpms/yum-cron-3.4.3-8.fc16_3.4.3-9.fc16.noarch.drpm
  New Package:  yum-cron-0:3.4.3-9.fc16.noarch
  Release:      8.fc16
  Sequence:     yum-cron-3.4.3-8.fc16-1fbc6aa6e0b34983652b07d64d004331021160
  Size:         28289
  Version:      3.4.3
Owner Id:      yum_importer
Owner Type:    importer
Repo Id:       drpm
Unit Id:       43e52062-c163-4c68-8605-f9ecfbfa2978
Unit Type Id:  drpm
Updated:       2012-09-14T11:52:34


[root@preethi-el6-pulp ~]#

Comment 3 Jay Dobies 2013-01-03 20:02:59 UTC
Moving these up against the 2.0 Beta so we can delete the CR-2 version from bugzilla.