Skip to content

Commit

Permalink
Merge 27f8052 into befcc51
Browse files Browse the repository at this point in the history
  • Loading branch information
marandaneto authored Oct 21, 2022
2 parents befcc51 + 27f8052 commit 1499093
Show file tree
Hide file tree
Showing 287 changed files with 34,857 additions and 1,213 deletions.
6 changes: 4 additions & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Ignore build generated dir
dist

# Ignore sample folder
# Ignore standalone apps
sample
sample-new-architecture
test/perf/TestApp*

# Ignore dangerfile
dangerfile.js
dangerfile.js
23 changes: 22 additions & 1 deletion .github/workflows/buildandtest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3

with:
node-version: 14
- uses: actions/cache@v3
id: cache
with:
Expand Down Expand Up @@ -42,12 +43,32 @@ jobs:
- name: Lint
run: yarn lint

job_lint_sample_new_arch:
name: Lint Sample
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
id: cache
with:
path: sample-new-architecture/node_modules
key: ${{ runner.os }}-${{ github.sha }}
- name: Install Dependencies
if: steps.cache.outputs['cache-hit'] != 'true'
run: yarn install
working-directory: sample-new-architecture
- name: Lint Sample
run: yarn lint
working-directory: sample-new-architecture

job_build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 14
- uses: actions/cache@v3
id: cache
with:
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/codegen.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Codegen

