Remove golden_ticket? method and simplify SCA handling#1158
Remove golden_ticket? method and simplify SCA handling#1158jeremylenz merged 2 commits intotheforeman:developfrom
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThis PR removes the obsolete golden_ticket?-based logic from inventory report generation and hardcodes Simple Content Access to always be enabled, while updating tests and fixtures to match the new SCA-only behavior. Class diagram for updated inventory fact generation helpersclassDiagram
class FactHelpers {
+account_id(organization)
+cloud_provider(host)
}
class Slice {
+report_satellite_facts(host)
}
FactHelpers <.. Slice : uses
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Katello removed the golden_ticket? and content_access_mode methods in 4.12 when migrating all organizations to Simple Content Access (SCA) mode. This change removes the obsolete golden_ticket? helper method and simplifies the is_simple_content_access field to always be true, since all organizations are now in SCA mode. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
9f62062 to
2ba7df9
Compare
chris1984
left a comment
There was a problem hiding this comment.
Looks good to me, don't see any more references to golden_ticket?
I was wondering if it might make sense to add a small assertion in an existing slice generator test to check that is_simple_content_access is true in the rendered output. The old “golden ticket” test was the only one covering that field in generated reports, so this might help keep that covered. I will leave that up to you and not block it.
Tested:
- Generate an inventory report for an organization and verify is_simple_content_access: true appears in the satellite facts
- Upload an inventory report to verify the cloud API accepts it with the field set to true
Adds assertion to verify is_simple_content_access is true in slice generator output, maintaining coverage after golden ticket test removal. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
@chris1984 good idea, added an assertion. 👍 |
chris1984
left a comment
There was a problem hiding this comment.
LGTM, thanks for adding the assertion.
What are the changes introduced in this pull request?
This PR removes the obsolete
golden_ticket?helper method and simplifies Simple Content Access (SCA) handling in inventory reports. The changes include:golden_ticket?method fromFactHelperswhich referenced Katello methods that no longer exist (golden_ticket?andcontent_access_mode)is_simple_content_accessfield to always betruein inventory reports, since all organizations are now in SCA modeConsiderations taken when implementing this change?
is_simple_content_accessfield is still included in inventory reports (for cloud API compatibility), but is now alwaystrueinstead of conditionally checking organization settingsWhat are the testing steps for this pull request?
cd /home/vagrant/foreman && bundle exec rake test:foreman_rh_cloudis_simple_content_access: trueappears in the satellite factstrue🤖 Generated with Claude Code
Summary by Sourcery
Remove legacy Simple Content Access (SCA) handling and always report SCA as enabled in inventory uploads.
Bug Fixes:
Enhancements: