Project

General

Profile

Bug #14530

hammer queries defaults to 1000 items per page

Added by Martin Bacovsky almost 5 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Category:
-
Target version:
-
Team Backlog:
Fixed in Releases:
Found in Releases:
In Kanboard:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1247781
Description of problem:
hammer queries default to 1000 items per page which makes hammer very slow

Version-Release number of selected component (if applicable):
Sat 6.1 GA Snap 14

How reproducible:
Always

Steps to Reproduce:
  1. cat /etc/hammer/cli_config.yml
    :ui:
    :interactive: true
    :per_page: 20
    :history_file: '~/.foreman/history'
  1. enable/disable color output of logger in Clamp commands
    :watch_plain: false

:log_dir: '~/.foreman/log'
:log_level: 'error'
:log_api_calls: false
#:log_owner: 'foreman'
#:log_group: 'foreman'
#:log_size: 5 #MB

  1. hammer u admin -p changeme repository list --organization-id=3
    ---|-------------------------------------------------------|---------------------------------|--------------|-------------------------------------------------------------------

    ID | NAME | PRODUCT | CONTENT TYPE | URL
    ---|-------------------------------------------------------|---------------------------------|--------------|--------------------------------------------------------------------
    27 | Red Hat Enterprise Linux 5 Server RPMs x86_64 5Server | Red Hat Enterprise Linux Server | yum | https://cdn.redhat.com/content/dist/rhel/server/5/5Server/x86_64/os
    1 | Red Hat Enterprise Linux 7 Server RPMs x86_64 7Server | Red Hat Enterprise Linux Server | yum | https://cdn.redhat.com/content/dist/rhel/server/7/7Server/x86_64/os
    ---|-------------------------------------------------------|---------------------------------|--------------|--------------------------------------------------------------------
  1. time hammer u admin -p changeme erratum list
    ....
    ....
    -------------------------------------|----------------|-------------|--------------------------------------------------------------------------------

real 7m58.835s
user 7m32.086s
sys 0m0.266s

Actual results:
See above that the erratum list command took almost 8 minutes to finish

Expected results:
Pagination should work

Additional info:


Related issues

Related to Hammer CLI - Bug #15257: Default per_page configuration enables pagination, including in CSV modeClosed2016-06-01
Related to Katello - Bug #15542: SAT6.1 Pagination control not supported for listing content hosts in host collection with Satellite 6 command-lineRejected2016-06-29

Associated revisions

Revision f8fe3f3b (diff)
Added by Martin Bacovsky almost 5 years ago

Refs #14530 - Add pagination info when incomplete data are received (#200)

Revision a7f86beb (diff)
Added by Martin Bacovsky over 4 years ago

Fixes #14530 - respect per_page set in config file

History

#1 Updated by The Foreman Bot almost 5 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/hammer-cli/pull/200 added

#2 Updated by The Foreman Bot almost 5 years ago

  • Pull request https://github.com/theforeman/hammer-cli-foreman/pull/228 added

#3 Updated by Martin Bacovsky over 4 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#4 Updated by Dominic Cleal over 4 years ago

  • Related to Bug #15257: Default per_page configuration enables pagination, including in CSV mode added

#5 Updated by Andrew Kofink over 4 years ago

  • Related to Bug #15542: SAT6.1 Pagination control not supported for listing content hosts in host collection with Satellite 6 command-line added

Also available in: Atom PDF