Skip to content

Fixes #38814 - Remove SCA-irrelevant Candlepin event handling#11523

Merged
jeremylenz merged 2 commits intoKatello:masterfrom
jeremylenz:remove-sca-irrelevant-events
Oct 14, 2025
Merged

Fixes #38814 - Remove SCA-irrelevant Candlepin event handling#11523
jeremylenz merged 2 commits intoKatello:masterfrom
jeremylenz:remove-sca-irrelevant-events

Conversation

@jeremylenz
Copy link
Member

@jeremylenz jeremylenz commented Oct 8, 2025

theforeman/puppet-candlepin#273
theforeman/puppet-candlepin#274
theforeman/foremanctl#247

^ these should be merged first they're merged now

What are the changes introduced in this pull request?

🤖 Generated with Claude Code

Co-Authored-By: Claude noreply@anthropic.com

Remove handling of the following Candlepin events as they are
irrelevant in SCA orgs:

  • entitlement.created and entitlement.deleted - related to
    attaching subscriptions to hosts
  • compliance.created - used to update host subscription status
  • system_purpose_compliance.created - used to update host system
    purpose status

Also removed orphaned methods that were no longer called:

  • EventHandler: subscription_facet and reindex_consumer
  • MessageHandler: create_pool_on_host, remove_pool_from_host,
    and subscription_facet_host_ids

Considerations taken when implementing this change?

Installer changes should be in place first.

What are the testing steps for this pull request?

Make sure the following continue to work as expected:
Manifest refresh / import
Host content access

Summary by Sourcery

Remove support for SCA-irrelevant Candlepin events and clean up associated code, tests, and fixtures.

Enhancements:

  • Drop handling branches for entitlement.created, entitlement.deleted, compliance.created, and system_purpose_compliance.created events in the event handler
  • Remove orphaned methods related to dropped event handling from event and message handler classes

Tests:

  • Delete test cases for entitlement.created, entitlement.deleted, and compliance.created events
  • Remove obsolete fixture files for dropped events

Summary by Sourcery

Remove support for Candlepin events that are irrelevant to SCA orgs and clean up associated code and tests

Enhancements:

  • Drop handling of entitlement.created, entitlement.deleted, compliance.created, and system_purpose_compliance.created events in the event and message handlers

Tests:

  • Delete test cases and fixture files for the removed Candlepin events

Chores:

  • Remove orphaned methods for pool-on-host management and event reindexing

Remove handling of the following Candlepin events as they are
irrelevant in SCA-only mode:
- entitlement.created and entitlement.deleted - related to
  attaching subscriptions to hosts
- compliance.created - used to update host subscription status
- system_purpose_compliance.created - used to update host system
  purpose status

Also removed orphaned methods that were no longer called:
- EventHandler: subscription_facet and reindex_consumer
- MessageHandler: create_pool_on_host, remove_pool_from_host,
  and subscription_facet_host_ids

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey there - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Also remove handling of the owner_content_access_mode.modified event
as it is no longer needed. Users cannot toggle between SCA and
entitlement modes anymore, making this event irrelevant.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@jeremylenz
Copy link
Member Author

Removed handling of the owner_content_access_mode.modified events. Also updated theforeman/foremanctl#247 and opened a new PR theforeman/puppet-candlepin#274 since the puppet-candlepin one was already merged

@jeremylenz
Copy link
Member Author

All installer changes are now merged.

@lfu
Copy link
Member

lfu commented Oct 14, 2025

All import manifest, refresh manifest, install errata and install a package worked well.

@jeremylenz jeremylenz merged commit c8b6089 into Katello:master Oct 14, 2025
26 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants