Skip to content

Commit

Permalink
Merge pull request #558 from bugsnag/next
Browse files Browse the repository at this point in the history
Release v7.0.0
  • Loading branch information
rich-bugsnag authored May 30, 2022
2 parents 718dec3 + 90d4b7d commit 66ea3ee
Show file tree
Hide file tree
Showing 30 changed files with 334 additions and 106 deletions.
22 changes: 12 additions & 10 deletions .buildkite/pipeline.full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ steps:
# Run macOS desktop tests
#
- label: Run MacOS e2e tests for Unity 2018
timeout_in_minutes: 30
timeout_in_minutes: 60
depends_on: 'cocoa-webgl-2018-fixtures'
agents:
queue: macos-12-arm-unity
Expand All @@ -89,7 +89,7 @@ steps:
- scripts/ci-run-macos-tests.sh

- label: Run MacOS e2e tests for Unity 2019
timeout_in_minutes: 30
timeout_in_minutes: 60
depends_on: 'cocoa-webgl-2019-fixtures'
agents:
queue: macos-12-arm-unity
Expand All @@ -106,7 +106,7 @@ steps:
- scripts/ci-run-macos-tests.sh

- label: Run MacOS e2e tests for Unity 2021
timeout_in_minutes: 30
timeout_in_minutes: 60
depends_on: 'cocoa-webgl-2021-fixtures'
agents:
queue: macos-12-arm-unity
Expand Down Expand Up @@ -285,7 +285,7 @@ steps:
- "--farm=bs"
- "--device=ANDROID_9_0"
- "features/android"
concurrency: 9
concurrency: 24
concurrency_group: browserstack-app
concurrency_method: eager

Expand All @@ -308,7 +308,7 @@ steps:
- "--farm=bs"
- "--device=ANDROID_9_0"
- "features/android"
concurrency: 9
concurrency: 24
concurrency_group: browserstack-app
concurrency_method: eager

Expand All @@ -333,7 +333,7 @@ steps:
- "--farm=bs"
- "--device=ANDROID_9_0"
- "features/android"
concurrency: 9
concurrency: 24
concurrency_group: browserstack-app
concurrency_method: eager

Expand All @@ -358,7 +358,7 @@ steps:
- "--farm=bs"
- "--device=ANDROID_9_0"
- "features/edm"
concurrency: 9
concurrency: 24
concurrency_group: browserstack-app
concurrency_method: eager

Expand Down Expand Up @@ -523,7 +523,7 @@ steps:
- "--device=IOS_14"
- "--fail-fast"
- "features/ios"
concurrency: 9
concurrency: 24
concurrency_group: browserstack-app
concurrency_method: eager

Expand All @@ -547,7 +547,7 @@ steps:
- "--device=IOS_14"
- "--fail-fast"
- "features/ios"
concurrency: 9
concurrency: 24
concurrency_group: browserstack-app
concurrency_method: eager

Expand All @@ -571,7 +571,7 @@ steps:
- "--device=IOS_14"
- "--fail-fast"
- "features/ios"
concurrency: 9
concurrency: 24
concurrency_group: browserstack-app
concurrency_method: eager

Expand Down Expand Up @@ -642,6 +642,7 @@ steps:
queue: opensource-windows-unity
env:
UNITY_VERSION: "2018.4.36f1"
WSLENV: "UNITY_VERSION"
command:
- scripts/ci-run-windows-tests.bat
artifact_paths:
Expand All @@ -654,6 +655,7 @@ steps:
queue: opensource-windows-unity
env:
UNITY_VERSION: "2019.4.35f1"
WSLENV: "UNITY_VERSION"
command:
- scripts/ci-run-windows-tests.bat
artifact_paths:
Expand Down
8 changes: 4 additions & 4 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ steps:
# Run desktop tests
#
- label: Run MacOS e2e tests for Unity 2020
timeout_in_minutes: 30
timeout_in_minutes: 60
depends_on: 'cocoa-webgl-2020-fixtures'
agents:
queue: macos-12-arm-unity
Expand Down Expand Up @@ -156,7 +156,7 @@ steps:
- "--farm=bs"
- "--device=ANDROID_9_0"
- "features/android"
concurrency: 9
concurrency: 24
concurrency_group: browserstack-app
concurrency_method: eager

Expand All @@ -181,7 +181,7 @@ steps:
- "--farm=bs"
- "--device=ANDROID_9_0"
- "features/edm"
concurrency: 9
concurrency: 24
concurrency_group: browserstack-app
concurrency_method: eager

Expand Down Expand Up @@ -254,7 +254,7 @@ steps:
- "--device=IOS_14"
- "--fail-fast"
- "features/ios"
concurrency: 9
concurrency: 24
concurrency_group: browserstack-app
concurrency_method: eager

Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Changelog

