Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds Rails/ActiveJob 7.1 compatibility by avoiding ActionMailer::MailDeliveryJob.new.queue_name (which raises in 7.1+) and by expanding CI/appraisal coverage to test against Rails 7.1.
Changes:
- Add mailer-specific consumer registration by deriving queue names from
deliver_later_queue_namerather than instantiatingMailDeliveryJob. - Expand integration specs to cover Rails 7.1 ActionMailer queue behaviors (including per-mailer queue names and custom delivery jobs).
- Add a Rails 7.1 appraisal + gemfile and extend the GitHub Actions matrix accordingly.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
lib/advanced_sneakers_activejob/workers_registry.rb |
Adds ActionMailer-aware consumer definition to avoid Rails 7.1 MailDeliveryJob instantiation issues. |
spec/integration/consumers_spec.rb |
Adds/adjusts integration coverage for ActionMailer queue handling, including Rails 7.1+ per-mailer queue names. |
Appraisals |
Adds an activejob-7.1.x appraisal entry. |
gemfiles/activejob_7.1.x.gemfile |
Adds the generated Rails 7.1 appraisal gemfile. |
.github/workflows/main.yml |
Extends CI matrix to include Rails 7.1 and newer Ruby versions. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
1c87130 to
b0e37f4
Compare
b0e37f4 to
70fc9d1
Compare
- Remove Ruby 2.5 and 2.6 from CI matrix - Add Ruby 3.3 and 3.4 to CI matrix - Remove EOL Rails 4.2 and 5.2 gemfiles - Add Rails 7.2 appraisal and gemfile - Pin concurrent-ruby 1.3.4 in 7.1.x appraisal - Update exclude rules for Rails 6.x + Ruby 3.1+ incompatibility - Bump actions/checkout from v2 to v4
…ing_adapter Use <= instead of == to exclude all MailDeliveryJob descendants, not just the base class. Custom delivery jobs that subclass MailDeliveryJob require initialization arguments in Rails 7.1+ and would raise when instantiated via worker.new.queue_name.
- Update required_ruby_version in gemspec from 2.5 to 2.7 - Add concurrent-ruby 1.3.4 pin to activejob_7.1.x and 7.2.x gemfiles to match Appraisals declarations
Document ActionMailer support, Rails 7.1/7.2 support, Ruby 3.3/3.4 support, dropped EOL versions, and MailDeliveryJob subclass fix.
Ruby 3.4 changed NoMethodError messages to use single quotes instead
of backticks, and Hash#inspect to use symbol-key syntax ({key: "val"})
instead of rocket syntax ({:key=>"val"}). Update test regexes to
accept both formats.
Match ActiveJob's own queue name composition by using .presence instead of bare value, preventing a leading delimiter when the prefix is an empty string.
4347df7 to
91c1750
Compare
a83f8ba to
a954431
Compare
bc6b200 to
8cb7b09
Compare
Rails 7.2 introduced Rails::HealthController which inherits from ActionController::Base. During eager_load!, it tries to load this controller, causing NameError when action_controller/railtie is not required. Add the require to all three test app files.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 13 out of 13 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
calvinhughes
approved these changes
Apr 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Original PR: #39
Breaking changes addressed
Action Mailer exception
In ActionMailer 7.1+ the following call throws an exception:
This is because
MailDeliveryJobaccepts theMaileras the first argument and uses the mailer dynamically to get the queue name usingdeliver_later_queue_name. So, callingqueue_namewithout passing the arguments throws an exception.The only way to pass arguments is to call
perform_later- which we cannot do just to get queue_name.This was solved by adding special handling for
MailDeliveryJob. We usedeliver_later_queue_namefrom the mailer itself to get the queue name - same asMailDeliveryJob.Checklist