Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1598555 - [RFE] foreman-tasks: bulk_search does not support paging results
Summary: [RFE] foreman-tasks: bulk_search does not support paging results
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Tasks Plugin
Version: 6.4
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Peter Ondrejka
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-07-05 19:26 UTC by Brad Buckingham
Modified: 2019-11-04 14:03 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-11-04 14:03:29 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Brad Buckingham 2018-07-05 19:26:33 UTC
Description of problem:

The foreman_tasks bulk_search API does not support paging the results. 

Below is an example where usage of the API can result in a lot of result displayed to the user.

Note: the behavior described here was initially raised by bug 1500090; however, that bug raised 2 items and only 1 was addressed.  This is to track the second issue (paging)

Version-Release number of selected component (if applicable):
tfm-rubygem-foreman-tasks-0.13.2-1.el7sat.noarch
tfm-rubygem-foreman-tasks-core-0.2.5-1.el7sat.noarch
tfm-rubygem-katello-3.7.0.rc1.2-0.1.rc1.2.el7sat.noarch

How reproducible:
always

Steps to Reproduce:
1. go to Content -> Products
2. click Repo Discovery
3. select Repository Type - 'Container Images'
4. enter Registry to Discover - 'registry.access.redhat.com'
5. click Discover

Actual results:

~800 repositories are discovered and listed

Expected results:

The results can be paged, similar to other areas of the app.

Additional info:

The results displayed appear to be a result of the following API call:

POST foreman_tasks/api/tasks/bulk_search
{searches: [{type: "task", task_id: "78e783a0-1005-4588-a07f-de4bd10db2ce", search_id: "1"}]}

The response returned contains an output element (array) listing the 800 results.

Comment 1 Adam Ruzicka 2018-07-17 11:23:29 UTC
The thing with bulk_search is you can provide several queries to search by and (if I'm reading the code right) each of these can have different per_page and page values. So it most likely does support pagination in a non-standard way.

The problem with repo discovery is that it creates a single task which detects the repos and then the list of repos is loaded from that single task. No matter how hard one would try to paginate the bulk_search it would always behave the same way because there's just one task.

We should probably think about whether we still need the bulk_search endpoint (is it used anywhere? could it be replaced by a call to index?) and maybe file another BZ (or reuse this one) to cover the repo discovery pagination.

Comment 2 Bryan Kearney 2019-11-04 14:03:29 UTC
Thank you for your interest in Satellite 6. We have evaluated this request, and while we recognize that it is a valid request, we do not expect this to be implemented in the product in the foreseeable future. This is due to other priorities for the product, and not a reflection on the request itself. We are therefore closing this out as WONTFIX. If you have any concerns about this, please do not reopen. Instead, feel free to contact Red Hat Technical Support. Thank you.


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