Bug 1647582

Summary: hammer task list --search no longer appears to search ID field
Product: Red Hat Satellite Reporter: Chris Hudson <chhudson>
Component: Tasks PluginAssignee: Adam Ruzicka <aruzicka>
Status: CLOSED ERRATA QA Contact: Roman Plevka <rplevka>
Severity: high Docs Contact:
Priority: high    
Version: 6.4.0CC: aruzicka, chhudson, egolov, inecas, mmccune, rplevka
Target Milestone: 6.5.0Keywords: Regression, Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: tfm-rubygem-scoped_search-4.1.6 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1759534 (view as bug list) Environment:
Last Closed: 2019-05-14 12:38:40 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:
Bug Depends On:    
Bug Blocks: 1759534    
Attachments:
Description Flags
6.4 id error none

Description Chris Hudson 2018-11-07 20:10:24 UTC
Description of problem:

`hammer task list --search <ID>` no longer returns output

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

# rpm -qa | grep tasks
tfm-rubygem-foreman-tasks-0.13.4.2-1.el7sat.noarch
tfm-rubygem-foreman-tasks-core-0.2.5-1.el7sat.noarch
tfm-rubygem-hammer_cli_foreman_tasks-0.0.12-2.el7sat.noarch

How reproducible:

Always

Steps to Reproduce:

1. Find a task ID via `hammer task list --search <string>
2. Try to run a search against that particular tasks ID (`hammer task list --search <ID>`)


Actual results:

# hammer task list --search e23c4b1-6740-4402-b74f-b1b5bff04c35
---|------|-------|------------|----------|-------|--------|-------------|------------
ID | NAME | OWNER | STARTED AT | ENDED AT | STATE | RESULT | TASK ACTION | TASK ERRORS
---|------|-------|------------|----------|-------|--------|-------------|------------

Expected results:

Output above with the task information.

Additional info:

Output from a 6.3.4 environment:

# hammer task list --search 9a77da0b-c7b0-43c9-96b5-aeb9a07e5bf8
-------------------------------------|------|---------------|---------------------|---------------------|---------|---------|-------------|------------
ID                                   | NAME | OWNER         | STARTED AT          | ENDED AT            | STATE   | RESULT  | TASK ACTION | TASK ERRORS
-------------------------------------|------|---------------|---------------------|---------------------|---------|---------|-------------|------------
9a77da0b-c7b0-43c9-96b5-aeb9a07e5bf8 |      | foreman_admin | 2018/07/27 15:13:38 | 2018/07/27 15:13:40 | stopped | success | Create      |            
-------------------------------------|------|---------------|---------------------|---------------------|---------|---------|-------------|------------

Comment 3 Adam Ruzicka 2018-11-08 08:49:12 UTC
The user should still be able to search by task IDs by using something like

> hammer task list --search 'id = $ID'

This will be also faster than running hammer task list --search $ID. Is it really needed to bring back the less-performant way of doing the same thing?

Comment 4 Chris Hudson 2018-11-08 15:25:33 UTC
That works - I managed to typo my uuid copy/paste and let a character off. Thanks!

Now, can we tell why this behavior changed?

On another note, if you go to the webui for a sat 6.3.4 installation and type "id" into the filter field of the tasks page, you get some basic operator options and the query seems sound.

If you type "id" into the filter field on the tasks page of a 6.4 installation, you can observe an error. I will attach a screenshot.

Comment 5 Chris Hudson 2018-11-08 15:26:03 UTC
Created attachment 1503369 [details]
6.4 id error

Comment 6 Adam Ruzicka 2018-11-09 15:10:22 UTC
Created redmine issue https://projects.theforeman.org/issues/25426 from this bug

Comment 9 Satellite Program 2018-11-09 17:02:12 UTC
Upstream bug assigned to aruzicka

Comment 10 Satellite Program 2018-11-09 17:02:14 UTC
Upstream bug assigned to aruzicka

Comment 12 Adam Ruzicka 2018-11-13 15:29:21 UTC
The upstream fix was merged, moving to POST.

Comment 14 Roman Plevka 2018-12-10 14:09:27 UTC
VERIFIED
on satellite-6.5.0-5.beta.el7sat.noarch

# hammer task list --search 64389ac3-4c7d-4c8e-9d46-b9013226ad7e
-------------------------------------|----------------------------------------------------------------------------------|---------|---------|---------------------|---------------------|-------|------------
ID                                   | ACTION                                                                           | STATE   | RESULT  | STARTED AT          | ENDED AT            | OWNER | TASK ERRORS
-------------------------------------|----------------------------------------------------------------------------------|---------|---------|---------------------|---------------------|-------|------------
64389ac3-4c7d-4c8e-9d46-b9013226ad7e | Upload into repository {"text"=>"repository 'repo2'", "link"=>nil} product {"... | stopped | success | 2018/12/10 13:41:57 | 2018/12/10 13:42:00 | admin |            
-------------------------------------|----------------------------------------------------------------------------------|---------|---------|---------------------|---------------------|-------|------------

Comment 17 errata-xmlrpc 2019-05-14 12:38:40 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2019:1222