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: ON_QA --- 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: UnusedFlags: gtalreja: needinfo? (ekohlvan)
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: 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.