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

feat: print async_handler class to the log "Ready for review" #1079

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

saiqulhaq
Copy link

Description of the change

Related to the issue #1075.
Example:

[Rollbar] Details: https://rollbar.com/instance/uuid?uuid=f70a781d-234b-41e4-bc1d-dedace740e5d (only available if report was successful). With async handler = Rollbar::Delay::SuckerPunch

Type of change

  • New feature (non-breaking change that adds functionality)

Development

  • Lint rules pass locally
  • The code changed/added as part of this pull request has been covered with tests
  • [] All tests related to the changed code pass in development

Code review

  • This pull request has a descriptive title and information useful to a reviewer. There may be a screenshot or screencast attached
  • "Ready for review" label attached to the PR and reviewers assigned
  • Issue from task tracker has a link to this pull request
  • Changes have been reviewed by at least one other engineer

@saiqulhaq
Copy link
Author

I got this when I run the RSpec command locally

image

and spec for Rollbar JS failed too

I'm not sure is it related to this PR

it "shows 'Rollbar::Delay::SuckerPunch' on the log" do
Rollbar.configure do |config|
config.use_sucker_punch
config.transmit = false
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I put transmit = false to skip Scheduled log

is it ok?

@@ -1863,6 +1893,16 @@ def backtrace
expect(thread.priority).to eq(custom_priority)
thread.join
end

it "shows 'Rollbar::Delay::Thread' on the log" do
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found that ActiveJob test does not exist on rollbar_spec
but it shouldn't be a problem I think

)
info_message = "[Rollbar] Details: #{uuid_url} (only available if report was successful)"
if configuration.async_handler
async_handler = configuration.async_handler.class == Class ? configuration.async_handler : configuration.async_handler.class
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if async_handler is a Proc, then it will print Proc

@waltjones
Copy link
Contributor

@saiqulhaq Looks good. When #1082 merges, you should be able to rebase to this PR and fix the CI issues. I didn't see anything like the Rollbar.js issue in your comment, but did fix the dependency that caused CI to fail on this PR.

@saiqulhaq
Copy link
Author

ok will do
thanks

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.

None yet

2 participants