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

Sidekiq specs are broken on Ruby 3.2 #2602

Closed
ivoanjo opened this issue Feb 7, 2023 · 1 comment · Fixed by #2625
Closed

Sidekiq specs are broken on Ruby 3.2 #2602

ivoanjo opened this issue Feb 7, 2023 · 1 comment · Fixed by #2625
Labels
bug Involves a bug integrations Involves tracing integrations

Comments

@ivoanjo
Copy link
Member

ivoanjo commented Feb 7, 2023

Current behaviour:

In #2601 I needed to disable the sidekiq specs ( b8a028e ) as otherwise they were breaking in CI:

Failure/Error: expect(status && status.success?).to be(true), "STDOUT:`#{stdout}` STDERR:`#{stderr}"

  STDOUT:`2023-02-07T10:53:37.191Z pid=1804 tid=1dvz INFO: Booting Sidekiq 6.5.5 with Sidekiq::RedisConnection::RedisAdapter options {:url=>"redis://127.0.0.1:6379"}
  2023-02-07T10:53:37.194Z pid=1804 tid=1evg INFO: Running in ruby 3.2.0 (2022-12-25 revision a528908271) [x86_64-linux]
  2023-02-07T10:53:37.194Z pid=1804 tid=1evg INFO: See LICENSE and the LGPL-3.0 for licensing details.
  2023-02-07T10:53:37.195Z pid=1804 tid=1evg INFO: Upgrade to Sidekiq Pro for more features and support: https://sidekiq.org
  ` STDERR:`/usr/local/bundle/gems/sidekiq-6.5.5/lib/sidekiq/processor.rb:65: warning: global variable `$TESTING' not initialized
  /usr/local/bundle/gems/sidekiq-6.5.5/lib/sidekiq/launcher.rb:69: warning: global variable `$TESTING' not initialized
  /usr/local/bundle/gems/sidekiq-6.5.5/lib/sidekiq/cli.rb:18: warning: global variable `$TESTING' not initialized
  /app/spec/support/synchronization_helpers.rb:86:in `try_wait_until': Wait time exhausted! (RuntimeError)
  	from /app/spec/datadog/tracing/contrib/sidekiq/support/helper.rb:72:in `block in expect_in_sidekiq_server'
  	from /app/spec/support/synchronization_helpers.rb:20:in `block in expect_in_fork'
  	from /app/spec/support/synchronization_helpers.rb:15:in `fork'
  	from /app/spec/support/synchronization_helpers.rb:15:in `expect_in_fork'
  	from /app/spec/datadog/tracing/contrib/sidekiq/support/helper.rb:54:in `expect_in_sidekiq_server'
  	from /app/spec/datadog/tracing/contrib/sidekiq/server_internal_tracer/job_fetch_spec.rb:21:in `block (2 levels) in <top (required)>'
  	from /usr/local/bundle/gems/rspec-core-3.12.0/lib/rspec/core/example.rb:263:in `instance_exec'
  	from /usr/local/bundle/gems/rspec-core-3.12.0/lib/rspec/core/example.rb:263:in `block in run'
  	from /usr/local/bundle/gems/rspec-core-3.12.0/lib/rspec/core/example.rb:511:in `block in with_around_and_singleton_context_hooks'
  	from /usr/local/bundle/gems/rspec-core-3.12.0/lib/rspec/core/example.rb:468:in `block in with_around_example_hooks'
  	from /usr/local/bundle/gems/rspec-core-3.12.0/lib/rspec/core/hooks.rb:486:in `block in run'
  	from /usr/local/bundle/gems/rspec-core-3.12.0/lib/rspec/core/hooks.rb:626:in `block in run_around_example_hooks_for'
  	from /usr/local/bundle/gems/rspec-core-3.12.0/lib/rspec/core/example.rb:352:in `call'
  	from /app/spec/datadog/tracing/contrib/support/tracer_helpers.rb:96:in `block (2 levels) in <module:TracerHelpers>'
  	from /usr/local/bundle/gems/rspec-core-3.12.0/lib/rspec/core/example.rb:457:in `instance_exec'
  	from /usr/local/bundle/gems/rspec-core-3.12.0/lib/rspec/core/example.rb:457:in `instance_exec'
  	from /usr/local/bundle/gems/rspec-core-3.12.0/lib/rspec/core/hooks.rb:390:in `execute_with'
  	from /usr/local/bundle/gems/rspec-core-3.12.0/lib/rspec/core/hooks.rb:628:in `block (2 levels) in run_around_example_hooks_for'
  	from /usr/local/bundle/gems/rspec-core-3.12.0/lib/rspec/core/example.rb:352:in `call'
  	from /app/spec/spec_helper.rb:220:in `block (2 levels) in <top (required)>'
  	from /usr/local/bundle/gems/rspec-core-3.12.0/lib/rspec/core/example.rb:457:in `instance_exec'
  	from /usr/local/bundle/gems/rspec-core-3.12.0/lib/rspec/core/example.rb:457:in `instance_exec'
  	from /usr/local/bundle/gems/rspec-core-3.12.0/lib/rspec/core/hooks.rb:390:in `execute_with'
  	from /usr/local/bundle/gems/rspec-core-3.12.0/lib/rspec/core/hooks.rb:628:in `block (2 levels) in run_around_example_hooks_for'
  	from /usr/local/bundle/gems/rspec-core-3.12.0/lib/rspec/core/example.rb:352:in `call'
  	from /app/spec/spec_helper.rb:112:in `block (2 levels) in <top (required)>'
  	from /usr/local/bundle/gems/rspec-core-3.12.0/lib/rspec/core/example.rb:457:in `instance_exec'
  	from /usr/local/bundle/gems/rspec-core-3.12.0/lib/rspec/core/example.rb:457:in `instance_exec'
  	from /usr/local/bundle/gems/rspec-core-3.12.0/lib/rspec/core/hooks.rb:390:in `execute_with'
  	from /usr/local/bundle/gems/rspec-core-3.12.0/lib/rspec/core/hooks.rb:628:in `block (2 levels) in run_around_example_hooks_for'
  	from /usr/local/bundle/gems/rspec-core-3.12.0/lib/rspec/core/example.rb:352:in `call'
  	from /usr/local/bundle/gems/webmock-3.13.0/lib/webmock/rspec.rb:37:in `block (2 levels) in <top (required)>'
  	from /usr/local/bundle/gems/rspec-core-3.12.0/lib/rspec/core/example.rb:457:in `instance_exec'
  	from /usr/local/bundle/gems/rspec-core-3.12.0/lib/rspec/core/example.rb:457:in `instance_exec'
  	from /usr/local/bundle/gems/rspec-core-3.12.0/lib/rspec/core/hooks.rb:390:in `execute_with'
  	from /usr/local/bundle/gems/rspec-core-3.12.0/lib/rspec/core/hooks.rb:628:in `block (2 levels) in run_around_example_hooks_for'
  	from /usr/local/bundle/gems/rspec-core-3.12.0/lib/rspec/core/example.rb:352:in `call'
  	from /usr/local/bundle/gems/rspec-core-3.12.0/lib/rspec/core/hooks.rb:629:in `run_around_example_hooks_for'
  	from /usr/local/bundle/gems/rspec-core-3.12.0/lib/rspec/core/hooks.rb:486:in `run'
  	from /usr/local/bundle/gems/rspec-core-3.12.0/lib/rspec/core/example.rb:468:in `with_around_example_hooks'
  	from /usr/local/bundle/gems/rspec-core-3.12.0/lib/rspec/core/example.rb:511:in `with_around_and_singleton_context_hooks'
  	from /usr/local/bundle/gems/rspec-core-3.12.0/lib/rspec/core/example.rb:259:in `run'
  	from /usr/local/bundle/gems/rspec-core-3.12.0/lib/rspec/core/example_group.rb:646:in `block in run_examples'
  	from /usr/local/bundle/gems/rspec-core-3.12.0/lib/rspec/core/example_group.rb:642:in `map'
  	from /usr/local/bundle/gems/rspec-core-3.12.0/lib/rspec/core/example_group.rb:642:in `run_examples'
  	from /usr/local/bundle/gems/rspec-core-3.12.0/lib/rspec/core/example_group.rb:607:in `run'
  	from /usr/local/bundle/gems/rspec-core-3.12.0/lib/rspec/core/runner.rb:121:in `block (3 levels) in run_specs'
  	from /usr/local/bundle/gems/rspec-core-3.12.0/lib/rspec/core/runner.rb:121:in `map'
  	from /usr/local/bundle/gems/rspec-core-3.12.0/lib/rspec/core/runner.rb:121:in `block (2 levels) in run_specs'
  	from /usr/local/bundle/gems/rspec-core-3.12.0/lib/rspec/core/configuration.rb:2070:in `with_suite_hooks'
  	from /usr/local/bundle/gems/rspec-core-3.12.0/lib/rspec/core/runner.rb:116:in `block in run_specs'
  	from /usr/local/bundle/gems/rspec-core-3.12.0/lib/rspec/core/reporter.rb:74:in `report'
  	from /usr/local/bundle/gems/rspec-core-3.12.0/lib/rspec/core/runner.rb:115:in `run_specs'
  	from /usr/local/bundle/gems/rspec-core-3.12.0/lib/rspec/core/runner.rb:89:in `run'
  	from /usr/local/bundle/gems/rspec-core-3.12.0/lib/rspec/core/runner.rb:71:in `run'
  	from /usr/local/bundle/gems/rspec-core-3.12.0/lib/rspec/core/runner.rb:45:in `invoke'
  	from /usr/local/bundle/gems/rspec-core-3.12.0/exe/rspec:4:in `<main>'
