Skip to content

Commit

Permalink
Merge pull request #172 from bugsnag/release-v1.5.0
Browse files Browse the repository at this point in the history
Release v1.5.0
  • Loading branch information
nickdowell authored Jul 6, 2022
2 parents 0f3d38e + 024c1f7 commit 79113b9
Show file tree
Hide file tree
Showing 25 changed files with 256 additions and 70 deletions.
24 changes: 12 additions & 12 deletions .buildkite/pipeline.full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ steps:
upload:
- "/Users/administrator/Library/Logs/Unreal Engine/LocalBuildLogs/*"
artifact_paths: [Build/Plugin/*.zip]
timeout_in_minutes: 30
timeout_in_minutes: 60
key: plugin_4_25

# UE 4.26
- label: 'Build Plugin - 4.26 Mac'
env:
UE_VERSION: "4.26"
DEVELOPER_DIR: "/Applications/Xcode13.app"
DEVELOPER_DIR: "/Applications/Xcode13.2.1.app"
commands:
- rm -rf "/Users/administrator/Library/Logs/Unreal Engine/LocalBuildLogs/*"
- make package
Expand All @@ -37,14 +37,14 @@ steps:
upload:
- "/Users/administrator/Library/Logs/Unreal Engine/LocalBuildLogs/*"
artifact_paths: [Build/Plugin/*.zip]
timeout_in_minutes: 30
timeout_in_minutes: 60
key: plugin_4_26

# UE 5.0
- label: 'Build Plugin - 5.0 Mac'
env:
UE_VERSION: "5.0"
DEVELOPER_DIR: "/Applications/Xcode13.app"
DEVELOPER_DIR: "/Applications/Xcode13.2.1.app"
commands:
- rm -rf "/Users/administrator/Library/Logs/Unreal Engine/LocalBuildLogs/*"
- make package
Expand All @@ -53,19 +53,19 @@ steps:
upload:
- "/Users/administrator/Library/Logs/Unreal Engine/LocalBuildLogs/*"
artifact_paths: [Build/Plugin/*.zip]
timeout_in_minutes: 30
timeout_in_minutes: 60
key: plugin_5_0

#
# Build Test Fixtures
#

# UE 5.0EA
# UE 5.0
- name: ':android: Build E2E - 5.0 Android'
depends_on: plugin_5_0
env:
UE_VERSION: "5.0"
DEVELOPER_DIR: "/Applications/Xcode13.app"
DEVELOPER_DIR: "/Applications/Xcode13.2.1.app"
plugins:
artifacts#v1.5.0:
download: Build/Plugin/Bugsnag-*-UE_5.0-macOS.zip
Expand All @@ -83,7 +83,7 @@ steps:
depends_on: plugin_5_0
env:
UE_VERSION: "5.0"
DEVELOPER_DIR: "/Applications/Xcode13.app"
DEVELOPER_DIR: "/Applications/Xcode13.2.1.app"
plugins:
artifacts#v1.5.0:
download: Build/Plugin/Bugsnag-*-UE_5.0-macOS.zip
Expand All @@ -101,7 +101,7 @@ steps:
depends_on: plugin_5_0
env:
UE_VERSION: "5.0"
DEVELOPER_DIR: "/Applications/Xcode13.app"
DEVELOPER_DIR: "/Applications/Xcode13.2.1.app"
plugins:
artifacts#v1.5.0:
download: Build/Plugin/Bugsnag-*-UE_5.0-macOS.zip
Expand Down Expand Up @@ -137,7 +137,7 @@ steps:
- "--device=ANDROID_11_0"
- "--farm=bs"
- "--order=random"
concurrency: 9
concurrency: 24
concurrency_group: browserstack-app
concurrency_method: eager
retry:
Expand All @@ -164,7 +164,7 @@ steps:
- "--device=ANDROID_11_0"
- "--farm=bs"
- "--order=random"
concurrency: 9
concurrency: 24
concurrency_group: browserstack-app
concurrency_method: eager
retry:
Expand All @@ -191,7 +191,7 @@ steps:
- "--device=IOS_14"
- "--farm=bs"
- "--order=random"
concurrency: 9
concurrency: 24
concurrency_group: browserstack-app
concurrency_method: eager
retry:
Expand Down
18 changes: 9 additions & 9 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ steps:
upload:
- "/Users/administrator/Library/Logs/Unreal Engine/LocalBuildLogs/*"
artifact_paths: [Build/Plugin/*.zip]
timeout_in_minutes: 30
timeout_in_minutes: 60
key: plugin_4_23

# UE 4.27
- label: 'Build Plugin - 4.27 Mac'
env:
UE_VERSION: "4.27"
DEVELOPER_DIR: "/Applications/Xcode13.app"
DEVELOPER_DIR: "/Applications/Xcode13.2.1.app"
commands:
- rm -rf "/Users/administrator/Library/Logs/Unreal Engine/LocalBuildLogs/*"
- make package
Expand All @@ -38,7 +38,7 @@ steps:
upload:
- "/Users/administrator/Library/Logs/Unreal Engine/LocalBuildLogs/*"
artifact_paths: [Build/Plugin/*.zip]
timeout_in_minutes: 30
timeout_in_minutes: 60
key: plugin_4_27

- label: 'Build Plugin - 4.27 Win'
Expand All @@ -48,7 +48,7 @@ steps:
UE_VERSION: "4.27"
command: build.bat
artifact_paths: [Bugsnag-*.zip]
timeout_in_minutes: 30
timeout_in_minutes: 60

#
# Build Test Fixtures
Expand All @@ -59,7 +59,7 @@ steps:
depends_on: plugin_4_27
env:
UE_VERSION: "4.27"
DEVELOPER_DIR: "/Applications/Xcode13.app"
DEVELOPER_DIR: "/Applications/Xcode13.2.1.app"
plugins:
artifacts#v1.5.0:
download: Build/Plugin/Bugsnag-*-UE_4.27-macOS.zip
Expand All @@ -77,7 +77,7 @@ steps:
depends_on: plugin_4_27
env:
UE_VERSION: "4.27"
DEVELOPER_DIR: "/Applications/Xcode13.app"
DEVELOPER_DIR: "/Applications/Xcode13.2.1.app"
plugins:
artifacts#v1.5.0:
download: Build/Plugin/Bugsnag-*-UE_4.27-macOS.zip
Expand All @@ -95,7 +95,7 @@ steps:
depends_on: plugin_4_27
env:
UE_VERSION: "4.27"
DEVELOPER_DIR: "/Applications/Xcode13.app"
DEVELOPER_DIR: "/Applications/Xcode13.2.1.app"
plugins:
artifacts#v1.5.0:
download: Build/Plugin/Bugsnag-*-UE_4.27-macOS.zip
Expand Down Expand Up @@ -131,7 +131,7 @@ steps:
- "--device=ANDROID_11_0"
- "--farm=bs"
- "--order=random"
concurrency: 9
concurrency: 24
concurrency_group: browserstack-app
concurrency_method: eager
retry:
Expand All @@ -158,7 +158,7 @@ steps:
- "--device=IOS_12"
- "--farm=bs"
- "--order=random"
concurrency: 9
concurrency: 24
concurrency_group: browserstack-app
concurrency_method: eager
retry:
Expand Down
10 changes: 10 additions & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,20 @@
"BSGJSON",
"Bugsnag",
"Expojs",
"FORCENOINLINE",
"GRHI",
"Gameplay",
"JNICALL",
"JNIEXPORT",
"LOCTEXT",
"Landroid",
"Lcom",
"Ljava",
"Memzero",
"Millis",
"NSJSON",
"Reactnativejs",
"Timespan",
"UCLASS",
"UENUM",
"UFUNCTION",
Expand All @@ -20,6 +28,7 @@
"checkf",
"clazz",
"cronut",
"jailbroken",
"jboolean",
"jbyte",
"jclass",
Expand All @@ -30,6 +39,7 @@
"jobject",
"jsize",
"ooms",
"symbolicate",
"uproject",
],
"ignorePaths": [
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ jobs:
- name: clang-format
run: find Source Plugins/Bugsnag/Source/Bugsnag features/fixtures/generic/Source -name '*.h' -o -name '*.cpp' | xargs /usr/bin/clang-format-12 --dry-run --Werror
- name: cspell
run: npm install -g cspell && cspell **/*.{cpp,h}
run: npm install -g cspell && cspell Plugins/Bugsnag/**/*.{cpp,h}
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
Changelog
=========

## 1.5.0 (2022-07-06)

* Adds the `Telemetry` configuration property.
* Updates the bugsnag-android dependency from v5.22.1 to [v5.24.0](https://github.com/bugsnag/bugsnag-android/blob/master/CHANGELOG.md#5240-2022-06-30)
* Updates the bugsnag-cocoa dependency from v6.16.8 to [v6.19.0](https://github.com/bugsnag/bugsnag-cocoa/blob/master/CHANGELOG.md#6190-2022-06-29)

## 1.4.0 (2022-05-11)

* Adds official support for Unreal Engine 5.0 🚀
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ format: ## format all c/c++ source to match .clang-format
.PHONY: lint
lint: ## check the project for formatting or spelling issues
find Source Plugins/Bugsnag/Source/Bugsnag features/fixtures/generic/Source -name '*.h' -o -name '*.cpp' | xargs clang-format --dry-run --Werror
cspell **/*.{cpp,h}
cspell Plugins/Bugsnag/**/*.{cpp,h}

#-------------------------------------------------------------------------------
# E2E test run
Expand Down
4 changes: 2 additions & 2 deletions Plugins/Bugsnag/Bugsnag.uplugin
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"FileVersion": 3,
"Version": 8,
"VersionName": "1.4.0",
"Version": 9,
"VersionName": "1.5.0",
"FriendlyName": "Bugsnag",
"Description": "Bugsnag is an error monitoring and application stability management solution.",
"Category": "Developer",
Expand Down
4 changes: 2 additions & 2 deletions Plugins/Bugsnag/Source/Bugsnag/Bugsnag_UPL.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@
<insertValue value="repository $S(PluginDir)/../ThirdParty/Android/lib"/>
<insertNewline/>
<insert>
com.bugsnag,bugsnag-plugin-android-unreal,1.4.0
com.bugsnag,bugsnag-android,5.22.1
com.bugsnag,bugsnag-plugin-android-unreal,1.5.0
com.bugsnag,bugsnag-android,5.24.0
</insert>
<insertNewline/>
</AARImports>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@ jobject FAndroidPlatformConfiguration::Parse(JNIEnv* Env,
jniCallWithObjects(Env, jConfig, Cache->ConfigSetMaxPersistedSessions, Config->GetMaxPersistedSessions());
jniCallWithObjects(Env, jConfig, Cache->ConfigSetMaxReportedThreads, Config->GetMaxReportedThreads());
jniCallWithBool(Env, jConfig, Cache->ConfigSetPersistUser, Config->GetPersistUser());

jobject jTelemetry = FAndroidPlatformJNI::ParseTelemetryTypeSet(Env, Cache, Config->GetTelemetry());
ReturnNullOnFail(jTelemetry);
jniCallWithObjects(Env, jConfig, Cache->ConfigSetTelemetry, jTelemetry);

if (Config->GetRedactedKeys().Num())
{
jniCallWithSet(Env, Cache, jConfig, Cache->ConfigSetRedactedKeys, Config->GetRedactedKeys());
Expand Down
38 changes: 29 additions & 9 deletions Plugins/Bugsnag/Source/Bugsnag/Private/Android/JNIUtilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ bool FAndroidPlatformJNI::LoadReferenceCache(JNIEnv* env, JNIReferenceCache* cac
CacheExternalJavaClass(env, cache->SessionClass, "com.bugsnag.android.Session");
CacheExternalJavaClass(env, cache->SeverityClass, "com.bugsnag.android.Severity");
CacheExternalJavaClass(env, cache->StackframeClass, "com.bugsnag.android.Stackframe");
CacheExternalJavaClass(env, cache->TelemetryClass, "com.bugsnag.android.Telemetry");
CacheExternalJavaClass(env, cache->ThreadClass, "com.bugsnag.android.Thread");
CacheExternalJavaClass(env, cache->UserClass, "com.bugsnag.android.User");
CacheExternalJavaClass(env, cache->EndpointConfigurationClass, "com.bugsnag.android.EndpointConfiguration");
Expand Down Expand Up @@ -200,6 +201,7 @@ bool FAndroidPlatformJNI::LoadReferenceCache(JNIEnv* env, JNIReferenceCache* cac
CacheInstanceJavaMethod(env, cache->ConfigSetReleaseStage, cache->ConfigClass, "setReleaseStage", "(Ljava/lang/String;)V");
CacheInstanceJavaMethod(env, cache->ConfigSetSendLaunchCrashesSynchronously, cache->ConfigClass, "setSendLaunchCrashesSynchronously", "(Z)V");
CacheInstanceJavaMethod(env, cache->ConfigSetSendThreads, cache->ConfigClass, "setSendThreads", "(Lcom/bugsnag/android/ThreadSendPolicy;)V");
CacheInstanceJavaMethod(env, cache->ConfigSetTelemetry, cache->ConfigClass, "setTelemetry", "(Ljava/util/Set;)V");
CacheInstanceJavaMethod(env, cache->ConfigSetUser, cache->ConfigClass, "setUser", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V");
CacheInstanceJavaMethod(env, cache->ConfigSetVersionCode, cache->ConfigClass, "setVersionCode", "(Ljava/lang/Integer;)V");

Expand Down Expand Up @@ -365,6 +367,7 @@ bool FAndroidPlatformJNI::LoadReferenceCache(JNIEnv* env, JNIReferenceCache* cac
CacheStaticJavaField(env, cache->BreadcrumbTypeUser, cache->BreadcrumbTypeClass, "USER", "Lcom/bugsnag/android/BreadcrumbType;");
CacheStaticJavaField(env, cache->ErrorTypeAndroid, cache->ErrorTypeClass, "ANDROID", "Lcom/bugsnag/android/ErrorType;");
CacheStaticJavaField(env, cache->ErrorTypeC, cache->ErrorTypeClass, "C", "Lcom/bugsnag/android/ErrorType;");
CacheStaticJavaField(env, cache->TelemetryInternalErrors, cache->TelemetryClass, "INTERNAL_ERRORS", "Lcom/bugsnag/android/Telemetry;");
CacheStaticJavaField(env, cache->ThreadSendPolicyAlways, cache->ThreadSendPolicyClass, "ALWAYS", "Lcom/bugsnag/android/ThreadSendPolicy;");
CacheStaticJavaField(env, cache->ThreadSendPolicyUnhandledOnly, cache->ThreadSendPolicyClass, "UNHANDLED_ONLY", "Lcom/bugsnag/android/ThreadSendPolicy;");
CacheStaticJavaField(env, cache->ThreadSendPolicyNever, cache->ThreadSendPolicyClass, "NEVER", "Lcom/bugsnag/android/ThreadSendPolicy;");
Expand Down Expand Up @@ -489,17 +492,18 @@ jobject FAndroidPlatformJNI::ParseJsonObject(JNIEnv* Env, const JNIReferenceCach
* Adds a value to a set if enabled
*
* @param Env A JNI environment for the current thread
* @param Cache the JNI reference cache
* @param ShouldAdd true if the value should be added
* @param TypeClass the enum class
* @param FieldName the name of the field to add to the set
*
* @return true if operation completed without error
*/
static bool addTypeToSet(JNIEnv* Env, jobject jSet, bool ShouldAdd, const JNIReferenceCache* Cache, jfieldID FieldName)
static bool addTypeToSet(JNIEnv* Env, const JNIReferenceCache* Cache, jobject jSet, bool ShouldAdd, jclass TypeClass, jfieldID FieldName)
{
if (ShouldAdd)
{
jobject jType = (*Env).GetStaticObjectField(Cache->BreadcrumbTypeClass, FieldName);
jobject jType = (*Env).GetStaticObjectField(TypeClass, FieldName);
if (FAndroidPlatformJNI::CheckAndClearException(Env))
{
return false;
Expand Down Expand Up @@ -551,13 +555,29 @@ jobject FAndroidPlatformJNI::ParseBreadcrumbTypeSet(JNIEnv* Env, const JNIRefere
{
return nullptr;
}
if (addTypeToSet(Env, jSet, EnumHasAllFlags(Value, EBugsnagEnabledBreadcrumbTypes::Error), Cache, Cache->BreadcrumbTypeError) &&
addTypeToSet(Env, jSet, EnumHasAllFlags(Value, EBugsnagEnabledBreadcrumbTypes::Log), Cache, Cache->BreadcrumbTypeLog) &&
addTypeToSet(Env, jSet, EnumHasAllFlags(Value, EBugsnagEnabledBreadcrumbTypes::Navigation), Cache, Cache->BreadcrumbTypeNavigation) &&
addTypeToSet(Env, jSet, EnumHasAllFlags(Value, EBugsnagEnabledBreadcrumbTypes::Process), Cache, Cache->BreadcrumbTypeProcess) &&
addTypeToSet(Env, jSet, EnumHasAllFlags(Value, EBugsnagEnabledBreadcrumbTypes::Request), Cache, Cache->BreadcrumbTypeRequest) &&
addTypeToSet(Env, jSet, EnumHasAllFlags(Value, EBugsnagEnabledBreadcrumbTypes::State), Cache, Cache->BreadcrumbTypeState) &&
addTypeToSet(Env, jSet, EnumHasAllFlags(Value, EBugsnagEnabledBreadcrumbTypes::User), Cache, Cache->BreadcrumbTypeUser))
jclass TypeClass = Cache->BreadcrumbTypeClass;
if (addTypeToSet(Env, Cache, jSet, EnumHasAllFlags(Value, EBugsnagEnabledBreadcrumbTypes::Error), TypeClass, Cache->BreadcrumbTypeError) &&
addTypeToSet(Env, Cache, jSet, EnumHasAllFlags(Value, EBugsnagEnabledBreadcrumbTypes::Log), TypeClass, Cache->BreadcrumbTypeLog) &&
addTypeToSet(Env, Cache, jSet, EnumHasAllFlags(Value, EBugsnagEnabledBreadcrumbTypes::Navigation), TypeClass, Cache->BreadcrumbTypeNavigation) &&
addTypeToSet(Env, Cache, jSet, EnumHasAllFlags(Value, EBugsnagEnabledBreadcrumbTypes::Process), TypeClass, Cache->BreadcrumbTypeProcess) &&
addTypeToSet(Env, Cache, jSet, EnumHasAllFlags(Value, EBugsnagEnabledBreadcrumbTypes::Request), TypeClass, Cache->BreadcrumbTypeRequest) &&
addTypeToSet(Env, Cache, jSet, EnumHasAllFlags(Value, EBugsnagEnabledBreadcrumbTypes::State), TypeClass, Cache->BreadcrumbTypeState) &&
addTypeToSet(Env, Cache, jSet, EnumHasAllFlags(Value, EBugsnagEnabledBreadcrumbTypes::User), TypeClass, Cache->BreadcrumbTypeUser))
{
return jSet;
}
return nullptr;
}

jobject FAndroidPlatformJNI::ParseTelemetryTypeSet(JNIEnv* Env, const JNIReferenceCache* Cache, const EBugsnagTelemetryTypes Value)
{
jobject jSet = Env->NewObject(Cache->HashSetClass, Cache->HashSetConstructor);
if (FAndroidPlatformJNI::CheckAndClearException(Env))
{
return nullptr;
}
jclass TypeClass = Cache->TelemetryClass;
if (addTypeToSet(Env, Cache, jSet, EnumHasAllFlags(Value, EBugsnagTelemetryTypes::InternalErrors), TypeClass, Cache->TelemetryInternalErrors))
{
return jSet;
}
Expand Down
Loading

0 comments on commit 79113b9

Please sign in to comment.