## 7.0.0 (2022-05-30)

This version contains **breaking** changes: some errors generated by the new version will no longer group in the Bugnsag dashboard with equivalent errors generated by older versions. This is due to the introduction of a new exception interceptor that gets passed the C# exception objects, rather than having to parse the information from Unity logs.

Please see the [upgrade guide](./UPGRADING.md) for details of all the changes and instructions on how to upgrade.

### Dependency updates

* Update bugsnag-android from v5.22.0 to [v5.22.4](https://github.com/bugsnag/bugsnag-android/blob/master/CHANGELOG.md#5224-2022-05-24)

* Update bugsnag-cocoa from v6.16.1 to [v6.17.1](https://github.com/bugsnag/bugsnag-cocoa/blob/master/CHANGELOG.md#6171-2022-05-18)

## 6.3.2 (2022-05-27)

### Bug fixes
Expand Down
19 changes: 19 additions & 0 deletions UPGRADING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,25 @@
Upgrading
=========

## 6.x to 7.x

When building using Unity 2019+, the Bugsnag SDK now uses a new method to intercept uncaught C# exceptions. This allows us access to the original exception object, meaning more accurate exception data and full support for inner exceptions.

This has slightly changed the format used for method names and signatures, which means that uncaught C# exceptions reported by `bugsnag-unity` V7+ will not group automatically in the Bugsnag dashboard with the equivalent exception reported by older versions of the library.

The impact of this will be that some errors will effectively be duplicated between older and newer versions of your app.

Handled errors and native crashes will maintain their existing groups and are not affected by this upgrade.

#### Deprecation summary

The following methods have been removed from the `Bugsnag` client:

`Bugsnag.SessionTracking;` Please see the [capturing sessions](https://docs.bugsnag.com/platforms/unity/capturing-sessions/) section of our documentation for details on working with sessions.

`Bugsnag.Send(IPayload payload);`


## 5.x to 6.x

### Key points
Expand Down
2 changes: 1 addition & 1 deletion bugsnag-android
Submodule bugsnag-android updated 100 files
2 changes: 1 addition & 1 deletion bugsnag-cocoa
Submodule bugsnag-cocoa updated 350 files
2 changes: 1 addition & 1 deletion build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ var target = Argument("target", "Default");
var solution = File("./BugsnagUnity.sln");
var configuration = Argument("configuration", "Release");
var project = File("./src/BugsnagUnity/BugsnagUnity.csproj");
var version = "6.3.2";
var version = "7.0.0";

Task("Restore-NuGet-Packages")
.Does(() => NuGetRestore(solution));
Expand Down
1 change: 0 additions & 1 deletion features/android/android_csharp_errors.feature
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ Feature: Android smoke tests for C# errors
# Stacktrace validation
And the error payload field "events.0.exceptions.0.stacktrace" is a non-empty array
And the event "exceptions.0.stacktrace.0.method" equals "MobileScenarioRunner.ThrowException()"
And the event "exceptions.0.stacktrace.0.file" is not null
And the event "exceptions.0.stacktrace.0.lineNumber" equals 0
And the error payload field "events.0.threads" is null

Expand Down
1 change: 0 additions & 1 deletion features/android/android_log_errors.feature
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ Feature: Android smoke tests for C# errors
# Stacktrace validation
And the error payload field "events.0.exceptions.0.stacktrace" is a non-empty array
And the event "exceptions.0.stacktrace.0.method" equals "MobileScenarioRunner.LogCaughtException()"
And the event "exceptions.0.stacktrace.0.file" is not null
And the event "exceptions.0.stacktrace.0.lineNumber" equals 0
And the error payload field "events.0.threads" is null

Expand Down
2 changes: 1 addition & 1 deletion features/android/android_persistence.feature
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Feature: Android event persistence tests

Scenario: Get Persisted event
When I run the "Persist" mobile scenario
And I wait for 4 seconds
Then I wait to receive a session
When I clear any error dialogue
And I relaunch the Unity mobile app
When I run the "throw Exception" mobile scenario
Expand Down
12 changes: 6 additions & 6 deletions features/desktop/handled_errors.feature
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ Feature: Handled Errors and Exceptions
And the event "unhandled" is false
And custom metadata is included in the event
And the stack frame methods should match:
| Main:DoLogUnthrown() |
| Main:RunScenario(String) |
| Main:Start() |
| Main:DoLogUnthrown() | Main.DoLogUnthrown() |
| Main:RunScenario(String) | Main.RunScenario(string scenario) |
| Main:Start() | Main.Start() |

Scenario: Logging an unthrown exception as unhandled
When I run the game in the "LogUnthrownAsUnhandled" state
Expand All @@ -121,9 +121,9 @@ Feature: Handled Errors and Exceptions
And the event "unhandled" is true
And custom metadata is included in the event
And the stack frame methods should match:
| Main:DebugLogException() |
| Main:RunScenario(String) |
| Main:Start() |
| Main:DebugLogException() | Main.DebugLogException() |
| Main:RunScenario(String) | Main.RunScenario(string scenario) |
| Main:Start() | Main.Start() |

@skip_webgl
Scenario: Logging a warning from a background thread to Bugsnag
Expand Down
37 changes: 23 additions & 14 deletions features/desktop/unhandled_errors.feature
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
Feature: Reporting unhandled events

@skip_unity_2018
Scenario: Reporting an inner exception
When I run the game in the "InnerException" state
And I wait to receive an error
Then the error is valid for the error reporting API sent by the Unity notifier
And the event "exceptions.0.message" equals "Outer"
And the event "exceptions.1.message" equals "Inner"
And the event "exceptions.2" is null

Scenario: Reporting an uncaught exception
When I run the game in the "UncaughtException" state
And I wait to receive an error
Expand All @@ -9,9 +18,9 @@ Feature: Reporting unhandled events
And the event "unhandled" is false
And custom metadata is included in the event
And the stack frame methods should match:
| Main.DoUnhandledException(Int64 counter) | Main.DoUnhandledException(System.Int64 counter) |
| Main.RunScenario(System.String scenario) | |
| Main.Start() | |
| Main.DoUnhandledException(Int64 counter) | Main.DoUnhandledException(System.Int64 counter) | Main.DoUnhandledException(long counter) |
| Main.RunScenario(System.String scenario) | Main.RunScenario(string scenario) | |
| Main.Start() | | |

@windows_only
Scenario: Windows device and app data
Expand All @@ -23,9 +32,9 @@ Feature: Reporting unhandled events
And the event "unhandled" is false
And custom metadata is included in the event
And the stack frame methods should match:
| Main.DoUnhandledException(Int64 counter) | Main.DoUnhandledException(System.Int64 counter) |
| Main.RunScenario(System.String scenario) | |
| Main.Start() | |
| Main.DoUnhandledException(Int64 counter) | Main.DoUnhandledException(System.Int64 counter) | Main.DoUnhandledException(long counter) |
| Main.RunScenario(System.String scenario) | Main.RunScenario(string scenario) ||
| Main.Start() |||


#device metadata
Expand Down Expand Up @@ -76,8 +85,8 @@ Feature: Reporting unhandled events
And the event "unhandled" is true
And custom metadata is included in the event
And the stack frame methods should match:
| Main.RunScenario(System.String scenario) |
| Main.Start() |
| Main.RunScenario(System.String scenario) | Main.RunScenario(string scenario) |
| Main.Start() ||

@webgl_only
Scenario: Forcing uncaught exceptions to be unhandled
Expand All @@ -89,9 +98,9 @@ Feature: Reporting unhandled events
And the event "unhandled" is true
And custom metadata is included in the event
And the stack frame methods should match:
| Main.ThrowException() |
| Main.RunScenario(System.String scenario) |
| Main.Start() |
| Main.ThrowException() ||
| Main.RunScenario(System.String scenario) | Main.RunScenario(string scenario) |
| Main.Start() ||

Scenario: Reporting an assertion failure
When I run the game in the "AssertionFailure" state
Expand All @@ -104,9 +113,9 @@ Feature: Reporting unhandled events
And the event "unhandled" is false
And custom metadata is included in the event
And the stack frame methods should match:
| Main.MakeAssertionFailure(Int32 counter) | Main.MakeAssertionFailure(System.Int32 counter) |
| Main.RunScenario(System.String scenario) | |
| Main.Start() | |
| Main.MakeAssertionFailure(Int32 counter) | Main.MakeAssertionFailure(System.Int32 counter) | Main.MakeAssertionFailure(int counter) |
| Main.RunScenario(System.String scenario) | Main.RunScenario(string scenario) ||
| Main.Start() | ||

@macos_only
Scenario: Reporting a native crash
Expand Down
9 changes: 9 additions & 0 deletions features/fixtures/maze_runner/Assets/Scripts/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -664,6 +664,9 @@ void RunScenario(string scenario)
case "ClearBugsnagCache":
ClearBugsnagCache();
break;
case "InnerException":
DoInnerException();
break;
case "NullBreadcrumbMessage":
Bugsnag.LeaveBreadcrumb(null);
Bugsnag.LeaveBreadcrumb("Not Null");
Expand All @@ -680,6 +683,12 @@ void RunScenario(string scenario)
}
}


private void DoInnerException()
{
throw new Exception("Outer",new Exception("Inner"));
}

private void NullBreadcrumbMetadataValue()
{
var foo = new Dictionary<string, object>()
Expand Down
Loading

0 comments on commit 66ea3ee

Please sign in to comment.