./spec/support/synchronization_helpers.rb:8:in `block in expect_in_fork'
./spec/support/synchronization_helpers.rb:34:in `expect_in_fork'
./spec/datadog/tracing/contrib/sidekiq/support/helper.rb:54:in `expect_in_sidekiq_server'
./spec/datadog/tracing/contrib/sidekiq/server_internal_tracer/job_fetch_spec.rb:21:in `block (2 levels) in <top (required)>'
./spec/datadog/tracing/contrib/support/tracer_helpers.rb:96:in `block (2 levels) in <module:TracerHelpers>'
./spec/spec_helper.rb:220:in `block (2 levels) in <top (required)>'
./spec/spec_helper.rb:112:in `block (2 levels) in <top (required)>'
/usr/local/bundle/gems/webmock-3.13.0/lib/webmock/rspec.rb:37:in `block (2 levels) in <top (required)>'

Expected behaviour:

Sidekiq specs should work correctly on Ruby 3.2.

Steps to reproduce:

Revert b8a028e and run the sidekiq specs on 3.2.

How does ddtrace help you?:

Pays the bills? ;)

Environment:

  • ddtrace version: All versions supporting 3.2 are affected
  • Configuration block (Datadog.configure ...): N/A
  • Ruby version: 3.2
  • Operating system: Linux
  • Relevant library versions: N/A
@ivoanjo ivoanjo added bug Involves a bug community Was opened by a community member integrations Involves tracing integrations and removed community Was opened by a community member labels Feb 7, 2023
@TonyCTHsu
Copy link
Contributor

This should be fixed if sidekiq 6.5.8, which is already be done by #2615. I am opening a PR to enable it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Involves a bug integrations Involves tracing integrations
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants