Skip to content

feat(rails): support for solid queue#2942

Draft
solnic wants to merge 5 commits into
2933-active-job-tracing-specsfrom
2587-support-solid-queue
Draft

feat(rails): support for solid queue#2942
solnic wants to merge 5 commits into
2933-active-job-tracing-specsfrom
2587-support-solid-queue

Conversation

@solnic
Copy link
Copy Markdown
Collaborator

@solnic solnic commented Apr 28, 2026

TBD

Closes #2587

@solnic solnic linked an issue Apr 28, 2026 that may be closed by this pull request
@solnic solnic force-pushed the 2587-support-solid-queue branch from ba6dae4 to 0531f06 Compare April 30, 2026 13:23
@solnic solnic force-pushed the 2587-support-solid-queue branch from 396f231 to 22e181a Compare May 7, 2026 13:58
@solnic solnic changed the base branch from master to 2933-active-job-tracing-specs May 7, 2026 13:58
@solnic solnic force-pushed the 2933-active-job-tracing-specs branch 2 times, most recently from cafb0e5 to d61680a Compare May 12, 2026 08:14
solnic and others added 5 commits May 12, 2026 08:14
Opts the SolidQueue adapter spec into the distributed_tracing meta so
all five tracing examples (producer span, trace propagation, messaging
span data, user propagation, worker hub isolation) run against
:solid_queue alongside the existing :test adapter coverage.

Two SolidQueue-specific harness adjustments were needed to make this
work on the SQLite-backed test setup:

- drain only wraps in travel_to when the caller passes an explicit
  `at:`. Without this, the inner travel_to(Time.current) collides with
  the outer travel block in messaging_span_data.rb's latency assertion.

- worker_hub_isolation.rb now spawns its threads through a `worker_thread`
  harness hook (default = `Thread.new`). The :solid_queue spec overrides
  this hook to allocate an isolated SQLite shard per spawned thread via
  `connects_to(shards: ...)` + `connected_to(shard:)`. Each worker
  thread reads/writes its own SolidQueue tables, eliminating the
  SQLite3::BusyException that two concurrent perform_later/drain
  pipelines on the shared test DB would otherwise raise. The contract
  the spec enforces — concurrent jobs in different threads do not
  cross-pollute Sentry scope — holds the same way it does on :test.

Verified GREEN on Rails 6.1 (SQ skipped, :test adapter only),
7.1, and 8.1 via ./bin/test --version.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@solnic solnic force-pushed the 2587-support-solid-queue branch from 22e181a to ad38485 Compare May 12, 2026 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support Solid Queue

1 participant