Bug 2062476

Summary: GPG shows blank on repo details page render, but is correct when selecting the dropdown
Product: Red Hat Satellite Reporter: Chris Roberts <chrobert>
Component: Content CredentialsAssignee: Justin Sherrill <jsherril>
Status: CLOSED ERRATA QA Contact: Stephen Wadeley <swadeley>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.11.0CC: pcreech
Target Milestone: 6.11.0Keywords: Regression, Triaged, UserExperience
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
URL: https://projects.theforeman.org/issues/34429
Whiteboard:
Fixed In Version: tfm-rubygem-katello-4.3.0.15-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-07-05 14:34:21 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:

Description Chris Roberts 2022-03-09 21:06:43 UTC
Description of problem:
After a change of the GPG to Content Credentials model etc, it looks like we broke showing the GPG key on a repo until the user selects the dropdown

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

Katello 4.3.0
Satellite 7.0

Steps to Reproduce:
1. Create a GPG key
2. Add it to a repo
3. Refresh the page or goto the repo and see the GPG key field is blank until you click the drop down

Actual results:
Empty until you click the drop down

Expected results:
GPG key to show the correct key or undefined upon a repo page load

Additional info:

I did some light investigation into the issue and the values are correct with console.log and I can see the info in the rake console, looks like the render/promise is not working right. This is prob related to:

https://github.com/Katello/katello/pull/9496

This is working on 6.10 but broken on 7.0

Comment 1 Bryan Kearney 2022-03-11 20:05:27 UTC
Upstream bug assigned to jsherril

Comment 2 Bryan Kearney 2022-03-11 20:05:29 UTC
Upstream bug assigned to jsherril

Comment 3 Bryan Kearney 2022-03-14 16:06:00 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/34429 has been resolved.

Comment 6 Stephen Wadeley 2022-04-14 15:55:40 UTC
Hi Chris

I cannot see a place to add a GPG key to a repo. I wonder do you mean add it to a Product?

Please confirm and then review your step 3 as well.
Which page should I refresh?
Do you mean go to Product page and check Details tab?

Thank you

Comment 7 Stephen Wadeley 2022-04-14 17:36:50 UTC
(In reply to Stephen Wadeley from comment #6)
> Hi Chris
> 
> I cannot see a place to add a GPG key to a repo. I wonder do you mean add it
> to a Product?

oh, I see now, it has to be yum repo, I was using file-type
> 

> Which page should I refresh?

I had to reproduce this on snap 14

I see now that on a yum repo's page, when you select the GPG key from the menu (MyGPG), you see "Working" and then the GPG setting is blank again.
Even after reloading the yum repo page its still blank.

But if you go back to the GPG page, Repositories tab, and reload that, then you see the "TestRepo" is displayed.

Back on the yum repo page, if you click the blank GPG menu, the you straigh away see "Working" and then "MyGPG" is slected.


so that's the "Steps to Reproduce:" you should have put in comment 0

Comment 8 Stephen Wadeley 2022-04-14 17:51:39 UTC
Hi

testing on 6.11.0-16.0

Fixed in Version says tfm-rubygem-katello-4.3.0.15-1

I have
~]# rpm -q rubygem-katello
rubygem-katello-4.3.0.20-1.el8sat.noarch


Followed steps as per comment 7

Created test product "MyTestProduct", did not set GPG key

Created GPG called Test_GPG

Created yum repo called MyYumRepo, did not set GPG key

Navigated to MyYumRepo, selected Test_GPG from the menu, clicked Save
"Working" is displayed, then 
"GPG Key Test_GPG"
as expected.

VERIFIED

Comment 11 errata-xmlrpc 2022-07-05 14:34:21 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 (Moderate: Satellite 6.11 Release), 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-2022:5498