feat(rails): support for solid queue#2942
Draft
solnic wants to merge 5 commits into
Draft
Conversation
ba6dae4 to
0531f06
Compare
396f231 to
22e181a
Compare
cafb0e5 to
d61680a
Compare
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>
22e181a to
ad38485
Compare
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.
TBD
Closes #2587