Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,48 @@ jobs:
flags: active_job,ruby-${{ matrix.ruby }}
fail_ci_if_error: true

active-job-solid-queue:
needs: changes
if: ${{ needs.changes.outputs.shared == 'true' || needs.changes.outputs.core == 'true' || needs.changes.outputs.active_job == 'true' || needs.changes.outputs.rails_support == 'true' }}
runs-on: ubuntu-latest
name: active_job / Solid Queue / Ruby ${{ matrix.ruby }}
strategy:
fail-fast: false
matrix:
ruby:
- '3.4'
- '4.0'
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/gems/active_job/gemfiles/solid_queue.gemfile
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false

- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
working-directory: gems/active_job

- name: Run Solid Queue batch integration tests
working-directory: gems/active_job
env:
JULEWIRE_JUNIT: "1"
JULEWIRE_JUNIT_DIR: integration/test/reports
run: bundle exec rake integration:solid_queue

- name: Upload integration test results
if: ${{ !cancelled() }}
uses: codecov/codecov-action@v7
with:
use_oidc: true
report_type: test_results
files: ./gems/active_job/integration/test/reports/TEST-minitest.xml
disable_search: true
flags: active_job_solid_queue,ruby-${{ matrix.ruby }}
fail_ci_if_error: true

gcp:
needs: changes
if: ${{ needs.changes.outputs.shared == 'true' || needs.changes.outputs.core == 'true' || needs.changes.outputs.gcp == 'true' }}
Expand Down Expand Up @@ -730,6 +772,7 @@ jobs:
- repository-policy
- core
- active_job
- active-job-solid-queue
- gcp
- karafka
- rails
Expand Down
1 change: 1 addition & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ CORE_BRIDGE_ALLOWED_PREFIXES = %w[
Core::Serialization::Serializer
].freeze
CUSTOM_GEMFILES = {
"gems/active_job" => %w[gemfiles/solid_queue.gemfile],
"gems/rails" => %w[
gemfiles/rails_8_1.gemfile
gemfiles/rails_head.gemfile
Expand Down
6 changes: 6 additions & 0 deletions gems/active_job/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
## Unreleased

## 1.1.5 - 2026-09-15

- Keep a deserialized job's original context through retries and reserialization,
including Solid Queue 1.7 batch callbacks.
- Refresh dependency locksets and require Julewire 1.1.5 dependencies.

## 1.1.4 - 2026-08-30

- Refresh the dependency lockset and require Julewire 1.1.4 dependencies.
Expand Down
3 changes: 3 additions & 0 deletions gems/active_job/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ gemspec
gem "julewire-core", path: "../core"
gem "julewire-rails_support", path: "../rails_support"

# TODO: Remove when a Rails patch fixes JSON 3 keyword options in ActiveSupport::JSON.decode.
gem "json", "< 3"

gem "irb"
gem "rake", ">= 13.4"

Expand Down
59 changes: 30 additions & 29 deletions gems/active_job/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
PATH
remote: ../core
specs:
julewire-core (1.1.4)
julewire-core (1.1.5)
concurrent-ruby (>= 1.3)
zeitwerk (>= 2.8.1)

PATH
remote: ../rails_support
specs:
julewire-rails_support (1.1.4)
julewire-core (>= 1.1.4)
julewire-rails_support (1.1.5)
julewire-core (>= 1.1.5)
zeitwerk (>= 2.8.1)

PATH
remote: .
specs:
julewire-active_job (1.1.4)
julewire-active_job (1.1.5)
activejob (>= 8.1)
julewire-core (>= 1.1.4)
julewire-rails_support (>= 1.1.4)
julewire-core (>= 1.1.5)
julewire-rails_support (>= 1.1.5)
zeitwerk (>= 2.8.1)

GEM
Expand Down Expand Up @@ -140,7 +140,7 @@ GEM
racc (~> 1.4)
nokogiri (1.19.4-x86_64-linux-musl)
racc (~> 1.4)
parallel (2.1.0)
parallel (2.2.0)
parser (3.3.12.0)
ast (~> 2.4.1)
racc
Expand Down Expand Up @@ -188,7 +188,7 @@ GEM
regexp_parser (2.12.0)
reline (0.7.0)
io-console (~> 0.5)
rubocop (1.90.0)
rubocop (1.91.0)
json (>= 2.3)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.1.0)
Expand All @@ -214,16 +214,16 @@ GEM
lint_roller (~> 1.1)
rubocop (>= 1.72.1)
ruby-progressbar (1.13.0)
rubydex (0.4.0)
rubydex (0.4.0-aarch64-linux)
rubydex (0.4.0-arm64-darwin)
rubydex (0.4.0-x86_64-darwin)
rubydex (0.4.0-x86_64-linux)
rubydex (0.4.1)
rubydex (0.4.1-aarch64-linux)
rubydex (0.4.1-arm64-darwin)
rubydex (0.4.1-x86_64-darwin)
rubydex (0.4.1-x86_64-linux)
securerandom (0.4.1)
sexp_processor (4.17.5)
simplecov (1.1.1)
simplecov (1.2.0)
simplecov-lcov (0.9.0)
sorbet-runtime (0.6.13444)
sorbet-runtime (0.6.13498)
thor (1.5.0)
tsort (0.2.0)
tzinfo (2.0.6)
Expand Down Expand Up @@ -257,6 +257,7 @@ DEPENDENCIES
debride (>= 1.15)
flay (>= 2.14)
irb
json (< 3)
julewire-active_job!
julewire-core!
julewire-rails_support!
Expand Down Expand Up @@ -284,7 +285,7 @@ CHECKSUMS
base64 (0.3.0) sha256=27337aeabad6ffae05c265c450490628ef3ebd4b67be58257393227588f5a97b
bigdecimal (4.1.2) sha256=53d217666027eab4280346fba98e7d5b66baaae1b9c3c1c0ffe89d48188a3fbd
builder (3.3.0) sha256=497918d2f9dca528fdca4b88d84e4ef4387256d984b8154e9d5d3fe5a9c8835f
bundler (4.0.19) sha256=b48056e4c77fb3853cc47775b5447ede44aaa4f53c32f168014ab4fe86587d47
bundler (4.1.0.beta1) sha256=8a2dac8ca276ff4eff5efc2c6457b0044080fc1e431534ad7c5cc6187232b800
bundler-audit (0.9.3) sha256=81c8766c71e47d0d28a0f98c7eed028539f21a6ea3cd8f685eb6f42333c9b4e9
concurrent-ruby (1.3.8) sha256=b2f1be836e968ccc78ccfce277ea79c72a88633f22306782c16ff23fb415d1e1
connection_pool (3.0.2) sha256=33fff5ba71a12d2aa26cb72b1db8bba2a1a01823559fb01d29eb74c286e62e0a
Expand All @@ -300,9 +301,9 @@ CHECKSUMS
io-console (0.9.2) sha256=efa74f891dd03c0939a931dfc6e74c2813d904763d456ea9762b0525e748db08
irb (1.18.0) sha256=de9454a0703a54704b9811a5ef31a60c86949fbf4013fcf244fabc7c775248e3
json (2.21.2) sha256=1f1d3b7cf2b3ba1a69beca0bb6db13d5438b80bff3cd54cdaaa620b9b07c1c6a
julewire-active_job (1.1.4)
julewire-core (1.1.4)
julewire-rails_support (1.1.4)
julewire-active_job (1.1.5)
julewire-core (1.1.5)
julewire-rails_support (1.1.5)
language_server-protocol (3.17.0.6) sha256=5ef2c0c138f8267e1bc631d3328347d354f96724b0af22f2c79516120443b7f0
lint_roller (1.1.0) sha256=2c0c845b632a7d172cb849cc90c1bce937a28c5c8ccccb50dfd46a485003cc87
logger (1.7.0) sha256=196edec7cc44b66cfb40f9755ce11b392f21f7967696af15d274dde7edff0203
Expand All @@ -323,7 +324,7 @@ CHECKSUMS
nokogiri (1.19.4-x86_64-darwin) sha256=7fd17057d3e1f00e9954a74b3cd76595d3d4a5ef233b7ed9599047c204f70551
nokogiri (1.19.4-x86_64-linux-gnu) sha256=379fae440b28915e3f19d752ce2dcf8465ed2b2fbefd2a7ca0dd497bc981a06a
nokogiri (1.19.4-x86_64-linux-musl) sha256=17dfb7c1fa194ae02fbf7c51a7afc8d278045ab3fdacfd86f91d02d7b274470b
parallel (2.1.0) sha256=b35258865c2e31134c5ecb708beaaf6772adf9d5efae28e93e99260877b09356
parallel (2.2.0) sha256=e1059c5fd7b649558a0aec38a769f06a42942bdb40503d005a59c352fe011cd8
parser (3.3.12.0) sha256=21a6d7f755d5a24dfbdc6e6b772e4e879a52e7631a88bc5a3a134606052c9828
path_expander (2.0.1) sha256=2de201164bff4719cc4d0b3767286e9977cc832a59c4d70abab571ec86cb41e4
pp (0.6.4) sha256=dfcb0fce700c41456265922884f9fe195d7fbb0674a3578e6c0f69588e82b570
Expand All @@ -343,22 +344,22 @@ CHECKSUMS
rdoc (8.0.0) sha256=03bf8c08a9639658855a0cfd77c0abca8325c227693f7f33f82957811348c469
regexp_parser (2.12.0) sha256=35a916a1d63190ab5c9009457136ae5f3c0c7512d60291d0d1378ba18ce08ebb
reline (0.7.0) sha256=5b012d8e55dbf9d450f12bde2cf7d15ff546ae80b3f8f3b30e570d431815583d
rubocop (1.90.0) sha256=9eb4c065b5c5154e4ef554c547972f3905a9eb6b53e657e580b6796b54bf8242
rubocop (1.91.0) sha256=9c82b7bf391c5d7e3798c5b9996e22a1fe3bd7468e351dfdeb96140c058296d0
rubocop-ast (1.50.0) sha256=b9ca88300da0803ee222ad20cdb30494c0a784eed06fdc35d254b06d662788db
rubocop-minitest (0.40.0) sha256=353c698199115f12151144cf0b5a96f69bb9d77b660cf6536df2c4250c672a9d
rubocop-performance (1.27.0) sha256=eeeb1374d062a368ee1c787b70eb0b0cc4b184cb1f8565f424760946146d61ce
rubocop-rake (0.7.1) sha256=3797f2b6810c3e9df7376c26d5f44f3475eda59eb1adc38e6f62ecf027cbae4d
ruby-progressbar (1.13.0) sha256=80fc9c47a9b640d6834e0dc7b3c94c9df37f08cb072b7761e4a71e22cff29b33
rubydex (0.4.0) sha256=4b9c9d3aad5a7134ae0ac53183a9dda3874ea99b4b293c0f21cfb103bd283c11
rubydex (0.4.0-aarch64-linux) sha256=fab1f9cbb3301d2f3682f29165d9714aca5456fb3d70616b3676e3302af29709
rubydex (0.4.0-arm64-darwin) sha256=badbb7d1a7cfc03f1f7ce9fdc5ee414c729812c4b2eaa2bfe7da80d9a3a8b4b6
rubydex (0.4.0-x86_64-darwin) sha256=173bfdad227f4f53aaaab5cdf75d4ebd39c4532a8e7a568b3d8530317a273c3a
rubydex (0.4.0-x86_64-linux) sha256=75a4e1c6c4691ff815aee820dd26fb080f8053430a0ad248dd9b3125d621df86
rubydex (0.4.1) sha256=9856af8bfbe656eed95449dd9e2c8239a74662b4bb8563e4b99221dbc065a34a
rubydex (0.4.1-aarch64-linux) sha256=abc1c9eb22479f60dd015fa81373163c5a71f2700b76bced1282631686bd6271
rubydex (0.4.1-arm64-darwin) sha256=d23720253876d88fb98954e5d3a1ef9696a269697acf50e3ab53cdfbb2b66b96
rubydex (0.4.1-x86_64-darwin) sha256=a9681db5bc9be6a62f226d96d6889b6b600d0b09e7576391702aafd29912145b
rubydex (0.4.1-x86_64-linux) sha256=4e2c8398c9fc585485b54edd28f5ecf76b5a02255e177b6f8402e9d2afffd51b
securerandom (0.4.1) sha256=cc5193d414a4341b6e225f0cb4446aceca8e50d5e1888743fac16987638ea0b1
sexp_processor (4.17.5) sha256=ae2b48ba98353d5d465ce8759836b7a05f2e12c5879fcd14d7815b026de32f0e
simplecov (1.1.1) sha256=25825ef13f0b2e74694d769817dad6ab8e90131dabdaa666e522fea105521e78
simplecov (1.2.0) sha256=ea6acd05eece5a41990e2a5171c57d15700d329326c7666c85ee8c6a0dd0977e
simplecov-lcov (0.9.0) sha256=7a77a31e200a595ed4b0249493056efd0c920601f53d2ef135ca34ee796346cd
sorbet-runtime (0.6.13444) sha256=1b97769d5c585faac9b6c11736e0966ae64a7c352c053d43a9c254e2a7532350
sorbet-runtime (0.6.13498) sha256=2da4627f9341a1fc6e4148cc891989b7b108106c206c46ca69940e10a21e9133
thor (1.5.0) sha256=e3a9e55fe857e44859ce104a84675ab6e8cd59c650a49106a05f55f136425e73
tsort (0.2.0) sha256=9650a793f6859a43b6641671278f79cfead60ac714148aabe4e3f0060480089f
tzinfo (2.0.6) sha256=8daf828cc77bcf7d63b0e3bdb6caa47e2272dcfaf4fbfe46f8c3a9df087a829b
Expand All @@ -370,4 +371,4 @@ CHECKSUMS
zeitwerk (2.8.3) sha256=2c85125a8467ce069e20123d1e709a08955c9d29c118c25b46b7b7fafdbb92e5

BUNDLED WITH
4.0.19
4.1.0.beta1
14 changes: 12 additions & 2 deletions gems/active_job/Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ end
require "rubocop/rake_task"

RuboCop::RakeTask.new do |task|
task.patterns = %w[*.gemspec Gemfile Rakefile exe/* lib/**/*.rb test/**/*.rb]
task.patterns = %w[*.gemspec Gemfile gemfiles/*.gemfile Rakefile exe/* lib/**/*.rb test/**/*.rb integration/**/*.rb]
end

def ruby_exec(gem_name, executable, arguments)
Expand All @@ -26,7 +26,7 @@ end

desc "Run Flay duplicate code analysis"
task :flay do
ruby_exec("flay", "flay", %w[lib test])
ruby_exec("flay", "flay", %w[lib test integration])
end

desc "Run Debride unused code analysis"
Expand All @@ -39,4 +39,14 @@ task :audit do
ruby_exec("bundler-audit", "bundle-audit", %w[check --update])
end

namespace :integration do
desc "Run real Solid Queue batch compatibility tests (requires gemfiles/solid_queue.gemfile bundle)"
task :solid_queue do
Bundler.with_unbundled_env do
sh({ "BUNDLE_GEMFILE" => File.expand_path("gemfiles/solid_queue.gemfile", __dir__) },
RbConfig.ruby, "-rbundler/setup", "-Ilib", "integration/test/test_solid_queue.rb")
end
end
end

task default: %i[test rubocop flay debride audit]
28 changes: 28 additions & 0 deletions gems/active_job/docs/propagation.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,20 @@ job execution scope starts.
That lets upstream context flow into the job without emitting propagation-only
data by default.

Fresh jobs capture the current context when serialized. A deserialized job keeps
its original carrier when serialized again, including when retried. An ambient
worker context or unrelated request cannot replace that origin. Jobs received
without a carrier remain without one. Instantiate a new job to capture another
context; child jobs capture their parent's live execution context.

`carrier_max_bytes` defaults to `65_536`. Oversized carriers are omitted from
serialized job payloads and ignored on restore. The job still runs normally; it
starts without upstream Julewire context.

Disabling propagation or changing `carrier_key` also prevents forwarding a saved
carrier under the previous setting. These cases never capture ambient context as
a replacement for the omitted carrier.

Generic job metadata such as class, id, queue, priority, execution count,
timestamps, and status is emitted in the record's `neutral` section as `job.*`
formatter-coordination fields. Full Active Job metadata, including framework-
Expand All @@ -19,3 +29,21 @@ specific status and exception fields, is emitted under `attributes.active_job`.
Status classification follows Active Job's normal `StandardError` path. Fatal
Ruby exceptions such as `SystemExit` or `NoMemoryError` are not converted into
job status metadata; they keep Ruby's process-level semantics.

Bulk enqueues use Active Job's serialization and execution contracts. Solid Queue
1.7 compatibility is checked separately with real batches, bulk-enqueued members,
and success, failure, and finish callbacks. Jobs retain their enqueue origin and
emit normal per-job records. Aggregate batch lifecycle and delivery remain the
queue backend's responsibility.

Solid Queue is not a runtime dependency or part of the default development bundle.
CI runs its separate integration suite on Ruby 3.4 and 4.0 when Active Job, core,
Rails support, or shared tooling changes. Run it locally from `gems/active_job`:

```sh
BUNDLE_GEMFILE=gemfiles/solid_queue.gemfile bundle install
bundle exec rake integration:solid_queue
```

The integration suite uses an in-memory SQLite database and Solid Queue's shipped
schema. It does not start a worker daemon or connect to an application database.
6 changes: 6 additions & 0 deletions gems/active_job/gemfiles/solid_queue.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# frozen_string_literal: true

eval_gemfile "../Gemfile"

gem "solid_queue", ">= 1.7", require: false
gem "sqlite3", ">= 2.1"
Loading