on:
push:
branches:
- main
- release/**
pull_request:

jobs:
codegen:
runs-on: ubuntu-latest
strategy:
matrix:
platform: ["android"] # "ios" will be added after codegen is fixed
include:
- platform: android
command: |
cd sample-new-architecture/android
./gradlew generateCodegenArtifactsFromSchema
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 14
- uses: actions/cache@v3
id: cache
with:
path: sample-new-architecture/node_modules
key: ${{ runner.os }}-${{ github.sha }}
- name: Install Dependencies
if: steps.cache.outputs['cache-hit'] != 'true'
run: |
cd sample-new-architecture
yarn install
- name: Codegen
run: ${{ matrix.command }}
100 changes: 100 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,3 +140,103 @@ jobs:
path: |
./sample/*.log
./sample/*.png
metrics:
runs-on: macos-latest
strategy:
# we want that the matrix keeps running, default is to cancel them if it fails.
fail-fast: false
matrix:
platform: ["ios", "android"]
include:
- platform: ios
name: iOS
appPlain: test/perf/test-app-plain.ipa
- platform: android
name: Android
appPlain: test/perf/TestAppPlain/android/app/build/outputs/apk/release/app-release.apk
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "14"
- uses: actions/setup-java@v3
with:
java-version: "11"
distribution: "adopt"
- name: Install Global Dependencies
run: yarn global add react-native-cli @sentry/cli yalc
- uses: actions/cache@v3
id: deps-cache
with:
path: |
node_modules
test/perf/TestAppSentry/node_modules
key: ${{ github.workflow }}-${{ github.job }}-${{ hashFiles('yarn.lock', 'test/perf/TestAppSentry/yarn.lock') }}
- name: Install Dependencies
if: steps.deps-cache.outputs['cache-hit'] != 'true'
run: yarn install
- name: Build SDK
run: yarn build
- name: Package SDK
run: yalc publish
- uses: actions/setup-node@v3
with:
node-version: "16"
- uses: actions/cache@v3
id: app-plain-cache
with:
path: ${{ matrix.appPlain }}
key: ${{ github.workflow }}-${{ github.job }}-appplain-${{ hashFiles('test/perf/TestAppPlain/**') }}
- name: Build app plain
if: steps.app-plain-cache.outputs['cache-hit'] != 'true'
working-directory: ./test/perf/TestAppPlain
run: |
yarn install
cd ${{ matrix.platform }}
if [[ "${{ matrix.platform }}" == "android" ]]; then
./gradlew assembleRelease
else
pod install
cd ../..
fastlane build_perf_test_app_plain
fi
env:
APP_STORE_CONNECT_KEY_ID: ${{ secrets.APP_STORE_CONNECT_KEY_ID }}
APP_STORE_CONNECT_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_ISSUER_ID }}
APP_STORE_CONNECT_KEY: ${{ secrets.APP_STORE_CONNECT_KEY }}
FASTLANE_KEYCHAIN_PASSWORD: ${{ secrets.FASTLANE_KEYCHAIN_PASSWORD }}
MATCH_GIT_PRIVATE_KEY: ${{ secrets.MATCH_GIT_PRIVATE_KEY }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
MATCH_USERNAME: ${{ secrets.MATCH_USERNAME }}
- name: Build app with Sentry
working-directory: ./test/perf/TestAppSentry
run: |
yalc add @sentry/react-native
yarn install
cd ${{ matrix.platform }}
if [[ "${{ matrix.platform }}" == "android" ]]; then
./gradlew assembleRelease
else
pod install
cd ../..
fastlane build_perf_test_app_sentry
cd TestAppSentry
fi
# Remove after build so that the cache isn't invaldiated due to the changes in yarn.lock.
yarn remove @sentry/react-native
env:
APP_STORE_CONNECT_KEY_ID: ${{ secrets.APP_STORE_CONNECT_KEY_ID }}
APP_STORE_CONNECT_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_ISSUER_ID }}
APP_STORE_CONNECT_KEY: ${{ secrets.APP_STORE_CONNECT_KEY }}
FASTLANE_KEYCHAIN_PASSWORD: ${{ secrets.FASTLANE_KEYCHAIN_PASSWORD }}
MATCH_GIT_PRIVATE_KEY: ${{ secrets.MATCH_GIT_PRIVATE_KEY }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
MATCH_USERNAME: ${{ secrets.MATCH_USERNAME }}
- name: Collect apps metrics
uses: getsentry/action-app-sdk-overhead-metrics@v1
with:
name: ${{ matrix.name }}
config: ./test/perf/metrics-${{ matrix.platform }}.yml
sauce-user: ${{ secrets.SAUCE_USERNAME }}
sauce-key: ${{ secrets.SAUCE_ACCESS_KEY }}
6 changes: 5 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@ on:
force:
description: Force a release even when there are release-blockers (optional)
required: false
merge_target:
description: Target branch to merge into. Uses the default branch as a fallback (optional)
required: false

jobs:
job_release:
runs-on: ubuntu-latest
name: 'Release a new version'
name: "Release a new version"
steps:
- name: Check out current commit (${{ github.sha }})
uses: actions/checkout@v3
Expand All @@ -28,3 +31,4 @@ jobs:
with:
version: ${{ github.event.inputs.version }}
force: ${{ github.event.inputs.force }}
merge_target: ${{ github.event.inputs.merge_target }}
69 changes: 69 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,29 @@

## Unreleased

### Features

- Send react native js engine, turbo module, fabric flags and component stack in Event contexts ([#2552](https://github.com/getsentry/sentry-react-native/pull/2552))

### Dependencies

- Bump CLI from v1.74.4 to v2.7.0 ([#2457](https://github.com/getsentry/sentry-react-native/pull/2457))
- [changelog](https://github.com/getsentry/sentry-cli/blob/master/CHANGELOG.md#270)
- [diff](https://github.com/getsentry/sentry-cli/compare/1.74.4...2.7.0)

## 5.0.0-alpha.6

- Latest changes from 4.6.1

### Features

- Add initial support for the RN New Architecture, backwards compatible RNSentry Turbo Module ([#2522](https://github.com/getsentry/sentry-react-native/pull/2522))

### Breaking changes

- New ReactNativeTracingOptions idleTimeoutMs and finalTimeoutMs replacing idleTimeout and maxTransactionDuration respectively ([#2481](https://github.com/getsentry/sentry-react-native/pull/2481))
- iOS min target 12.4, Android API min 21, min React Native version 0.70 ([#2522](https://github.com/getsentry/sentry-react-native/pull/2522))

### Dependencies

- Bump Android SDK from v6.4.3 to v6.5.0 ([#2535](https://github.com/getsentry/sentry-react-native/pull/2535))
Expand Down Expand Up @@ -34,6 +57,24 @@
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#643)
- [diff](https://github.com/getsentry/sentry-java/compare/6.4.2...6.4.3)

## 5.0.0-alpha.5

### Fixes

- Make `configureScope` callback safe [#2510](https://github.com/getsentry/sentry-react-native/pull/2510)

### Dependencies

- Bump JavaScript SDK from v7.14.0 to v7.14.1 ([#2511](https://github.com/getsentry/sentry-react-native/pull/2511))
- [changelog](https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md#7141)
- [diff](https://github.com/getsentry/sentry-javascript/compare/7.14.0...7.14.1)
- Bump Cocoa SDK from v7.27.0 to v7.27.1 ([#2521](https://github.com/getsentry/sentry-react-native/pull/2521))
- [changelog](https://github.com/getsentry/sentry-cocoa/blob/master/CHANGELOG.md#7271)
- [diff](https://github.com/getsentry/sentry-cocoa/compare/7.27.0...7.27.1)
- Bump Android SDK from v6.4.2 to v6.4.3 ([#2520](https://github.com/getsentry/sentry-react-native/pull/2520))
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#643)
- [diff](https://github.com/getsentry/sentry-java/compare/6.4.2...6.4.3)

## 4.6.0

### Fixes
Expand All @@ -58,6 +99,14 @@
- [changelog](https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md#7140)
- [diff](https://github.com/getsentry/sentry-javascript/compare/7.13.0...7.14.0)

## 5.0.0-alpha.4

- Latest changes from 4.5.0

### Breaking changes

- New ReactNativeTracingOptions idleTimeoutMs and finalTimeoutMs replacing idleTimeout and maxTransactionDuration respectively ([#2481](https://github.com/getsentry/sentry-react-native/pull/2481))

## 4.5.0

### Features
Expand Down Expand Up @@ -98,6 +147,16 @@
- [changelog](https://github.com/getsentry/sentry-cocoa/blob/master/CHANGELOG.md#7251)
- [diff](https://github.com/getsentry/sentry-cocoa/compare/7.24.1...7.25.1)

## 5.0.0-alpha.3

- Latest changes from 4.3.x

### Dependencies

- Bump Wizard from v2.0.0 to v2.2.0 ([#2460](https://github.com/getsentry/sentry-react-native/pull/2460))
- [changelog](https://github.com/getsentry/sentry-wizard/blob/master/CHANGELOG.md#v220)
- [diff](https://github.com/getsentry/sentry-wizard/compare/v2.0.0...v2.2.0)

## 4.3.0

### Features
Expand All @@ -122,6 +181,16 @@

- ReactNativeTracing wrongly marks transactions as deadline_exceeded when it reaches the idleTimeout ([#2427](https://github.com/getsentry/sentry-react-native/pull/2427))

## 5.0.0-alpha.2

- Latest changes from 4.2.x

## 5.0.0-alpha.1

### Fixes

- Auto linking for RN >= 0.69 ([#2332](https://github.com/getsentry/sentry-react-native/pull/2332))

## 4.2.3

### Fixes
Expand Down
42 changes: 31 additions & 11 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,24 +42,44 @@ yarn test:watch
Now we can go into the sample project, install and build it:

```sh
cd sample/
cd sample-new-architecture/
yarn

# Build iOS
cd ios
pod install
cd ..
```

You can optionally start the Metro bundler if you want to control where it runs:
### Run the emulators (legacy-architecture):

For android switch `newArchEnabled` to `false` in [android/gradle.properties](https://github.com/getsentry/sentry-react-native/blob/c95aa21497ca93aaaaf0b44d170dc39dc7bcf660/sample-new-architecture/android/gradle.properties#L40). For iOS explicitly disable fabric in `sample-new-architecture/ios/Podfile` by setting `:fabric_enabled => false` before `pod install`.

```sh
yarn start --reset-cache
yarn pod-install-legacy
yarn run-ios

yarn run-android

# Release builds
yarn pod-install-legacy-production
yarn run-ios --configuration Release

yarn run-android --variant=release
```

Run the emulators:
### Run the emulators (new-architecture):
```sh
yarn pod-install
yarn run-ios

yarn run-android

# Release builds
yarn pod-install-production
yarn run-ios --configuration Release

yarn run-android --variant=release
```

### Optional
You can optionally start the Metro bundler if you want to control where it runs:

```sh
yarn react-native run-ios
yarn react-native run-android
yarn start --reset-cache
```
Loading

0 comments on commit 1499093

Please sign in to comment.