Skip to content

Refs #38953 - Remove Candlepin Event Listener and supporting code#11652

Merged
jeremylenz merged 1 commit into
Katello:masterfrom
jturel:remove_candlepin_event_listener
Apr 8, 2026
Merged

Refs #38953 - Remove Candlepin Event Listener and supporting code#11652
jeremylenz merged 1 commit into
Katello:masterfrom
jturel:remove_candlepin_event_listener

Conversation

@jturel
Copy link
Copy Markdown
Member

@jturel jturel commented Feb 24, 2026

Depends on #11647 #11645

What are the changes introduced in this pull request?

Now that Katello doesn't consume events from Candlepin, all supporting code and infra can be removed

Considerations taken when implementing this change?

None, really

What are the testing steps for this pull request?

Ensure candlepin_events doesn't show in ping output

Confirm Subscribed to katello.candlepin.candlepin_events doesn't show up in app logs anymore

Summary by Sourcery

Remove Candlepin event listener support and associated messaging infrastructure.

Enhancements:

  • Remove Candlepin event service from ping endpoints and engine configuration, leaving only remaining event services.
  • Delete Candlepin messaging and event listener implementation and their tests, including STOMP-based connection helpers.
  • Clean up configuration, logging, and documentation references related to Candlepin event messaging.
  • Drop the STOMP gem dependency from the gemspec now that message queue handling for Candlepin events is removed.

Documentation:

  • Update internal CLAUDE documentation to no longer reference the STOMP-based Candlepin message queue.

Tests:

  • Remove tests covering Candlepin event pinging and STOMP-based messaging, aligned with the removal of that functionality.

Summary by Sourcery

Remove Candlepin event listener support and related messaging infrastructure now that Candlepin events are no longer consumed.

Enhancements:

  • Remove Candlepin event service from ping services, engine configuration, and logging setup, leaving only the remaining event services.
  • Delete the Candlepin messaging and STOMP connection abstractions used for event handling.
  • Clean up developer architecture documentation to drop references to the Candlepin STOMP-based message queue.
  • Remove the STOMP gem dependency from the gemspec as it is no longer needed.

Tests:

  • Delete tests covering Candlepin event pinging, Candlepin event listener behavior, and STOMP messaging connection helpers.

Summary by CodeRabbit

Release Notes

  • Documentation

    • Removed outdated Message Queue system description from external service integration documentation
  • Chores

    • Removed event listener infrastructure and messaging system used for Candlepin event processing
    • Removed Candlepin event service from capsule health checks and system status reporting
    • Removed related event handler and message processing implementation
    • Removed STOMP library runtime dependency from project

@evgeni
Copy link
Copy Markdown
Member

evgeni commented Mar 2, 2026

