Skip to content

P4DEVOPS-16617: update gem dependencies within what JRuby 9.4 can run - #706

Open
Ramesh7 wants to merge 2 commits into
mainfrom
P4DEVOPS-16617-update-dependencies-main
Open

Ramesh7 wants to merge 2 commits into
mainfrom
P4DEVOPS-16617-update-dependencies-main

Conversation

@Ramesh7

@Ramesh7 Ramesh7 commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Summary

P4DEVOPS-16617. Updates vmpooler's gem dependencies as far as JRuby 9.4 (Ruby 3.1, what prod runs) allows, and fixes the one regression the update causes. Against main (3.8.1, after #705), with only the changes the update needs. This is the dependency part of #704 without the test-coverage work from #703.

The newest OpenTelemetry instrumentation needs Ruby 3.3 or later, so "latest" is not reachable on this runtime. These are the highest versions that run on Ruby 3.1.

Changes

  • Version 3.8.1 -> 4.0.0 (lib/vmpooler/version.rb, the vmpooler entry in Gemfile.lock, CHANGELOG.md). Major, because the gemspec's OpenTelemetry requirements change and anything locking vmpooler with the old instrumentation gems has to move with it. The changelog entry is written by hand, not generated.

  • Gemfile.lock: runtime and test gems updated to the newest versions the gemspec already allows. The lint toolchain (rubocop-ast, prism, parser) is untouched.

  • vmpooler.gemspec: the exact = pins on the OpenTelemetry gems become patch-level ranges at the highest versions that run on Ruby 3.1:

    Gem Was Now
    instrumentation-concurrent_ruby = 0.21.1 ~> 0.23.1
    instrumentation-http_client = 0.22.2 ~> 0.25.1
    instrumentation-rack = 0.23.4 ~> 0.28.2
    instrumentation-redis = 0.25.3 ~> 0.27.1
    instrumentation-sinatra = 0.23.2 ~> 0.27.1
    sdk ~> 1.8 ~> 1.10
    exporter-jaeger, resource_detectors exact ~> at the same version
  • lib/vmpooler.rb: use_rack_events: false for the Rack instrumentation. From instrumentation-rack 0.26 the Rack events handler detaches the OpenTelemetry context when Puma closes the response body, not where it was attached. OpenTelemetry then logs calls to detach should match corresponding calls to attach at ERROR, about three times per request.

Verification

  • On this branch, JRuby 9.4.7 in Docker, with the committed Gemfile.lock: bundle exec rspec spec gives 893 examples, 0 failures. The runtime gem versions resolved there are identical to the committed lock.

  • Real vmpooler API in containers with an explicit lockfile each, same config, Redis and Jaeger, 6 marked requests (measured on the P4DEVOPS-16617: update gem dependencies within what JRuby 9.4 can run (stacked on #703) #704 branch, same dependency set):

    Gem set Traces in Jaeger Detach errors
    Prod's set (instrumentation-rack 0.23.4, SDK 1.8) 6 0
    New gems, events handler on (default) 6 21
    New gems, events handler off (this PR) 6 0

Not verified

Not in this PR

  • Major upgrades (sinatra 4, rack 3, puma 7/8, redis 6, prometheus-client 5, connection_pool 3). Each is a breaking change and should go one at a time behind the test suite.
  • vmpooler-deployment: it consumes the released gem, so it needs a vmpooler release first, then a regenerated docker/Gemfile.lock.

Relation to other PRs

🧙 Built with WOZCODE

Loosen the exact OpenTelemetry pins to compatible ranges and refresh
Gemfile.lock. Turn off the Rack events handler of instrumentation-rack,
which logs an unmatched context detach on every request from 0.26 on.

Co-Authored-By: WOZCODE <contact@withwoz.com>
@Ramesh7
Ramesh7 requested a review from a team as a code owner November 6, 2026 15:18
The OpenTelemetry pins in the gemspec change, so this is a major version.

Co-Authored-By: WOZCODE <contact@withwoz.com>
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.

2 participants