Handle empty backtrace from external filter#696
Closed
iNecas wants to merge 1 commit intominitest:masterfrom
Closed
Handle empty backtrace from external filter#696iNecas wants to merge 1 commit intominitest:masterfrom
iNecas wants to merge 1 commit intominitest:masterfrom
Conversation
In the wild the backtrace_filter can be set by external filter (Rails do it for their silencer). This can lead to the case there the external backtrace_filer returns empty array. Other parts of minitest count on the fact that there will still be something in the backtrace to use, and can lead to issues such as "undefined method `split' for nil:NilClass" when producing deprecation warnings. Since we already had the logic to use all the backtrace when filtering too much, I've moved this logic to be used also for external filters.
dLobatog
added a commit
to dLobatog/katello
that referenced
this pull request
Jun 2, 2017
Due to a bug on minitest that is being currently fixed, our tests are broken when they run as the "test_develop_pr_katello" job in Jenkins. The fix is published as minitest/minitest#696 however there is no version of minitest with it yet. A possible workaround is to prevent these assertions like this PR does.
jlsherrill
pushed a commit
to Katello/katello
that referenced
this pull request
Jun 5, 2017
Due to a bug on minitest that is being currently fixed, our tests are broken when they run as the "test_develop_pr_katello" job in Jenkins. The fix is published as minitest/minitest#696 however there is no version of minitest with it yet. A possible workaround is to prevent these assertions like this PR does.
|
By rails/rails#29572 and upgrading Rails from 5.1.2 -> 5.1.3, I hit an error ( |
rickhull
suggested changes
Oct 13, 2017
|
seeing this as seemingly just a side effect of Rails (5.2.3) being loaded. No application code setting a custom backtrace filter or anything like that. Checking the value of |
Collaborator
|
Either another version of this was done independently or this PR made it in and was never closed properly. Closing. Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In the wild the backtrace_filter can be set by external filter (Rails do
it for their silencer). This can lead to the case there the external
backtrace_filer returns empty array. Other parts of minitest count on
the fact that there will still be something in the backtrace to use, and
can lead to issues such as "undefined method `split' for nil:NilClass"
when producing deprecation warnings.
Since we already had the logic to use all the backtrace when filtering
too much, I've moved this logic to be used also for external filters.