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

Regression in 4.8.2: ActiveJobs return nil even if they have a return value #1666

Closed
davidwessman opened this issue Jan 5, 2022 · 0 comments · Fixed by #1667
Closed

Regression in 4.8.2: ActiveJobs return nil even if they have a return value #1666

davidwessman opened this issue Jan 5, 2022 · 0 comments · Fixed by #1667

Comments

@davidwessman
Copy link

davidwessman commented Jan 5, 2022

Issue Description

When upgrading from 4.8.1 for sentry-{ruby, rails, sidekiq} to 4.8.2 all ActiveJob calls return nil.

I am not 100% sure why we have return values from these jobs and they are only used in tests.

Reproduction Steps

class SentryJob < ActiveJob::Base
  def perform
    "hello"
  end
end
require "test_helper"

class SentryJobTest < ActiveSupport::TestCase
  test "#perform" do
    value = SentryJob.perform_now
    assert_equal("hello", value)
  end
end

Expected Behavior

Should return the value from perform

Actual Behavior

Returns nil

Ruby Version

2.6.9

SDK Version

4.8.2

Integration and Its Version

  • sentry-rails 4.8.2
  • sentry-sidekiq 4.8.2
  • Rails 5.2.6

Sentry Config

SENTRY_FILTER = %i[password more_params]

Sentry.init do |config|
  config.environment = "appname"
  config.breadcrumbs_logger = [:active_support_logger, :http_logger]
  config.traces_sample_rate = 0.1
  config.propagate_traces = false

  filter = if Rails::VERSION::MAJOR >= 6
    # Rails 6
    ActiveSupport::ParameterFilter.new(
      SENTRY_FILTER
    )
  else
    # Rails 5
    ActionDispatch::Http::ParameterFilter.new(
      SENTRY_FILTER
    )
  end

  config.before_send = lambda do |event, hint|
    filter.filter(event.to_hash)
  end
end
@st0012 st0012 added this to To do in 4.x via automation Jan 5, 2022
@st0012 st0012 added this to the 4.9.0 milestone Jan 5, 2022
@st0012 st0012 moved this from To do to Done in 4.x Jan 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
4.x
  
Done
Development

Successfully merging a pull request may close this issue.

2 participants