Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rails/solid_queue
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.5.0
Choose a base ref
...
head repository: rails/solid_queue
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.5.1
Choose a head ref
  • 10 commits
  • 30 files changed
  • 6 contributors

Commits on Jul 24, 2026

  1. Wait deterministically before signaling QUIT and KILL in lifecycle tests

    The tests only waited for jobs to be claimed before signaling, so on a
    slow runner the signal's exit! could land after the instant job was
    claimed, or even after it had written its result, but before its
    finished_at was committed, leaving it unfinished and failing the test.
    
    Wait until the instant job has actually finished and the paused job has
    actually started before signaling, so the signal always arrives while
    only the paused job is in-flight, which is the scenario these tests
    exist to check. The async QUIT test's pause also becomes 60 seconds
    like the forked variant's: with only 1 second, a slow QUIT could land
    after the paused job finished, breaking the assertion that it remains
    claimed. Nothing waits for the pause, so test runtime is unaffected.
    
    Co-Authored-By: Claude Opus 4.8 <[email protected]>
    rosa and claude committed Jul 24, 2026
    Configuration menu
    Copy the full SHA
    0a7c1cf View commit details
    Browse the repository at this point in the history
  2. Kill job threads leaked by workers stopped in-process in tests

    A worker stopped while a job is running gives up on its pool after
    SolidQueue.shutdown_timeout and releases the claim, but it can't stop
    the thread running the job. A forked worker exits right after, killing
    the thread; a worker running in-process in a test leaks it instead,
    sleeping until the job's pause is over, long after its test finished.
    
    Inside a transactional test this corrupts later tests: the leaked
    job's inserts roll back with the test, and on SQLite the AUTOINCREMENT
    sequence bump rolls back too, so later tests' rows get the same ids
    and the leaked thread writes over them when it wakes up. This was
    behind several flaky failures on SQLite: a job result overwritten with
    "completed" mid-assertion, and a claimed execution stolen by a leaked
    finalize call on a recycled claim id, leaving a job neither finished
    nor ready. It can't happen in production: ids are only re-issued when
    the insert rolls back, and a real worker's threads die with its
    process.
    
    Kill the leaked threads in the tests that create them, like a forked
    worker's exit would, and fix the explanation of SQLite id reuse in the
    concurrency controls test setup: with AUTOINCREMENT, committed deletes
    never free ids; it's the transactional rollback that recycles them.
    
    Co-Authored-By: Claude Opus 4.8 <[email protected]>
    rosa and claude committed Jul 24, 2026
    Configuration menu
    Copy the full SHA
    f731502 View commit details
    Browse the repository at this point in the history
  3. Add an update generator to copy new migrations

    Future schema changes will ship as regular migrations, optional at
    first and required in the next major version. `rails solid_queue:update`
    (or the solid_queue:update generator directly) copies any new migration
    files from the gem to the application, honoring the database the app
    uses for Solid Queue via the --database option.
    
    Together with this, add a deprecator for Solid Queue, registered with
    the application so it follows the app's deprecation behavior settings,
    and a warning helper that features guarded behind pending migrations
    can use to instruct users to update.
    
    Extracted from earlier work on linking claimed executions to processes
    by name, which ended up not being needed.
    
    Co-Authored-By: Claude Opus 4.8 <[email protected]>
    rosa and claude committed Jul 24, 2026
    Configuration menu
    Copy the full SHA
    29e818d View commit details
    Browse the repository at this point in the history
  4. Wait for the continuable job to start before interrupting it

    The test slept a fixed 0.2 seconds after enqueuing and then signaled
    TERM, assuming the job would be mid-step by then. On a slow runner the
    signal could arrive before any worker had even claimed the job, and
    the wait for released jobs would return immediately, unable to tell
    "released" from "never claimed", so the test asserted against a job
    result that hadn't been touched yet.
    
    Have the job write a "started" marker at the top of its first step and
    wait for it before signaling, so the interruption always lands while
    the job is paused inside step one, which is the scenario the test
    exists to check: interrupt between steps, resume, complete.
    
    Co-Authored-By: Claude Opus 4.8 <[email protected]>
    rosa and claude committed Jul 24, 2026
    Configuration menu
    Copy the full SHA
    74b6b07 View commit details
    Browse the repository at this point in the history