Only partially related (but Jeremy said it's best to ask you directly): do you have any plans to completely get rid of the custom Event Daemon in https://github.com/Katello/katello/blob/master/app/lib/katello/event_daemon/runner.rb, or just the Candlepin parts of it?

@jturel
Copy link
Copy Markdown
Member Author

jturel commented Mar 2, 2026

Only partially related (but Jeremy said it's best to ask you directly): do you have any plans to completely get rid of the custom Event Daemon in https://github.com/Katello/katello/blob/master/app/lib/katello/event_daemon/runner.rb, or just the Candlepin parts of it?

Between you and me: yes ;)

It could happen very quickly once this part is finished, too.

@jturel jturel force-pushed the remove_candlepin_event_listener branch from 455ad40 to 88c26e1 Compare April 6, 2026 18:53
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 6, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ca57727d-1a55-4c6e-818e-b26eced52abd

📥 Commits

Reviewing files that changed from the base of the PR and between 2d9ea7f and 88c26e1.

📒 Files selected for processing (17)
  • app/lib/katello/messaging/connection.rb
  • app/lib/katello/messaging/received_message.rb
  • app/lib/katello/messaging/stomp_connection.rb
  • app/models/katello/ping.rb
  • app/services/katello/candlepin/event_handler.rb
  • app/services/katello/candlepin/message_handler.rb
  • app/services/katello/candlepin_event_listener.rb
  • developer_docs/architecture.md
  • katello.gemspec
  • lib/katello/engine.rb
  • lib/katello/plugin.rb
  • test/lib/messaging/connection_test.rb
  • test/lib/messaging/stomp_connection_test.rb
  • test/models/ping_test.rb
  • test/services/candlepin/message_handler_test.rb
  • test/services/katello/candlepin/event_handler_test.rb
  • test/services/katello/candlepin_event_listener_test.rb
💤 Files with no reviewable changes (15)
  • katello.gemspec
  • app/lib/katello/messaging/received_message.rb
  • lib/katello/plugin.rb
  • test/lib/messaging/connection_test.rb
  • app/lib/katello/messaging/connection.rb
  • test/services/katello/candlepin/event_handler_test.rb
  • test/models/ping_test.rb
  • app/services/katello/candlepin/event_handler.rb
  • test/services/katello/candlepin_event_listener_test.rb
  • lib/katello/engine.rb
  • test/services/candlepin/message_handler_test.rb
  • test/lib/messaging/stomp_connection_test.rb
  • app/services/katello/candlepin/message_handler.rb
  • app/lib/katello/messaging/stomp_connection.rb
  • app/services/katello/candlepin_event_listener.rb

📝 Walkthrough

Walkthrough

This pull request removes the entire STOMP-based Candlepin event messaging system from Katello, including the messaging infrastructure layer, event processing services, engine configuration, and all associated tests. The stomp gem dependency is also removed from the gemspec.

Changes

Cohort / File(s) Summary
Messaging Infrastructure
app/lib/katello/messaging/connection.rb, app/lib/katello/messaging/received_message.rb, app/lib/katello/messaging/stomp_connection.rb, katello.gemspec
Removed STOMP client connection abstractions (Connection, ReceivedMessage, StompConnection) and the stomp gem runtime dependency.
Event Processing Services
app/services/katello/candlepin/event_handler.rb, app/services/katello/candlepin/message_handler.rb, app/services/katello/candlepin_event_listener.rb
Removed event handler wrapper, message payload parser, and the main listener service that subscribed to STOMP queues and processed Candlepin events.
Engine & Plugin Configuration
lib/katello/engine.rb, lib/katello/plugin.rb
Removed candlepin events service registration, STOMP client factory setup (including SSL certificate merging), and logger configuration for the candlepin_events daemon.
Health Monitoring
app/models/katello/ping.rb
Removed candlepin_events service from the capsule health check service list and deleted the ping_candlepin_events method.
Documentation
developer_docs/architecture.md
Removed "Message Queue" entry describing the STOMP-based event system from the glossary.
Tests
test/lib/messaging/connection_test.rb, test/lib/messaging/stomp_connection_test.rb, test/models/ping_test.rb, test/services/candlepin/message_handler_test.rb, test/services/katello/candlepin/event_handler_test.rb, test/services/katello/candlepin_event_listener_test.rb
Removed all test coverage for deleted messaging classes, event handlers, and related ping health checks.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • jeremylenz
🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: removing Candlepin Event Listener and its supporting infrastructure across multiple files, services, and tests.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@jturel jturel marked this pull request as ready for review April 6, 2026 18:58
Copy link
Copy Markdown
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 - I've found 1 issue, and left some high level feedback:

  • Now that Katello::Messaging and the STOMP connection have been removed, search the codebase for any remaining references to Katello::Messaging, stomp, or candlepin_events (including settings and initializers) to avoid leaving behind dead configuration or constants.
  • With candlepin_events removed from Katello::EventDaemon::Runner services and ping, verify there are no remaining assumptions about its presence in any generic service lists or status aggregation helpers, and clean up those references if they exist.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Now that `Katello::Messaging` and the STOMP connection have been removed, search the codebase for any remaining references to `Katello::Messaging`, `stomp`, or `candlepin_events` (including settings and initializers) to avoid leaving behind dead configuration or constants.
- With `candlepin_events` removed from `Katello::EventDaemon::Runner` services and ping, verify there are no remaining assumptions about its presence in any generic service lists or status aggregation helpers, and clean up those references if they exist.

## Individual Comments

### Comment 1
<location path="test/models/ping_test.rb" line_range="92-101" />
<code_context>
-    def test_ping_candlepin_events
</code_context>
<issue_to_address>
**suggestion (testing):** Add an automated ping test to assert that `candlepin_events` is no longer exposed as a service

Since the PR description specifies that `candlepin_events` should no longer appear in ping output, this should be enforced by an automated test rather than only manual steps. Please add or update a test (here or in a higher-level ping API spec) that calls `Katello::Ping.services`/`Katello::Ping.ping` and asserts that `:candlepin_events` is not included in the returned services, so the main behavioral change is covered by a regression test.
</issue_to_address>

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.

Comment thread test/models/ping_test.rb
@jturel
Copy link
Copy Markdown
Member Author

jturel commented Apr 6, 2026

@jeremylenz this final piece is ready for review now :)

