Bug 1009617 - pulp-admin repo history publish --limit option does not work
Summary: pulp-admin repo history publish --limit option does not work
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: user-experience
Version: Master
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 2.3.0
Assignee: Sayli Karmarkar
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-18 17:30 UTC by Jeremy Cline
Modified: 2015-03-23 01:12 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-12-09 14:30:38 UTC
Embargoed:


Attachments (Terms of Use)

Description Jeremy Cline 2013-09-18 17:30:37 UTC
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 10:34:45 UTC
https://github.com/pulp/pulp/pull/623

Comment 2 Sayli Karmarkar 2013-09-19 19:21:27 UTC
Assigning to myself to review and test Jeremy's PR.

Comment 3 Sayli Karmarkar 2013-09-19 19:32:52 UTC
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 15:36:42 UTC
build: 2.3.0-0.15.alpha

Comment 5 Preethi Thomas 2013-09-27 18:05:24 UTC
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 18:14:04 UTC
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 18:37:33 UTC
https://github.com/pulp/pulp/pull/653

Comment 8 Jeff Ortel 2013-10-11 15:26:03 UTC
build: 2.3.0-0.18.beta

Comment 9 Preethi Thomas 2013-10-17 13:19:21 UTC
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 14:30:38 UTC
Pulp 2.3 released.


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