Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i18n 1.8.8 release incompatible with jRuby (undefined method `deep_merge!' for {}:Concurrent::Hash) #560

Closed
mwlang opened this issue Feb 3, 2021 · 1 comment · Fixed by #796
Assignees
Labels

Comments

@mwlang
Copy link
Contributor

mwlang commented Feb 3, 2021

Description

i18n gem released 1.8.8 version Feb 2, 2021 and leads to the following error in our test suite under jRuby. This is the same as reported to the jruby repo here.

Emitting log from failure: test_doesnt_interfere_with_params_on_job
I, [2021-02-03T16:49:58.345753 #8327]  INFO -- : Performing MyJobWithParams (Job ID: b42a454a-7396-4274-86cd-9e7c80058021) from Inline(default) enqueued at 2021-02-03T16:49:58Z with arguments: "1", "2"
E, [2021-02-03T16:49:58.439506 #8327] ERROR -- : Error performing MyJobWithParams (Job ID: b42a454a-7396-4274-86cd-9e7c80058021) from Inline(default) in 91.11ms: NoMethodError (undefined method `deep_merge!' for {}:Concurrent::Hash
Did you mean?  deep_merge):
.../gems/i18n-1.8.8/lib/i18n/backend/simple.rb:45:in `store_translations'
.../gems/i18n-1.8.8/lib/i18n/backend/base.rb:230:in `block in load_file'
org/jruby/RubyHash.java:1415:in `each'
.../gems/i18n-1.8.8/lib/i18n/backend/base.rb:230:in `load_file'
.../gems/i18n-1.8.8/lib/i18n/backend/base.rb:18:in `block in load_translations'
org/jruby/RubyArray.java:1809:in `each'
.../gems/i18n-1.8.8/lib/i18n/backend/base.rb:18:in `load_translations'
.../gems/i18n-1.8.8/lib/i18n/backend/simple.rb:80:in `init_translations'
.../gems/i18n-1.8.8/lib/i18n/backend/simple.rb:50:in `available_locales'
.../gems/i18n-1.8.8/lib/i18n/config.rb:45:in `available_locales'
.../gems/i18n-1.8.8/lib/i18n/config.rb:51:in `available_locales_set'
.../gems/i18n-1.8.8/lib/i18n.rb:337:in `locale_available?'
.../gems/i18n-1.8.8/lib/i18n.rb:343:in `enforce_available_locales!'
.../gems/i18n-1.8.8/lib/i18n/config.rb:15:in `locale='
.../gems/i18n-1.8.8/lib/i18n.rb:60:in `locale='
.../gems/i18n-1.8.8/lib/i18n.rb:312:in `with_locale'
.../gems/activejob-6.1.1/lib/active_job/translation.rb:9:in `block in Translation'
org/jruby/RubyBasicObject.java:2694:in `instance_exec'
.../gems/activesupport-6.1.1/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
.../gems/activesupport-6.1.1/lib/active_support/core_ext/time/zones.rb:66:in `use_zone'
.../gems/activejob-6.1.1/lib/active_job/timezones.rb:9:in `block in Timezones'
org/jruby/RubyBasicObject.java:2694:in `instance_exec'
.../gems/activesupport-6.1.1/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
.../gems/activejob-6.1.1/lib/active_job/instrumentation.rb:21:in `block in instrument'
.../gems/activesupport-6.1.1/lib/active_support/notifications.rb:203:in `block in instrument'
.../gems/activesupport-6.1.1/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
.../gems/activesupport-6.1.1/lib/active_support/notifications.rb:203:in `instrument'
.../gems/activejob-6.1.1/lib/active_job/instrumentation.rb:31:in `instrument'
.../gems/activejob-6.1.1/lib/active_job/instrumentation.rb:14:in `block in Instrumentation'
org/jruby/RubyBasicObject.java:2694:in `instance_exec'
.../gems/activesupport-6.1.1/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
.../gems/activejob-6.1.1/lib/active_job/logging.rb:24:in `tag_logger'
.../gems/activejob-6.1.1/lib/active_job/logging.rb:15:in `block in Logging'
org/jruby/RubyBasicObject.java:2694:in `instance_exec'
.../gems/activesupport-6.1.1/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
.../gems/activesupport-6.1.1/lib/active_support/callbacks.rb:137:in `run_callbacks'
.../gems/activejob-6.1.1/lib/active_job/execution.rb:47:in `perform_now'
.../gems/activejob-6.1.1/lib/active_job/execution.rb:25:in `block in execute'
.../gems/activesupport-6.1.1/lib/active_support/callbacks.rb:98:in `run_callbacks'
.../gems/activejob-6.1.1/lib/active_job/execution.rb:23:in `execute'
.../gems/activejob-6.1.1/lib/active_job/queue_adapters/inline_adapter.rb:15:in `enqueue'
.../gems/activejob-6.1.1/lib/active_job/enqueuing.rb:59:in `block in enqueue'
.../gems/activesupport-6.1.1/lib/active_support/callbacks.rb:117:in `block in run_callbacks'
.../newrelic-ruby-agent/lib/new_relic/agent/instrumentation/active_job.rb:61:in `block in run_in_trace'
.../newrelic-ruby-agent/lib/new_relic/agent/method_tracer.rb:75:in `block in trace_execution_scoped'
.../newrelic-ruby-agent/lib/new_relic/agent/method_tracer_helpers.rb:30:in `block in trace_execution_scoped'
.../newrelic-ruby-agent/lib/new_relic/agent/tracer.rb:371:in `capture_segment_error'
.../newrelic-ruby-agent/lib/new_relic/agent/method_tracer_helpers.rb:30:in `trace_execution_scoped'
.../newrelic-ruby-agent/lib/new_relic/agent/method_tracer.rb:73:in `trace_execution_scoped'
.../newrelic-ruby-agent/lib/new_relic/agent/instrumentation/active_job.rb:60:in `run_in_trace'
.../newrelic-ruby-agent/lib/new_relic/agent/instrumentation/active_job.rb:38:in `enqueue'
.../newrelic-ruby-agent/lib/new_relic/agent/instrumentation/active_job.rb:19:in `block in <main>'
org/jruby/RubyBasicObject.java:2694:in `instance_exec'
.../gems/activesupport-6.1.1/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
.../gems/activejob-6.1.1/lib/active_job/instrumentation.rb:21:in `block in instrument'
.../gems/activesupport-6.1.1/lib/active_support/notifications.rb:203:in `block in instrument'
.../gems/activesupport-6.1.1/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
.../gems/activesupport-6.1.1/lib/active_support/notifications.rb:203:in `instrument'
.../gems/activejob-6.1.1/lib/active_job/instrumentation.rb:31:in `instrument'
.../gems/activejob-6.1.1/lib/active_job/instrumentation.rb:9:in `block in Instrumentation'
org/jruby/RubyBasicObject.java:2694:in `instance_exec'
.../gems/activesupport-6.1.1/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
.../gems/activejob-6.1.1/lib/active_job/logging.rb:24:in `tag_logger'
.../gems/activejob-6.1.1/lib/active_job/logging.rb:14:in `block in Logging'
org/jruby/RubyBasicObject.java:2694:in `instance_exec'
.../gems/activesupport-6.1.1/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
.../gems/activesupport-6.1.1/lib/active_support/callbacks.rb:137:in `run_callbacks'
.../gems/activejob-6.1.1/lib/active_job/enqueuing.rb:55:in `enqueue'
.../gems/activejob-6.1.1/lib/active_job/enqueuing.rb:22:in `perform_later'
.../newrelic-ruby-agent/test/multiverse/suites/rails/activejob_test.rb:138:in `test_doesnt_interfere_with_params_on_job'
.../gems/minitest-5.2.3/lib/minitest/test.rb:106:in `block in run'
.../gems/minitest-5.2.3/lib/minitest/test.rb:204:in `capture_exceptions'
.../gems/minitest-5.2.3/lib/minitest/test.rb:103:in `block in run'
.../gems/minitest-5.2.3/lib/minitest/test.rb:256:in `time_it'
.../gems/minitest-5.2.3/lib/minitest/test.rb:102:in `block in run'
.../gems/minitest-5.2.3/lib/minitest.rb:317:in `on_signal'
.../gems/minitest-5.2.3/lib/minitest/test.rb:276:in `with_info_handler'
.../gems/minitest-5.2.3/lib/minitest/test.rb:101:in `run'
.../gems/minitest-5.2.3/lib/minitest.rb:759:in `run_one_method'
.../gems/minitest-5.2.3/lib/minitest.rb:293:in `run_one_method'
.../gems/minitest-5.2.3/lib/minitest.rb:287:in `block in run'
org/jruby/RubyArray.java:1809:in `each'
.../gems/minitest-5.2.3/lib/minitest.rb:286:in `block in run'
.../gems/minitest-5.2.3/lib/minitest.rb:317:in `on_signal'
.../gems/minitest-5.2.3/lib/minitest.rb:306:in `with_info_handler'
.../gems/minitest-5.2.3/lib/minitest.rb:285:in `run'
.../gems/minitest-5.2.3/lib/minitest.rb:149:in `block in __run'
org/jruby/RubyArray.java:2577:in `map'
.../gems/minitest-5.2.3/lib/minitest.rb:149:in `__run'
.../gems/minitest-5.2.3/lib/minitest.rb:126:in `run'
.../newrelic-ruby-agent/test/multiverse/lib/multiverse/suite.rb:503:in `trigger_test_run'
.../newrelic-ruby-agent/test/multiverse/lib/multiverse/suite.rb:345:in `block in execute_child_environment'
.../newrelic-ruby-agent/test/multiverse/lib/multiverse/suite.rb:446:in `block in with_unbundled_env'
.../gems/bundler-1.17.3/lib/bundler.rb:313:in `block in with_clean_env'
.../gems/bundler-1.17.3/lib/bundler.rb:562:in `with_env'
.../gems/bundler-1.17.3/lib/bundler.rb:313:in `with_clean_env'
.../newrelic-ruby-agent/test/multiverse/lib/multiverse/bundler_patch.rb:15:in `with_unbundled_env'
.../newrelic-ruby-agent/test/multiverse/lib/multiverse/suite.rb:446:in `block in with_unbundled_env'
.../newrelic-ruby-agent/test/multiverse/lib/multiverse/suite.rb:107:in `with_potentially_mismatched_bundler'
.../newrelic-ruby-agent/test/multiverse/lib/multiverse/suite.rb:441:in `with_unbundled_env'
.../newrelic-ruby-agent/test/multiverse/lib/multiverse/suite.rb:333:in `execute_child_environment'
.../newrelic-ruby-agent/test/multiverse/lib/multiverse/suite.rb:649:in `<main>'
org/jruby/RubyKernel.java:974:in `require'
/home/runner/.rubies/ruby-jruby-9.2.12.0/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:54:in `require'
.../newrelic-ruby-agent/test/multiverse/lib/multiverse.rb:33:in `<main>'
org/jruby/RubyKernel.java:974:in `require'
/home/runner/.rubies/ruby-jruby-9.2.12.0/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:54:in `require'
.../newrelic-ruby-agent/test/multiverse/lib/multiverse/suite.rb:14:in `<main>'
E, [2021-02-03T16:49:58.443210 #8327] ERROR -- : Failed enqueuing MyJobWithParams to Inline(default): NoMethodError (undefined method `deep_merge!' for {}:Concurrent::Hash
Did you mean?  deep_merge)

Troubleshooting or NR Diag results

Provide any other relevant log data.
TIP: Scrub logs and diagnostic information for sensitive information

Steps to Reproduce

  1. depend on i18n 1.8.8 release
  2. bundle install and run a Ruby app with the Ruby agent and under jRuby

Your Environment

  1. I18n gem version 1.8.8
  2. jRuby interpreter

Additional context

Test suite will be gated to block I18n 1.8.8 under jRuby. Users should avoid this combination in their environments as well.

Please also see these issues

@kaylareopelle
Copy link
Contributor

Update: The i18n gem has had two releases since this ticket was created. JRuby has also had a few releases and the originally linked PR is closed. Running the tests with JRuby 9.2.19.0 allowed the problematic test to pass without an issue. I believe this can be safely closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants