Skip to content

Latest commit

 

History

History
861 lines (519 loc) · 29.8 KB

File metadata and controls

861 lines (519 loc) · 29.8 KB

[Unreleased]

  • 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

[7.0.1] - 2026-02-07

  • 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

[7.0.0] - 2026-01-19

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:

[v6.2.1] - 2024-02-09

  • Bugfix: Not able to use extended polling strategy (#759)

[v6.2.0] - 2024-02-04

  • Enable hot-reload via adding ActiveSupport::Reloader delegate (#756)

[v6.1.2] - 2024-01-30

  • Fix activerecord 7.1 deprecation warnings

[v6.1.1] - 2023-11-27

  • Fix SQS API Changes causing nil returns instead of empty arrays

[v6.1.0] - 2023-11-01

  • Add GitHub Codespaces

  • Fix spec for ruby 3.0

  • Upgrade test matrix. Add Ruby 3.1, Ruby 3.2 and Rails 7

  • Fire stopped event after executor is stopped

  • Allow setup custom exception handlers for failing jobs

  • Configure dependabot to update GH Actions

  • Stop the dispatching of new messages when a SIGTERM signal has been received

[v6.0.0] - 2022-02-18

  • Breaking changes: Initialize Rails before parsing config file
    • #686
    • Previously, Shoryuken read its configuration from an optional YAML file, then allowed CLI arguments to override those, then initialized the Rails application (provided that --rails or -R was specified). This behavior meant that the config file did not have access to things like environment variables that were initialized by Rails (such as when using dotenv). With this change, Rails is initialized much earlier in the process. After Rails is initialized, the YAML configuration file is interpreted, and CLI arguments are finally interpreted last. Most applications will not need to undergo changes in order to upgrade, but the new load order could technically result in different behavior depending on the application's YAML configuration file or Rails initializers.

[v5.3.2] - 2022-01-19

  • (Bugfix) Preserve queue weights when unpausing queues

  • Improve error message on startup when shoryuken has insufficient permissions to access a queue

[v5.3.1] - 2022-01-07

  • (Bugfix) Fix issue where, when using the TSTP or USR1 signals for soft shutdowns, it was possible for shoryuken to terminate without first attempting to handle all messages it fetched from SQS

[v5.3.0] - 2021-10-31

  • (Refactor) Use Forwardable within Message to avoid method boilerplate

  • Add basic health check API

[v5.2.3] - 2021-07-29

  • Fire new :utilization_update event any time a worker pool's utilization changes

[v5.2.2] - 2021-06-22

  • When using ActiveJob queue name prefixing, avoid applying prefix to queues configured with a URL or ARN

[v5.2.1] - 2021-04-06

  • Reduce message batch sizes in shoryuken sqs requeue and shoryuken sqs mv commands

  • Fix bug in shoryuken sqs requeue and shoryuken sqs mv where those commands would exceed the SQS SendMessageBatch maximum payload size

  • Remove test stub for Concurrent.global_io_executor

  • Run integration tests on CI

[v5.2.0] - 2021-02-26

  • Set executions correctly for ActiveJob jobs

[v5.1.1] - 2021-02-10

  • Fix regression in Ruby 3.0 introduced in Shoryuken 5.1.0, where enqueueing jobs with ActiveJob to workers that used keyword arguments would fail

[v5.1.0] - 2021-02-06

  • Add support for specifying SQS SendMessage parameters with ActiveJob .set

  • Unpause FIFO queues on worker completion

  • Add multiple versions of Rails to test matrix

  • Migrate from Travis CI to Github Actions

[v5.0.6] - 2020-12-30

  • Load ShoryukenConcurrentSendAdapter when loading Rails

[v5.0.5] - 2020-06-07

  • Add ability to configure queue by ARN

[v5.0.4] - 2020-02-20

  • Add endpoint option to SQS CLI

[v5.0.3] - 2019-11-30

  • Add support for sending messages asynchronous with Active Job using shoryuken_concurrent_send

[v5.0.2] - 2019-11-02

  • Fix Queue order is reversed if passed through CLI

[v5.0.1] - 2019-06-19

  • Add back attr_accessor for stop_callback

[v5.0.0] - 2019-06-18

  • Fix bug where empty queues were not paused in batch processing mode

  • Preserve batch limit when receiving messages from a FIFO queue

  • Replace static options with instance options

[v4.0.3] - 2019-01-06

  • Support delay per processing group

[v4.0.2] - 2018-11-26

  • Fix the delegated methods to public warning

  • Specify exception class to raise_error matcher warning

  • Fix spelling of "visibility"

[v4.0.1] - 2018-11-21

  • Allow caching visibility_timeout lookups

  • Add queue name to inline executor

[v4.0.0] - 2018-11-01

  • Process messages to the same message group ID one by one

[v3.3.1] - 2018-10-30

  • Memoization of boolean causes extra calls to SQS

[v3.3.0] - 2018-09-30

  • Add support for TSTP

  • Support an empty list of queues as a CLI argument

  • Add batch support for inline workers

  • Make InlineExecutor to behave as the DefaultExecutor when calling perform_in

[v3.2.3] - 2018-03-25

  • Don't force eager load for Rails 5

  • Allow Batch Size to be Specified for Requeue

  • Support FIFO queues in shoryuken sqs commands

[v3.2.2] - 2018-02-13

[v3.2.1] - 2018-02-12

  • Support FIFO queues in shoryuken sqs commands

  • Allow customizing the default executor launcher

  • Exclude job_id from message deduplication when ActiveJob

[v3.2.0] - 2018-01-03

  • Preserve parent worker class options

  • Add -t (shutdown timeout) option to CL

  • Support inline (Active Job like) for standard workers

[v3.1.12] - 2017-09-25

  • Reduce fetch log verbosity

[v3.1.11] - 2017-09-02

  • Auto retry (up to 3 times) fetch errors

[v3.1.10] - 2017-09-02

  • Make Shoryuken compatible with AWS SDK 3 and 2

[v3.1.9] - 2017-08-24

  • Add support for adding a middleware to the front of chain

  • Add support for dispatch fire event

[v3.1.8] - 2017-08-17

  • Make Polling strategy backward compatibility

[v3.1.7] - 2017-07-31

  • Allow polling strategy per group

  • Add support for creating FIFO queues

  • Allow receive message options per queue

[v3.1.6] - 2017-07-24

  • Fix issue with dispatch_loop and delays

[v3.1.5] - 2017-07-23

  • Fix memory leak

  • Fail fast on bad queue URLs

[v3.1.4] - 2017-07-14

  • Require forwardable allowding to call shoryuken without bundle exec

[v3.1.3] - 2017-07-11

  • Add queue prefixing support for groups

  • Remove dead code

[v3.1.2] - 2017-07-06

  • Fix stack level too deep on Ubuntu

[v3.1.1] - 2017-07-05

  • Reduce log verbosity introduced in 3.1.0

  • Try to prevent stack level too deep on Ubuntu

[v3.1.0] - 2017-07-02

  • Add shoryuken sqs delete command

  • Add processing groups support; Concurrency per queue support

  • Terminate Shoryuken if the fetcher crashes

[v3.0.11] - 2017-06-24

  • Add shoryuken sqs create command

[v3.0.10] - 2017-06-24

  • Allow aws sdk v3

  • Allow configuring Rails via the config file

[v3.0.9] - 2017-06-05

  • Allow configuring queue URLs instead of names

[v3.0.8] - 2017-06-02

  • Fix miss handling empty batch fetches

  • Various minor styling changes 💄

  • Logout when batch delete returns any failure

[v3.0.7] - 2017-05-18

  • Trigger events for dispatch

  • Log (warn) exponential backoff tries

  • Fix displaying of long queue names in shoryuken sqs ls

[v3.0.6] - 2017-04-11

  • Fix delay option type

[v3.0.5] - 2017-04-09

[v3.0.4] - 2017-03-24

[v3.0.3] - 2017-03-19

  • Update sqs CLI commands to use get_queue_url when appropriated

[v3.0.2] - 2017-03-19

  • Fix custom SQS client initialization

[v3.0.1] - 2017-03-13

  • Fix commands sqs mv and dump options.delete checker

[v3.0.0] - 2017-03-12

  • Replace Celluloid with Concurrent Ruby

  • Remove AWS configuration from Shoryuken. Now AWS should be configured from outside. Check this for more details

  • Remove deprecation warnings

  • Allow dynamic adding queues

  • Support retry_intervals passed in as a lambda. Auto coerce intervals into integer

  • Add SQS commands shoryuken help sqs, such as ls, mv, dump and requeue

[v2.1.3] - 2017-01-27

  • Show a warn message when batch isn't supported

  • Require Celluloid ~> 17

  • Fix excessive logging when 0 messages found

[v2.1.2] - 2016-12-22

  • Fix loading logfile from shoryuken.yml

  • Add support for Strict priority polling (pending documentation)

  • Add test_workers for end-to-end testing supporting

  • Update README documenting configure_client and configure_server

  • Fix memory leak caused by async tracking busy threads

  • Refactor fetcher, polling strategy and manager

[v2.1.1] - 2016-12-05

  • Fix aws deprecation warning message

[v2.1.0] - 2016-12-03

  • Fix celluloid "running in BACKPORTED mode" warning

  • Allow setting the aws configuration in 'Shoryuken.configure_server'

  • Allow requiring a file or dir a through -r

  • Reduce info log verbosity

  • Fix auto extender when using ActiveJob

  • Add FIFO queue support

  • Deprecates initialize_aws

  • Other miscellaneous updates

[v2.0.11] - 2016-07-02

  • Same as 2.0.10. Unfortunately 2.0.10 was removed yanked by mistake from RubyGems.

[v2.0.10] - 2016-06-09

  • Fix manager #225

[v2.0.9] - 2016-06-08

  • Fix daemonization broken in #219

[v2.0.8] - 2016-06-07

  • Fix daemonization

[v2.0.7] - 2016-06-06

  • Daemonize before loading environment

  • Fix initialization when using rails

  • Improve message fetching

  • Fix hard shutdown if there are some busy workers when signal received

  • Fix rake console task

  • Isolate MessageVisibilityExtender as new middleware

  • Fail on non-existent queues

[v2.0.6] - 2016-04-18

  • Fix log initialization introduced by #191

[v2.0.5] - 2016-04-17

  • Fix log initialization when using Shoryuken::EnvironmentLoader#load

    • #191

    • Fix enqueue_at in the ActiveJob Adapter

    • #182

[v2.0.4] - 2016-02-04

  • Add Rails 3 support

  • Allow symbol as a queue name in shoryuken_options

  • Make sure bundler is always updated on Travis CI

  • Add Rails 5 compatibility

[v2.0.3] - 2015-12-30

  • Allow multiple queues per worker

  • Fix typo

[v2.0.2] - 2015-10-27

  • Fix warnings that are triggered in some cases with the raise_error matcher

  • Add lifecycle event registration support

  • Allow passing array of messages to send_messages

  • Fix Active Job queue prefixing in Rails apps

  • Enable override the default queue with a :queue option

[v2.0.1] - 2015-10-09

  • Bump aws-sdk to ~> 2

[v2.0.0] - 2015-09-22

  • Allow configuration of SQS/SNS endpoints via environment variables

  • Expose queue_name in the message object

  • README updates