Skip to content
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

Fix v5 tests #2791

Merged
merged 5 commits into from
Jan 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,6 @@ jobs:
-scheme RnDiffApp \
-destination 'platform=iOS Simulator,OS=${{ matrix.runtime }},name=${{ matrix.device }}' \
ONLY_ACTIVE_ARCH=yes \
-sdk 'iphonesimulator' \
-derivedDataPath "$derivedData" \
build

Expand Down Expand Up @@ -405,21 +404,20 @@ jobs:
strategy:
fail-fast: false # keeps matrix running if one fails
matrix:
rn-version: ['0.65.3', '0.70.6']
rn-version: ['0.65.3', '0.71.0']
rn-architecture: ['legacy', 'new']
platform: ['android', 'ios']
build-type: ['production']
include:
- platform: ios
runtime: '16.0'
runtime: 'latest'
device: 'iPhone 14'
# exclude all rn versions lower than 0.70.0 for new architecture
exclude:
- rn-version: '0.65.3'
rn-architecture: 'new'
env:
PLATFORM: ${{ matrix.platform }}
RUNTIME: ${{ matrix.runtime }}
DEVICE: ${{ matrix.device }}
steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -463,9 +461,8 @@ jobs:
-scheme WebDriverAgentRunner \
GCC_TREAT_WARNINGS_AS_ERRORS=0 \
COMPILER_INDEX_STORE_ENABLE=NO \
-destination 'platform=iOS Simulator,name=${{ matrix.device }}' \
-destination 'platform=iOS Simulator,OS=${{ matrix.runtime }},name=${{ matrix.device }}' \
ONLY_ACTIVE_ARCH=yes \
-sdk 'iphonesimulator${{ matrix.runtime }}' \
-derivedDataPath "$derivedData" \
build

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
"eslint-plugin-react": "^7.20.6",
"eslint-plugin-react-native": "^3.8.1",
"jest": "^29.3.1",
"jest-environment-jsdom": "^29.4.1",
"prettier": "^2.0.5",
"react": "18.2.0",
"react-native": "0.71.0",
Expand Down
3 changes: 3 additions & 0 deletions test/e2e/tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
"paths": {
"@sentry/react-native": [
"../../dist/js/index.js"
],
"react-native": [
"../../node_modules/react-native/index.js"
]
},
"types": [
Expand Down
2 changes: 1 addition & 1 deletion test/perf/metrics-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ startupTimeTest:

binarySizeTest:
diffMin: 200 KiB
diffMax: 400 KiB
diffMax: 600 KiB
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason for the increase?

Copy link
Member Author

@krystofwoldrich krystofwoldrich Jan 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tracked it down to this JS SDK upgrade. It seems to make both android and iOS bundles larger, but iOS was closer to the edge before so it broke.

I'm comparing this as the last one where it succeeded #2695 (cd7054e) and this 30307a0 as first where it failed.

It's hard to notice because often the metrics fail because of the start times flakiness. Sometimes both start times and sizes.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vaind would be fine for you? since you came up with the numbers

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2023-01-30 at 16 17 13

Here are the numbers before and after in one table for easier comparison.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@marandaneto @vaind Maybe we can solve the sizes in a new PR/Issue as the v4 with the JS SDK that likely caused this is out.

And this RP is blocking the new v5 alpha that I would like to push ASAP.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just going back to this I've missed that replay is part of browser now.

That clearly explains the difference.

https://github.com/getsentry/sentry-javascript/blob/d1934af091ce65ebd3ca7964d2f8e694fe2ef85a/CHANGELOG.md#L35

11 changes: 6 additions & 5 deletions test/touchevents.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ import type { SeverityLevel } from '@sentry/types';

import { TouchEventBoundary } from '../src/js/touchevents';

const addBreadcrumb = jest.spyOn(core, 'addBreadcrumb');
describe('TouchEventBoundary._onTouchStart', () => {
let addBreadcrumb: jest.SpyInstance;

afterEach(() => {
jest.resetAllMocks();
});
beforeEach(() => {
jest.resetAllMocks();
addBreadcrumb = jest.spyOn(core, 'addBreadcrumb');
});

describe('TouchEventBoundary._onTouchStart', () => {
it('tree without displayName or label is not logged', () => {
const { defaultProps } = TouchEventBoundary;
const boundary = new TouchEventBoundary(defaultProps);
Expand Down
Loading