-
-
Notifications
You must be signed in to change notification settings - Fork 523
Don't let backtrace_cleanup_callback affect abs_path and separate filename handling
#2474
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
Conversation
backtrace_cleanup_callback affect abs_path and separate filename handling
|
NOTE: since this affects the payload and grouping, I explicitly tested that the old and new payloads end up in the same issue group and it seems fine since we are only changing the underlying |
acca59c to
7027718
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2474 +/- ##
=======================================
Coverage 98.17% 98.17%
=======================================
Files 128 128
Lines 4825 4833 +8
=======================================
+ Hits 4737 4745 +8
Misses 88 88
|
e513e20 to
d5ffd07
Compare
| _, file, number, _, method = ruby_match.to_a | ||
| file.sub!(/\.class$/, RB_EXTENSION) | ||
| _, abs_path, number, _, method = ruby_match.to_a | ||
| abs_path.sub!(/\.class$/, RB_EXTENSION) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the original file is now the abs_path and the file is computed if necessary later properly
d5ffd07 to
4a00256
Compare
At some point, rails added a [default gem filter to their `BacktraceCleaner`](https://github.com/rails/rails/blob/a8709e6ea26eca73a652af4fdd0a9f7db5352af4/activesupport/lib/active_support/backtrace_cleaner.rb#L118-L125) which messed up our linecache/context lines parsing logic since we get paths like ``` activesupport (7.1.2) lib/active_support/callbacks.rb ``` instead of raw paths. This PR cleans up handling this case by making a clear distinction between `abs_path` and `filename` as was intended in the original relay protocol and we were never populating these properly.
4a00256 to
2309e5b
Compare
|
Please hold off merging this, I think the cause may be at other places and thus require a different change. |
|
closed in favor of #2475 |



At some point, rails added a default gem filter to their
BacktraceCleanerwhich messed up our linecache/context lines parsing logic since we get paths likeinstead of raw paths.
This PR cleans up handling this case by making a clear distinction between
abs_pathandfilenameas was intended in the original relay protocol and we were never populating these properly.Fixes #2472