Bug 1009617 - pulp-admin repo history publish --limit option does not work
pulp-admin repo history publish --limit option does not work
Status: CLOSED CURRENTRELEASE
Product: Pulp
Classification: Community
Component: user-experience (Show other bugs)
Master
Unspecified Unspecified
unspecified Severity unspecified
: ---
: 2.3.0
Assigned To: Sayli Karmarkar
Preethi Thomas
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-18 13:30 EDT by Jeremy Cline
Modified: 2015-03-22 21:12 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-12-09 09:30:38 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jeremy Cline 2013-09-18 13:30:37 EDT
Description of problem: The limit option does not work for publish history


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


How reproducible: always


Steps to Reproduce:
1. Sync or publish a repository several times
2. Look at the history with 'pulp-admin repo history publish --repo-id=zoo --distributor-id=yum_distributor --limit=1' or something similar

Actual results: It always defaults to a limit of 5 history entries


Expected results: The output should be limited to the number of entries specified in --limit


Additional info:
Comment 1 Jeremy Cline 2013-09-19 06:34:45 EDT
https://github.com/pulp/pulp/pull/623
Comment 2 Sayli Karmarkar 2013-09-19 15:21:27 EDT
Assigning to myself to review and test Jeremy's PR.
Comment 3 Sayli Karmarkar 2013-09-19 15:32:52 EDT
Tested and merged on Jeremy's behalf.


$ pulp-admin repo history publish --repo-id test-repo --distributor-id yum_distributor --limit 1
+----------------------------------------------------------------------+
                     Publish History [ test-repo ]
+----------------------------------------------------------------------+

Repo Id:        test-repo
Distributor Id: yum_distributor
Result:         success
Started:        2013-09-19T12:27:59-07:00
Completed:      2013-09-19T12:28:02-07:00

$ pulp-admin repo history publish --repo-id test-repo --distributor-id yum_distributor --limit 3
+----------------------------------------------------------------------+
                     Publish History [ test-repo ]
+----------------------------------------------------------------------+

Repo Id:        test-repo
Distributor Id: yum_distributor
Result:         success
Started:        2013-09-19T12:27:59-07:00
Completed:      2013-09-19T12:28:02-07:00

Repo Id:        test-repo
Distributor Id: yum_distributor
Result:         success
Started:        2013-09-19T12:27:51-07:00
Completed:      2013-09-19T12:27:55-07:00

Repo Id:        test-repo
Distributor Id: yum_distributor
Result:         success
Started:        2013-09-19T12:27:30-07:00
Completed:      2013-09-19T12:27:34-07:00
Comment 4 Jeff Ortel 2013-09-26 11:36:42 EDT
build: 2.3.0-0.15.alpha
Comment 5 Preethi Thomas 2013-09-27 14:05:24 EDT
fails-qa
[root@pulp-v2-server ~]# rpm -qa pulp-server
pulp-server-2.3.0-0.16.alpha.el6.noarch
[root@pulp-v2-server ~]# 

--limit seems to be working, but if you do not specify --limit, the output history entries seems to be limiting to 5

[root@pulp-v2-server ~]# pulp-admin repo history  publish --repo-id errata-install --distributor-id yum_distributor 
+----------------------------------------------------------------------+
                   Publish History [ errata-install ]
+----------------------------------------------------------------------+

Repo Id:        errata-install
Distributor Id: yum_distributor
Result:         success
Started:        2013-09-27T13:56:36-04:00
Completed:      2013-09-27T13:56:37-04:00

Repo Id:        errata-install
Distributor Id: yum_distributor
Result:         success
Started:        2013-09-27T13:55:22-04:00
Completed:      2013-09-27T13:55:23-04:00

Repo Id:        errata-install
Distributor Id: yum_distributor
Result:         success
Started:        2013-09-27T13:54:46-04:00
Completed:      2013-09-27T13:54:47-04:00

Repo Id:        errata-install
Distributor Id: yum_distributor
Result:         success
Started:        2013-09-27T13:53:38-04:00
Completed:      2013-09-27T13:53:39-04:00

Repo Id:        errata-install
Distributor Id: yum_distributor
Result:         success
Started:        2013-09-27T13:46:25-04:00
Completed:      2013-09-27T13:46:26-04:00




[root@pulp-v2-server ~]# pulp-admin repo history  publish --repo-id errata-install --distributor-id yum_distributor --limit 7
+----------------------------------------------------------------------+
                   Publish History [ errata-install ]
+----------------------------------------------------------------------+

Repo Id:        errata-install
Distributor Id: yum_distributor
Result:         success
Started:        2013-09-27T13:56:36-04:00
Completed:      2013-09-27T13:56:37-04:00

Repo Id:        errata-install
Distributor Id: yum_distributor
Result:         success
Started:        2013-09-27T13:55:22-04:00
Completed:      2013-09-27T13:55:23-04:00

Repo Id:        errata-install
Distributor Id: yum_distributor
Result:         success
Started:        2013-09-27T13:54:46-04:00
Completed:      2013-09-27T13:54:47-04:00

Repo Id:        errata-install
Distributor Id: yum_distributor
Result:         success
Started:        2013-09-27T13:53:38-04:00
Completed:      2013-09-27T13:53:39-04:00

Repo Id:        errata-install
Distributor Id: yum_distributor
Result:         success
Started:        2013-09-27T13:46:25-04:00
Completed:      2013-09-27T13:46:26-04:00

Repo Id:        errata-install
Distributor Id: yum_distributor
Result:         success
Started:        2013-09-27T13:46:10-04:00
Completed:      2013-09-27T13:46:11-04:00

Repo Id:        errata-install
Distributor Id: yum_distributor
Result:         success
Started:        2013-09-27T13:45:28-04:00
Completed:      2013-09-27T13:45:29-04:00


[root@pulp-v2-server ~]#
Comment 6 Michael Hrivnak 2013-09-27 14:14:04 EDT
This now just needs the default limit of 5 to be documented in the help text. We should also verify that it's documented in the REST API docs.
Comment 7 Jeremy Cline 2013-10-06 14:37:33 EDT
https://github.com/pulp/pulp/pull/653
Comment 8 Jeff Ortel 2013-10-11 11:26:03 EDT
build: 2.3.0-0.18.beta
Comment 9 Preethi Thomas 2013-10-17 09:19:21 EDT
verified

[root@pulp-v2-server ~]#  pulp-admin repo history  publish
Command: publish
Description: displays the history of publish operations on a repository

Available Arguments:

  --repo-id        - (required) unique identifier; only alphanumeric, ., -, and
                     _ allowed
  --distributor-id - (required) the distributor id to display history entries
                     for
  --limit          - limits displayed history entries to the given amount (must
                     be greater than zero); the default is 5
Comment 10 Preethi Thomas 2013-12-09 09:30:38 EST
Pulp 2.3 released.

Note You need to log in before you can comment on or make changes to this bug.