Repository navigation
Look up the header versioner's vendor pattern once, when it is built - #3098
Merged
Merged
Conversation
ericproulx
force-pushed
the
refactor/versioner-vendor-pattern
branch
from
November 21, 2026 17:17
b7a200c to
81887d4
Compare
This was referenced Nov 21, 2026
ericproulx
force-pushed
the
refactor/versioner-vendor-pattern
branch
2 times, most recently
from
November 21, 2026 17:29
cc0d54d to
712b029
Compare
A request whose Accept header missed the versioner's table read VendorVersionHeaderRegexCache, a singleton behind a Monitor. The versioner now passes the pattern down, and Grape::Util::MediaType takes vendor_pattern: in place of vendor:. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ericproulx
force-pushed
the
refactor/versioner-vendor-pattern
branch
from
November 21, 2026 17:39
712b029 to
2038ad9
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.
Part of making Grape's internals readable from a non-main Ractor, without calling the
RactorAPI fromlib/(groundwork for #2978). Split from #3095, with the rest in #3096 and #3097.When an Accept header missed the table the header versioner builds,
Grape::Util::MediaTypereadVendorVersionHeaderRegexCacheper request: a singleton behind aMonitor, which a non-main Ractor cannot read. The versioner now looks its vendor's pattern up as it is built and passes it down, so a request reads no shared, mutable state.MediaType.parse,.best_qualityand.newtakevendor_pattern:in place ofvendor:, andMediaType.vendor_pattern(vendor)answers it.vendor:shipped in 4.1.0 (#3013), hence the UPGRADING note.Throughput
Ruby 4.0.6, 6 rounds from one checkout, alternating which side runs first, median of the per-round ratios. The versioner no longer takes the cache's
Monitoron that path:🤖 Generated with Claude Code