Skip to content

Conversation

@mensfeld
Copy link
Collaborator

@mensfeld mensfeld commented Dec 27, 2025

Summary

  • Remove Shoryuken::Errors::Shutdown class which has been unused since the Celluloid removal in 2016
  • Update CHANGELOG to document the removal

Background

The Shutdown class was originally introduced in 2015 as part of the "modern hard shutdown sequence from Sidekiq" (commit 4fa082d). It was used to raise on worker threads during hard shutdown in the Celluloid-based architecture:

t.raise Shutdown  # raise on worker thread

This mechanism was removed when Shoryuken migrated from Celluloid to Concurrent::FixedThreadPool in 2016 (commit b8f0830). The current shutdown flow uses plain Interrupt and executor-level shutdown methods instead.

Why remove it?

  1. Unused: Not raised or rescued anywhere in the codebase
  2. Not documented: Not mentioned in the wiki (Signals, Lifecycle Events, Deployment, Worker options pages)
  3. Doesn't fit the Errors module: Inherits from Interrupt, not BaseError like all other error classes. Its purpose was control flow signaling, not error handling.

Test plan

  • Verify no code references Shutdown class
  • Verify wiki doesn't document it
  • CI passes

Summary by CodeRabbit

  • Revert
    • Removed Shoryuken::Shutdown class from the public API. Graceful shutdown now uses Interrupt and executor-level mechanisms instead.

✏️ Tip: You can customize this high-level summary in your review settings.

The Shutdown class has been unused since the Celluloid removal in 2016.
It was originally used to raise on worker threads during hard shutdown,
but the current shutdown flow uses Interrupt and executor-level shutdown.

Additionally, Shutdown inherited from Interrupt (not BaseError), making
it fundamentally different from the other error classes in the Errors
module. Its role was as a control flow signal, not an actual error.
@coderabbitai
Copy link

coderabbitai bot commented Dec 27, 2025

📝 Walkthrough

Walkthrough

The PR removes the public Shoryuken::Shutdown error class from the public API surface. This class was previously defined as an interrupt exception but is no longer needed following the migration away from Celluloid. The changelog documents the removal and explains that shutdown now relies on Interrupt and executor-level shutdown mechanisms instead.

Changes

Cohort / File(s) Summary
Shutdown Error Removal
lib/shoryuken/errors.rb
Removed the public constant Shutdown = Class.new(Interrupt) from the Shoryuken::Errors module, eliminating an unused error class from the public API.
Documentation Updates
CHANGELOG.md
Documented the removal of Shoryuken::Shutdown class with rationale (unused since Celluloid removal); expanded FIFO delay-related fix notes with AWS error context and wait: 0 guidance.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

Poem

🐰 ✨ A Shutdown class used to dwell,

With Celluloid's farewell, no more to tell,

Now Interrupt takes the reins with grace,

Executor cleans up the space! 🎯

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Remove unused Shutdown class' directly and clearly summarizes the primary change in the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch remove-unused-shutdown-class

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fd99df8 and abdac0e.

📒 Files selected for processing (2)
  • CHANGELOG.md
  • lib/shoryuken/errors.rb
💤 Files with no reviewable changes (1)
  • lib/shoryuken/errors.rb
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
  • GitHub Check: Integrations (4.0)
  • GitHub Check: Integrations (3.4)
  • GitHub Check: Integrations (3.2)
  • GitHub Check: Integrations (3.3)
  • GitHub Check: Integrations (3.2)
  • GitHub Check: Integrations (3.4)
  • GitHub Check: Integrations (3.3)
  • GitHub Check: Integrations (4.0)
🔇 Additional comments (1)
CHANGELOG.md (1)

13-16: Clear and well-documented removal notice.

The changelog entry properly documents the removal with historical context, original purpose, and what replaces it. This gives users clear migration guidance for the breaking change. The placement within the 7.0.0 section and formatting are consistent with other entries.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@mensfeld mensfeld merged commit 6573dbb into main Dec 27, 2025
21 checks passed
@mensfeld mensfeld deleted the remove-unused-shutdown-class branch December 27, 2025 14:18
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.

2 participants