Skip to content

Update dependency shoryuken to v7#11444

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/shoryuken-7.x-lockfile
Open

Update dependency shoryuken to v7#11444
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/shoryuken-7.x-lockfile

Conversation

@renovate

@renovate renovate Bot commented May 8, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
shoryuken (source) 6.2.17.0.3 age confidence

Release Notes

phstc/shoryuken (shoryuken)

v7.0.3

Compare Source

  • Feature: Shoryuken.active_job_fifo_message_deduplication to opt out of FIFO dedup id generation (mensfeld)

    • For FIFO queues the ActiveJob adapter derives a content-based message_deduplication_id from the
      serialized job minus job_id/enqueued_at (#​457 / #​750), so two distinct enqueues of the same job
      class and arguments within SQS's 5-minute window silently collapse into one - a "skipped message" trap
    • Set Shoryuken.active_job_fifo_message_deduplication = false to stop generating that id, so identical
      jobs are no longer silently dropped (rely on the queue's content-based deduplication or explicit ids)
    • Defaults to true, preserving the existing behavior; an explicit message_deduplication_id is still honored
  • Fix: Polling strategies are now thread-safe, and WeightedRoundRobin unpauses processed queues reliably (mensfeld)

    • message_processed runs on processor-completion threads (for FIFO queues) while next_queue/messages_found
      run on the dispatch thread; they mutate the same state with no synchronization, which is benign on MRI (GVL)
      but corrupts state on JRuby/TruffleRuby. Both WeightedRoundRobin and StrictPriority now serialize access
      with a mutex
    • WeightedRoundRobin#unpause_queues only checked the head of the paused list, so a queue marked ready by
      message_processed could stay stuck behind an earlier-paused queue; it now unpauses the first expired entry
      anywhere in the list
  • Fix: TimerTask#kill no longer deadlocks on Ruby 3.2 under concurrent callers (mensfeld)

    • kill called @thread.kill while holding @mutex; the timer loop's ensure block calls
      @mutex.synchronize to clear @running, so on Ruby 3.2 (where Thread#kill yields the GVL
      to the killed thread for cleanup before returning) both threads waited on each other forever
    • The thread is now killed after the mutex is released, so the ensure block can always acquire it
  • Fix: Stopping the launcher no longer destroys the process-global IO executor (mensfeld)

    • With no launcher_executor configured, Launcher#executor fell back to Concurrent.global_io_executor,
      and Launcher#stop/#stop! call shutdown (and kill) on it
    • Shutting down that process-wide pool broke anything else relying on concurrent-ruby's :io pool
      (including Shoryuken's own ShoryukenConcurrentSendAdapter) and prevented starting a fresh launcher
      in the same process
    • The launcher now owns a dedicated Concurrent::CachedThreadPool, so stopping it leaves the global
      IO executor untouched
  • Fix: Queue#delete_messages now logs every batch-delete failure and returns a robust boolean (mensfeld)

    • It used failed.any? { |f| logger.error ... }, which short-circuited after the first failure - so when
      a batch had multiple failures only the first was logged - and only returned truthy because Logger#error
      happens to return true (a custom logger returning falsey would have hidden the failure from callers)
    • It now logs each failure and returns failed.any?, so NonRetryableException/AutoDelete reliably see
      that some messages may remain and need reprocessing
  • Fix: Lifecycle events fired in reverse no longer alternate handler order (mensfeld)

    • Util#fire_event reversed the stored handler array in place with reverse!, so an event fired more
      than once with reverse: true (e.g. :shutdown via stop then stop!) flipped order each time
    • It now reverses a copy, leaving the stored handler order untouched
  • Fix: A fatal dispatch error no longer hard-kills an embedded host process (mensfeld)

    • Manager#handle_dispatch_error sent Process.kill('USR1', Process.pid) unconditionally after a
      dispatch error (e.g. SQS still failing once the fetcher exhausted its retries)
    • The CLI Runner traps USR1 and turns it into a graceful shutdown, but a host embedding
      Shoryuken::Launcher directly has USR1's default disposition, so the whole process - and its
      in-flight workers - was terminated
    • When embedded (no CLI Runner), the failing manager now just stops itself and Launcher#healthy?
      reports the failure; the USR1 signal is only sent in server (CLI) mode, preserving the
      supervisor-restart behavior there
  • Fix: Graceful stop is now bounded by the configured timeout (mensfeld)

    • Launcher#stop (the soft shutdown behind USR1/TSTP) called executor.wait_for_termination with no
      argument - an unbounded wait - so a single hung worker blocked shutdown forever
    • Both Launcher#stop and Launcher#stop! now share a shutdown_executor helper that waits up to
      Shoryuken.options[:timeout] seconds for in-flight workers, then force-kills the executor so the
      process can exit; the graceful stop still waits for workers, just no longer indefinitely
  • Docs: Correct the retry_intervals exponential backoff documentation (mensfeld)

    • The exponential_backoff? docstring claimed retries stop ("before giving up") after the last configured
      interval. They do not: once the intervals are exhausted, the last interval is reused for every later
      attempt, and SQS's redrive policy (maxReceiveCount) is what ultimately moves a message to a dead-letter queue
    • Added a spec pinning that far-later attempts keep reusing the last interval
  • Fix: CurrentAttributes.persist no longer drops a class when called once per class (mensfeld)

    • The storage key was derived from the per-call index, so registering classes across separate persist
      calls made the third call reuse cattr_0 and silently overwrite the second class - its attributes were
      then never serialized or restored
    • The key now uses the running registry size, so incremental and single-call registration both yield
      distinct, stable keys (single-call persist(A, B, C) keys are unchanged)
  • Fix: Busy-processor accounting no longer breaks when processor completion raises (mensfeld)

    • Manager#assign chained .then { processor_done }.rescue { processor_done }, so an exception inside
      processor_done (SQS lookups or a polling strategy's message_processed callback) ran completion twice
    • The busy counter was decremented twice for one message and drifted negative, inflating ready and
      silently breaking the configured concurrency limit for the life of the process
    • Completion now runs in an ensure around processing (exactly once), and processor_done logs
      instead of leaking exceptions from the FIFO bookkeeping
  • Fix: Repeated graceful stop no longer deadlocks the process (mensfeld)

    • Manager#await_dispatching_in_progress popped a signal queue that received exactly one token,
      so a second Launcher#stop blocked forever on an empty queue
    • Operationally this was the TSTP -> USR1 sequence: both signals trigger a graceful stop, leaving
      the process stuck in the signal loop where even TERM/INT were no longer handled (only SIGKILL worked)
    • The dispatch loop now closes the signal queue instead of pushing a token, releasing every pending
      and future waiter; the dispatch chain also releases waiters if the executor rejects a post during
      a racing hard shutdown
  • Fix: non_retryable_exceptions is no longer ignored when retry_intervals is also configured (mensfeld)

    • ExponentialBackoffRetry swallowed every exception after scheduling a retry, so NonRetryableException
      (which sits outside it in the default middleware chain) never saw non-retryable errors - poison messages
      were retried indefinitely (with the last interval repeated) instead of being deleted immediately
    • ExponentialBackoffRetry now re-raises exceptions classified as non-retryable so the message gets deleted
    • Exception classification is extracted to NonRetryableException.non_retryable? and shared by both middlewares
  • Enhancement: Use dynamic Ruby warning category opt-in in test helpers (mensfeld)

    • Replace version-gated Warning[:performance] with Warning.categories-based auto-enablement
    • Automatically enables all non-deprecated, non-experimental warning categories for forward compatibility
    • Applied to both spec/spec_helper.rb and spec/integrations_helper.rb

v7.0.2

Compare Source

  • Enhancement: Replace LocalStack with ElasticMQ for SQS integration tests (mensfeld)

    • ElasticMQ is free, open-source, and requires no auth token (LocalStack 2026.x requires paid account)
    • Uses softwaremill/elasticmq-native image (~30MB vs ~1GB+, starts in milliseconds)
    • Rename setup_localstack to setup_sqs and bin/clean_localstack to bin/clean_sqs
  • Fix: Allow custom polling strategy to be configured per-group via add_group (mensfeld)

    • add_group now accepts polling_strategy: keyword argument
    • polling_strategy() reads from the groups hash populated by add_group, with fallback to raw options
    • EnvironmentLoader passes polling_strategy through when parsing YAML group config
    • #​925

v7.0.1

Compare Source

  • Enhancement: Add non-retryable exception middleware (Saidbek)

  • Fix: ActiveJob keyword arguments support (mensfeld)

    • Jobs with keyword arguments were broken due to improper argument forwarding in SQSSendMessageParametersSupport#initialize
    • Use Ruby's argument forwarding (...) to properly pass all arguments including keyword arguments
    • #​962
  • Fix: Replace ArgumentError with custom FifoDelayNotSupportedError for FIFO delay errors

    • Provides more specific error type for programmatic error handling
    • #​957

v7.0.0

Compare Source

See the Upgrading to 7.0 guide for detailed migration instructions.

  • Breaking: Add Shoryuken::Errors module with domain-specific error classes

    • Introduces Shoryuken::Errors::BaseError as base class for all Shoryuken errors
    • Shoryuken::Errors::QueueNotFoundError for non-existent or inaccessible SQS queues
    • Shoryuken::Errors::InvalidConfigurationError for configuration validation failures
    • Shoryuken::Errors::InvalidWorkerRegistrationError for worker registration conflicts
    • Shoryuken::Errors::InvalidPollingStrategyError for invalid polling strategy configuration
    • Shoryuken::Errors::InvalidEventError for invalid lifecycle event names
    • Shoryuken::Errors::InvalidDelayError for delays exceeding SQS 15-minute maximum
    • Shoryuken::Errors::InvalidArnError for invalid ARN format
    • Replaces generic Ruby exceptions (ArgumentError, RuntimeError) with specific error types
  • Removed: Shoryuken::Shutdown class

    • This class was unused since the Celluloid removal in 2016
    • Originally used to raise on worker threads during hard shutdown
    • Current shutdown flow uses Interrupt and executor-level shutdown instead
  • Fix: Raise ArgumentError when using delay with FIFO queues

    • FIFO queues do not support per-message DelaySeconds
    • Previously caused confusing AWS errors with ActiveJob's retry_on (Rails 6.1+ defaults to wait: 3.seconds)
    • Now raises clear ArgumentError with guidance to use wait: 0
    • Fixes #​924
  • Enhancement: Use fiber-local storage for logging context

    • Replaces thread-local storage with Fiber[] for proper isolation in async environments
    • Ensures logging context doesn't leak between fibers in the same thread
    • Leverages Ruby 3.2+ fiber-local storage API
  • Enhancement: Add yard-lint with comprehensive YARD documentation

    • Adds yard-lint gem for documentation linting
    • Documents all public classes, modules, and methods with YARD tags
    • Ensures 100% documentation coverage
  • Enhancement: Add enqueue_all for bulk ActiveJob enqueuing (Rails 7.1+)

    • Implements efficient bulk enqueuing using SQS send_message_batch API
    • Called by ActiveJob.perform_all_later for batching multiple jobs
    • Batches jobs in groups of 10 (SQS limit) per queue
    • Groups jobs by queue name for efficient multi-queue handling
  • Enhancement: Add ActiveJob Continuations support (Rails 8.1+)

    • Implements stopping? method in ActiveJob adapters to signal graceful shutdown
    • Enables jobs to checkpoint progress and resume after interruption
    • Handles past timestamps correctly (SQS treats negative delays as immediate delivery)
    • Tracks shutdown state in Launcher via stopping? flag
    • Leverages existing Shoryuken shutdown lifecycle (stop/stop! methods)
    • See Rails PR #​55127 for more details on ActiveJob Continuations
  • Enhancement: Add CurrentAttributes persistence support

    • Enables Rails ActiveSupport::CurrentAttributes to flow from enqueue to job execution
    • Automatically serializes current attributes into job payload when enqueuing
    • Restores attributes before job execution and resets them afterward
    • Supports multiple CurrentAttributes classes
    • Based on Sidekiq's approach using ActiveJob::Arguments for serialization
    • Usage: require 'shoryuken/active_job/current_attributes' and
      Shoryuken::ActiveJob::CurrentAttributes.persist('MyApp::Current')
  • Breaking: Drop support for Ruby 3.1 (EOL March 2025)

    • Minimum required Ruby version is now 3.2.0
    • Supported Ruby versions: 3.2, 3.3, 3.4
    • Users on Ruby 3.1 should upgrade or remain on Shoryuken 6.x
  • Breaking: Remove support for Rails versions older than 7.2

    • Rails 7.0 and 7.1 have reached end-of-life (April 2025) and are no longer supported
    • Supported Rails versions: 7.2, 8.0, and 8.1
    • Users on older Rails versions should upgrade or remain on Shoryuken 6.x
  • Enhancement: Replace Concurrent::AtomicFixnum with pure Ruby AtomicCounter

    • Removes external dependency on concurrent-ruby for atomic fixnum operations
    • Introduces Shoryuken::Helpers::AtomicCounter as a thread-safe alternative using Mutex
    • Reduces gem footprint while maintaining full functionality
  • Enhancement: Replace Concurrent::AtomicBoolean with pure Ruby AtomicBoolean

    • Removes external dependency on concurrent-ruby for atomic boolean operations
    • Introduces Shoryuken::Helpers::AtomicBoolean extending AtomicCounter
    • Further reduces gem footprint while maintaining full functionality
  • Enhancement: Replace Concurrent::Hash with pure Ruby AtomicHash

    • Removes external dependency on concurrent-ruby for hash operations
    • Introduces Shoryuken::Helpers::AtomicHash with mutex-protected writes and concurrent reads
    • Ensures JRuby compatibility while maintaining high performance for read-heavy workloads
    • #​866
    • #​867
    • #​868
  • Enhancement: Replace core class extensions with helper utilities

    • Removes all core Ruby class monkey-patching (Hash and String extensions)
    • Introduces Shoryuken::Helpers::HashUtils.deep_symbolize_keys for configuration processing
    • Introduces Shoryuken::Helpers::StringUtils.constantize for dynamic class loading
    • Eliminates unnecessary ActiveSupport dependencies
    • Completely removes lib/shoryuken/core_ext.rb file
    • Maintains all existing functionality while following Ruby best practices
    • Improves code maintainability and reduces global namespace pollution
  • Enhancement: Implement Zeitwerk autoloading

    • Replaces manual require statements with Zeitwerk-based autoloading
    • Adds zeitwerk dependency for modern Ruby module loading
    • Splits polling classes into properly named files (BaseStrategy, QueueConfiguration)
    • Reduces startup overhead and improves code organization
    • Maintains backward compatibility while modernizing the codebase
  • Enhancement: Increase SendMessageBatch to 1MB to align with AWS

  • Enhancement: Replace OpenStruct usage with Struct for inline execution

  • Enhancement: Configure server side logging (BenMorganMY)

  • Enhancement: Use -1 as thread priority

  • Enhancement: Add Support for message_attributes to InlineExecutor

  • Enhancement: Introduce trusted publishing

  • Enhancement: Add enqueue_after_transaction_commit? for Rails 7.2 compatibility

  • Enhancement: Bring Ruby 3.4 into the CI

  • Fix integration tests by updating aws-sdk-sqs and replacing moto with LocalStack

  • Breaking: Remove support of Ruby versions older than 3.1

  • Breaking: Remove support of Rails versions older than 7.0

  • Breaking: Require aws-sdk-sqs >= 1.66:


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate Bot added the dependencies label May 8, 2026
@renovate
renovate Bot force-pushed the renovate/shoryuken-7.x-lockfile branch 3 times, most recently from fa558dd to ae4fdd7 Compare May 20, 2026 18:47
@renovate
renovate Bot force-pushed the renovate/shoryuken-7.x-lockfile branch from ae4fdd7 to 428fd71 Compare June 9, 2026 22:23
@renovate
renovate Bot force-pushed the renovate/shoryuken-7.x-lockfile branch from 428fd71 to 9e36fe5 Compare June 17, 2026 06:38
@renovate
renovate Bot force-pushed the renovate/shoryuken-7.x-lockfile branch from 9e36fe5 to 36aec84 Compare July 16, 2026 07:15
@renovate
renovate Bot force-pushed the renovate/shoryuken-7.x-lockfile branch from 36aec84 to 814e638 Compare July 16, 2026 15:12
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.

0 participants