Bug 2228287

Summary: Puppet config group edit page breaks with "undefined method "environment' for #‹ForemanPuppet:ConfigGroup:0x0000555d6a93b90"
Product: Red Hat Satellite Reporter: Gaurav Talreja <gtalreja>
Component: PuppetAssignee: Leos Stejskal <lstejska>
Status: CLOSED ERRATA QA Contact: Gaurav Talreja <gtalreja>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.14.0CC: ekohlvan, lstejska, pcreech
Target Milestone: 6.14.0Keywords: Regression, TestBlocker, Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: foreman_puppet-6.0.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-11-08 14:20:16 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 Gaurav Talreja 2023-08-01 22:19:17 UTC
Description of problem:


Version-Release number of selected component (if applicable):
Satellite 6.14.0 Snap 9.0

How reproducible:
Always

Steps to Reproduce:
1. Enable puppet on Satellite 6.14
2. Create config group with some puppet_classes assigned
3. Click on the config group created from all page.

Actual results:
Oops, we're sorry but something went wrong undefined method "environment' for #‹ForemanPuppet:ConfigGroup:0x0000555d6a93b90

Expected results:
ConfigGroup Edit page should be visible

Additional info:
Same works for 6.13, so adding a `Regression` keyword

Comment 5 Leos Stejskal 2023-08-10 07:19:23 UTC
Fix available here: https://github.com/theforeman/foreman_puppet/pull/366

Can you verify the fix + check that the styling is the same as before?
I did small refactoring, it should behave the same but want to be 100% sure.

Comment 6 Gaurav Talreja 2023-08-10 09:51:10 UTC
@lstejska Thanks for the quick fix, I've tested the patch above, and it fixes the issue. Also Ack'd the PR.

Comment 7 Gaurav Talreja 2023-08-21 12:37:04 UTC
Verified.

Tested on Satellite 6.14.0 Snap 12.0 with rubygem-foreman_puppet-6.0.1-1.el8sat.noarch and used above steps from comment 0 to validate this fix.

Comment 10 errata-xmlrpc 2023-11-08 14:20:16 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 (Important: Satellite 6.14 security and bug fix update), 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-2023:6818