Commits on Jul 27, 2026

  1. Add --only-recurring to run just the recurring scheduler

    Makes isolating the scheduler on its own process explicit, matching
    the existing --skip-recurring option and the workaround of an empty
    workers/dispatchers config.
    
    Fixes #484
    
    Co-authored-by: Cursor <[email protected]>
    2 people authored and rosa committed Jul 27, 2026
    Configuration menu
    Copy the full SHA
    517a974 View commit details
    Browse the repository at this point in the history
  2. Lease connections in DistinctValues instead of calling deprecated `co…

    …nnection`
    
    Bare `connection` resolves to the deprecated ActiveRecord::Base.connection,
    which raises under permanent_connection_checkout = :disallowed on Rails 8.1.
    Follows the connection_pool.with_connection pattern from #652.
    trevorturk authored and rosa committed Jul 27, 2026
    Configuration menu
    Copy the full SHA
    40d6bd5 View commit details
    Browse the repository at this point in the history

Commits on Jul 29, 2026

  1. Configuration menu
    Copy the full SHA
    6a2a201 View commit details
    Browse the repository at this point in the history
  2. Terminate the stalled supervisor gracefully in tests

    The tests killed the whole process group to clean up, but the
    supervisor under test is actively replacing its stalled forks, and a
    group KILL races that forking: a fork spawned concurrently with the
    kill can escape it, wake up from its stalled boot long after the test
    has finished, register itself and start polling, holding the test
    database's write lock and cascading lock timeouts through unrelated
    tests, as seen on CI with SQLite.
    
    Terminating the supervisor gracefully instead lets it clean up its own
    forks: it stops replacing them first, and a fork stuck in boot is
    covered by the QUIT escalation, as its signal handlers are installed
    before the boot callbacks where it stalls. This also lets go of the
    replacement fork's liveness assertion: the replacement stalls too, so
    whether it's alive depends on where its own boot timeout is.
    
    Co-Authored-By: Claude Opus 4.8 <[email protected]>
    rosa and claude committed Jul 29, 2026
    Configuration menu
    Copy the full SHA
    7e62a62 View commit details
    Browse the repository at this point in the history
  3. Track process startups with boot guards the processes themselves manage

    Move the startup-tracking machinery out of ForkSupervisor into boot
    guards with a common interface, created by each process when it
    starts, according to how it runs: a forked process pipes its boot
    completion to the supervisor through a BootGuards::ForkGuard, created
    before forking so it survives it, while processes running as threads
    of their supervisor, or inline, use a BootGuards::NullGuard, which
    completes on boot without any monitoring. Booting itself completes
    the guard, so starting a process remains just boot and run.
    
    ForkSupervisor checks its forks' boot guards while checking for
    terminated processes to replace, terminating any fork whose boot has
    timed out so that it's reaped and replaced as usual, and closing each
    guard together with the rest of the fork's cleanup, asking the process
    instances themselves, like the async supervisor does when it checks
    whether they're alive.
    
    The configurable timeout becomes fork_boot_timeout, as it only applies
    to forked processes: supervised processes running as threads aren't
    monitored while booting, and the supervisor itself has no parent
    within Solid Queue that could enforce a timeout on it. The
    instrumentation event follows suit. Also reuse Timer's monotonic clock
    instead of redefining it.
    
    Co-Authored-By: Claude Opus 4.8 <[email protected]>
    rosa and claude committed Jul 29, 2026
    Configuration menu
    Copy the full SHA
    f8899df View commit details
    Browse the repository at this point in the history
  4. Bump solid_queue to 1.5.1

    rosa committed Jul 29, 2026
    Configuration menu
    Copy the full SHA
    e5d8c17 View commit details
    Browse the repository at this point in the history
Loading