-
Notifications
You must be signed in to change notification settings - Fork 173
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
Mark Bugsnag frames as out of project #497
Merged
Merged
Changes from 13 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
1360276
Bugsnag frames InProject: Remove nilification of Bugsnag lib frames
Cawllec 60a8729
Bugsnag frames InProject: Update report spec frames
Cawllec 179f3be
Bugsnag frames InProject: Ensure correct frame is passed back
Cawllec a99e452
Bugsnag frame InProject: Allow non-top frame to be selected
Cawllec 02bf1c9
Bugsnag frames InProject: Add Bugsnag frames tests
Cawllec eb8ae62
Bugsnag frames InProject: Cleared up comments and tests
Cawllec 59af113
Merge branch 'master' into cawllec/in-project-bugsnag
Cawllec 9e14ecf
Bugsnag frames inproject: Updated maze tests
Cawllec 90594cf
Bugsnag frame inproject: Updates rails tests
Cawllec 07ea1bf
Bugsnag frames inproject: Updates to stackframe maze tests
Cawllec 25b5b94
Bugsnag frames in-project: Updated tests to better reflect new stackf…
Cawllec 0449c44
Bugsnag frames in-project: Accounted for JRUBY stackframes differing …
Cawllec 4c5ea1a
Bugsnag frames in-project: Separated notified strings tests out
Cawllec 3256f77
Bugsnag frames in-project: Make scenario names more explicit
Cawllec File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,33 +14,49 @@ Scenario Outline: Stack frames can be removed | |
And the request used the "Ruby Bugsnag Notifier" notifier | ||
And the request used payload v4 headers | ||
And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa" | ||
And the "file" of stack frame 0 equals "/usr/src/app/stack_frame_modification/initiators/<initiator>.rb" | ||
And the "file" of the top non-bugsnag stackframe equals "/usr/src/app/stack_frame_modification/initiators/<initiator>.rb" | ||
And the "lineNumber" of stack frame 0 equals <lineNumber> | ||
|
||
Examples: | ||
| ruby version | initiator | lineNumber | | ||
| 1.9.3 | handled_before_notify | 20 | | ||
| 1.9.3 | handled_block | 19 | | ||
| 1.9.3 | unhandled_before_notify | 21 | | ||
| 2.0 | handled_before_notify | 20 | | ||
| 2.0 | handled_block | 19 | | ||
| 2.0 | unhandled_before_notify | 21 | | ||
| 2.1 | handled_before_notify | 20 | | ||
| 2.1 | handled_block | 19 | | ||
| 2.1 | unhandled_before_notify | 21 | | ||
| 2.2 | handled_before_notify | 20 | | ||
| 2.2 | handled_block | 19 | | ||
| 2.2 | unhandled_before_notify | 21 | | ||
| 2.3 | handled_before_notify | 20 | | ||
| 2.3 | handled_block | 19 | | ||
| 2.3 | unhandled_before_notify | 21 | | ||
| 2.4 | handled_before_notify | 20 | | ||
| 2.4 | handled_block | 19 | | ||
| 2.4 | unhandled_before_notify | 21 | | ||
| 2.5 | handled_before_notify | 20 | | ||
| 2.5 | handled_block | 19 | | ||
| 2.5 | unhandled_before_notify | 21 | | ||
|
||
Scenario Outline: Stack frames can be removed | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Perhaps this |
||
Given I set environment variable "RUBY_VERSION" to "<ruby version>" | ||
And I set environment variable "CALLBACK_INITIATOR" to "handled_block" | ||
And I have built the service "plain-ruby" | ||
And I run the service "plain-ruby" with the command "bundle exec ruby stack_frame_modification/remove_stack_frame.rb" | ||
And I wait for 1 second | ||
Then I should receive a request | ||
And the request used the "Ruby Bugsnag Notifier" notifier | ||
And the request used payload v4 headers | ||
And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa" | ||
And the "file" of the top non-bugsnag stackframe equals "/usr/src/app/stack_frame_modification/initiators/handled_block.rb" | ||
And the "lineNumber" of the top non-bugsnag stackframe equals 19 | ||
|
||
Examples: | ||
| ruby version | | ||
| 1.9.3 | | ||
| 2.0 | | ||
| 2.1 | | ||
| 2.2 | | ||
| 2.3 | | ||
| 2.4 | | ||
| 2.5 | | ||
|
||
Scenario Outline: Stack frames can be marked as in project | ||
Given I set environment variable "RUBY_VERSION" to "<ruby version>" | ||
And I set environment variable "CALLBACK_INITIATOR" to "<initiator>" | ||
|
@@ -60,23 +76,42 @@ Scenario Outline: Stack frames can be marked as in project | |
Examples: | ||
| ruby version | initiator | | ||
| 1.9.3 | handled_before_notify | | ||
| 1.9.3 | handled_block | | ||
| 1.9.3 | unhandled_before_notify | | ||
| 2.0 | handled_before_notify | | ||
| 2.0 | handled_block | | ||
| 2.0 | unhandled_before_notify | | ||
| 2.1 | handled_before_notify | | ||
| 2.1 | handled_block | | ||
| 2.1 | unhandled_before_notify | | ||
| 2.2 | handled_before_notify | | ||
| 2.2 | handled_block | | ||
| 2.2 | unhandled_before_notify | | ||
| 2.3 | handled_before_notify | | ||
| 2.3 | handled_block | | ||
| 2.3 | unhandled_before_notify | | ||
| 2.4 | handled_before_notify | | ||
| 2.4 | handled_block | | ||
| 2.4 | unhandled_before_notify | | ||
| 2.5 | handled_before_notify | | ||
| 2.5 | handled_block | | ||
| 2.5 | unhandled_before_notify | | ||
| 2.5 | unhandled_before_notify | | ||
|
||
Scenario Outline: Stack frames can be marked as in project with a handled string | ||
Given I set environment variable "RUBY_VERSION" to "<ruby version>" | ||
And I set environment variable "CALLBACK_INITIATOR" to "handled_block" | ||
And I have built the service "plain-ruby" | ||
And I run the service "plain-ruby" with the command "bundle exec ruby stack_frame_modification/mark_frames_in_project.rb" | ||
And I wait for 1 second | ||
Then I should receive a request | ||
And the request used the "Ruby Bugsnag Notifier" notifier | ||
And the request used payload v4 headers | ||
And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa" | ||
And the "file" of the top non-bugsnag stackframe equals "/usr/src/app/stack_frame_modification/initiators/handled_block.rb" | ||
And the event "exceptions.0.stacktrace.0.inProject" is null | ||
And the event "exceptions.0.stacktrace.1.inProject" is true | ||
And the event "exceptions.0.stacktrace.2.inProject" is true | ||
And the event "exceptions.0.stacktrace.3.inProject" is true | ||
|
||
Examples: | ||
| ruby version | | ||
| 1.9.3 | | ||
| 2.0 | | ||
| 2.1 | | ||
| 2.2 | | ||
| 2.3 | | ||
| 2.4 | | ||
| 2.5 | |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
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.
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.
You should instead update the features to raise the exception so that bugsnag doesnt appear in the stacktrace
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.
This comment is still valid. The tests that dont need it should be set back to stack frame 0
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.
I've updated the scenarios to separate the tests that require this change and those that don't.