@jeremylenz
Copy link
Copy Markdown
Member

Thanks @jturel! Ping output and logs look good.

Found a couple stray references:

- :candlepin_event task type in app/lib/katello/util/task_status.rb (lines 106-112) - This was specifically for Candlepin events                                                           
  - when :candlepin_event case in app/models/katello/task_status.rb (line 172) - Handles the above task type     

@jturel
Copy link
Copy Markdown
Member Author

jturel commented Apr 8, 2026

Thanks @jturel! Ping output and logs look good.

Found a couple stray references:

- :candlepin_event task type in app/lib/katello/util/task_status.rb (lines 106-112) - This was specifically for Candlepin events                                                           
  - when :candlepin_event case in app/models/katello/task_status.rb (line 172) - Handles the above task type     

That's actually unrelated (and totally dead) code - that file relates to an old Katello::TaskStatus model which oddly still exists. It should all be removed, but not here :)

If all else looks good, please merge when ready and I can go bother other folks to review my installer and packaging PRs!

@jeremylenz
Copy link
Copy Markdown
Member

Okay, sounds good, but let's make sure there's an issue somewhere to clean up the task status stuff.

@jeremylenz jeremylenz merged commit 3d4ba72 into Katello:master Apr 8, 2026
24 checks passed
@jturel
Copy link
Copy Markdown
Member Author

jturel commented Apr 8, 2026

@jeremylenz meta-question: you've noticed how I split this work up (the events cleanup, not the entitlement mode cleanup to be clear) against a single Redmine that you created. My intention was to break things down to make review easier but I have some observations:

  • Some of the PRs required semi-duplicate testing of the same functions like manifest import/refresh/etc
  • Multiple PRs seemingly slowed down the overall review time

Did this work for you, or would you rather have gotten this all in one big-bang PR? In any case thanks for all the reviews on this!

@jturel jturel deleted the remove_candlepin_event_listener branch April 8, 2026 16:07
@jeremylenz
Copy link
Copy Markdown
Member

I don't really have a strong preference either way, but I do have to admit if this had been a single PR, it probably would have been merged close to the time we merged the first PR. Internally we have been creating Jira cards for review of each, and those each come with their own overhead. But in general if the change only makes sense logically as separate PRs, don't let that stop you from doing separate ones. As far as Redmines, though, it does make things a bit simpler if it's one PR per Redmine.

jeremylenz added a commit to jeremylenz/robottelo that referenced this pull request Apr 8, 2026
Katello is removing the Candlepin event listener infrastructure,
which means candlepin_events will no longer appear in the
/api/v2/ping API response.

Changes:
- Delete test_positive_candlepin_events_processed_by_stomp() which
  validated STOMP event processing (functionality no longer exists)
- Update documentation comment in test_ping.py to reflect new
  response structure without candlepin_events

Related: Katello/katello#11652

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@jturel
Copy link
Copy Markdown
Member Author

jturel commented Apr 8, 2026

Noted. I'll consider this an experiment I likely won't repeat given the process overhead of one Jira ticket per PR, even though they belong to the same issue.

LadislavVasina1 pushed a commit to SatelliteQE/robottelo that referenced this pull request Apr 9, 2026
Katello is removing the Candlepin event listener infrastructure,
which means candlepin_events will no longer appear in the
/api/v2/ping API response.

Changes:
- Delete test_positive_candlepin_events_processed_by_stomp() which
  validated STOMP event processing (functionality no longer exists)
- Update documentation comment in test_ping.py to reflect new
  response structure without candlepin_events

Related: Katello/katello#11652

Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants