Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into armcknight/feat(user-…
Browse files Browse the repository at this point in the history
…feedback)/widget
  • Loading branch information
armcknight committed Oct 15, 2024
2 parents 22490e0 + dfde71c commit 647740a
Show file tree
Hide file tree
Showing 185 changed files with 2,559 additions and 3,419 deletions.
2 changes: 1 addition & 1 deletion .github/last-release-runid
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10958820944
11345222588
20 changes: 15 additions & 5 deletions .github/workflows/benchmarking.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ on:
- '.sauce/benchmarking-config.yml'
- 'fastlane/**'
- 'scripts/ci-select-xcode.sh'
- 'scripts/build-xcframework.sh'

# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
concurrency:
Expand All @@ -28,7 +29,7 @@ jobs:
runs-on: macos-13
steps:
- uses: actions/checkout@v4
- run: ./scripts/ci-select-xcode.sh
- run: ./scripts/ci-select-xcode.sh 15.2
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
Expand Down Expand Up @@ -91,7 +92,7 @@ jobs:
- uses: actions/download-artifact@v4
with:
name: DerivedData-Xcode
- run: npm install -g saucectl@0.173.2
- run: npm install -g saucectl@0.186.0
- name: Run Benchmarks in SauceLab
env:
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
Expand All @@ -100,11 +101,11 @@ jobs:

app-metrics:
name: Collect app metrics
runs-on: macos-13
runs-on: macos-13-xlarge
steps:
- name: Git checkout
uses: actions/checkout@v4
- run: ./scripts/ci-select-xcode.sh
- run: ./scripts/ci-select-xcode.sh 15.2
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
Expand All @@ -125,7 +126,16 @@ jobs:
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
MATCH_USERNAME: ${{ secrets.MATCH_USERNAME }}
- name: Build Framework
run: make build-xcframework
run: ./scripts/build-xcframework.sh iOSOnly

- name: Archive build log if failed
uses: actions/upload-artifact@v4
if: ${{ failure() || cancelled() }}
with:
name: raw-build-output-build-xcframework
path: |
build-xcframework.log
- name: Build test app with sentry
run: bundle exec fastlane build_perf_test_app_sentry
env:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ jobs:
# We don't upload codecov for scheduled runs as CodeCov only accepts a limited amount of uploads per commit.
- name: Push code coverage to codecov
id: codecov_1
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # pin@v4.5.0
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # pin@v4.6.0
if: ${{ contains(matrix.platform, 'iOS') && !contains(github.ref, 'release') && github.event.schedule == '' }}
with:
# Although public repos should not have to specify a token there seems to be a bug with the Codecov GH action, which can
Expand All @@ -215,7 +215,7 @@ jobs:
# Sometimes codecov uploads etc can fail. Retry one time to rule out e.g. intermittent network failures.
- name: Push code coverage to codecov
id: codecov_2
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # pin@v4.5.0
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # pin@v4.6.0
if: ${{ steps.codecov_1.outcome == 'failure' && contains(matrix.platform, 'iOS') && !contains(github.ref, 'release') && github.event.schedule == '' }}
with:
token: ${{ secrets.CODECOV_TOKEN }}
Expand Down
103 changes: 103 additions & 0 deletions .github/workflows/ui-tests-critical.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
name: UI Tests Critical
on:
push:
branches:
- main

pull_request:
paths:
- 'Sources/**'
- '.github/workflows/ui-tests-critical.yml'
- 'fastlane/**'
- 'TestSamples/**'

# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
build-sample:
name: Build SwiftUITestSample Sample
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- run: ./scripts/ci-select-xcode.sh 16
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- run: bundle exec fastlane build_ios_swift_ui_test_sample
- uses: actions/upload-artifact@v4
with:
name: SwiftUITestSample
path: TestSamples/SwiftUITestSample/DerivedData/Build/Products/Debug-iphonesimulator/SwiftUITestSample.app

run-tests:
name: Test iOS ${{matrix.os-version}} on ${{matrix.device}} Simulator
needs: [build-sample]
runs-on: ${{matrix.runs-on}}
env:
APP_ARTIFACT_NAME: "SwiftUITestSample"
APP_PATH: "Sample.app"

MAESTRO_FLOWS_PATH: "TestSamples/SwiftUITestSample/Maestro"
MAESTRO_LOGS_PATH: "MaestroLogs"

# https://github.com/facebook/react-native/blob/24e7f7d25629a7af6d877a0b79fed2faaab96437/.github/actions/maestro-ios/action.yml#L57
MAESTRO_DRIVER_STARTUP_TIMEOUT: 1500000 # 25 min, CI can be slow at times
strategy:
fail-fast: false
matrix:
include:
- runs-on: macos-12
xcode: "13.4.1"
device: "iPhone 8"
os-version: "15.5"
create-simulator: true
- runs-on: macos-13
xcode: "14.3.1"
device: "iPhone 14"
os-version: "16.4"
create-simulator: true
- runs-on: macos-14-xlarge
# on macos-14 the iOS 17.5 simulator was unstable
# crashing and failing all UI tests
# iOS 15.5, 16.4 and 18.1 worked on the base runners
xcode: "15.4"
device: "iPhone 15"
os-version: "17.5"
- runs-on: macos-15
xcode: "16"
device: "iPhone 16"
os-version: "18.1"

steps:
- uses: actions/checkout@v4
- name: Create ${{matrix.device}} (${{matrix.os-version}}) Simulator using Xcode ${{matrix.xcode}}
if: ${{matrix.create-simulator}}
run: ./scripts/create-simulator.sh "${{matrix.xcode}}" "${{matrix.os-version}}" "${{matrix.device}}"
- name: Install Maestro
run: brew tap mobile-dev-inc/tap && brew install mobile-dev-inc/tap/maestro@1.38
- name: Install iDB Companion
run: brew tap facebook/fb && brew install facebook/fb/idb-companion

- uses: actions/download-artifact@v4
with:
name: ${{env.APP_ARTIFACT_NAME}}
path: ${{env.APP_PATH}}
- uses: futureware-tech/simulator-action@bfa03d93ec9de6dacb0c5553bbf8da8afc6c2ee9 # pin@v3
with:
model: ${{matrix.device}}
os_version: ${{matrix.os-version}}
- name: Run Maestro Flows
run: |
xcrun simctl install booted ${{env.APP_PATH}}
maestro test ${{env.MAESTRO_FLOWS_PATH}} --format junit --debug-output ${{env.MAESTRO_LOGS_PATH}}
- name: Store Maestro Logs
uses: actions/upload-artifact@v4
if: failure()
with:
name: maestro-logs-${{matrix.device}}-${{matrix.os-version}}
path: ${{env.MAESTRO_LOGS_PATH}}
10 changes: 5 additions & 5 deletions .github/workflows/ui-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ jobs:
path: |
~/Library/Logs/scan/*.log
./fastlane/test_output/**
ios-swift-ui-tests:
name: iOS-Swift UI Tests ${{matrix.device}}
ui-tests-swift:
name: UI Tests for iOS-Swift ${{matrix.device}} Simulator
runs-on: ${{matrix.runs-on}}
strategy:
fail-fast: false
Expand All @@ -105,10 +105,10 @@ jobs:

- name: Create iOS 16.4 simulator
if: ${{ matrix.device == 'iPhone 14 (16.4)' }}
run: ./scripts/create-simulator.sh 14.3.1 16.4 16-4
run: ./scripts/create-simulator.sh 14.3.1 16.4 "iPhone 14"

- name: Run Fastlane
run: fastlane ui_tests_ios_swift device:"${{matrix.device}}"
run: fastlane ui_tests_ios_swift device:"${{matrix.device}}"

- name: Archiving Raw Test Logs
uses: actions/upload-artifact@v4
Expand Down
7 changes: 4 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ repos:
fail_fast: true
args:
- "check-versions"

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
Expand All @@ -20,6 +20,7 @@ repos:
- id: check-symlinks
- id: check-xml
- id: check-yaml
args: [--allow-multiple-documents]
- id: detect-private-key
- id: end-of-file-fixer
- id: no-commit-to-branch
Expand All @@ -30,7 +31,7 @@ repos:
- id: check-github-actions
- id: check-github-workflows
args: [--verbose]

- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.10.0.1
hooks:
Expand All @@ -45,7 +46,7 @@ repos:
types_or: ["objective-c", "objective-c++", "c", "c++"]
args:
- "format-clang"

- id: format-swift
name: Format Swift
entry: make
Expand Down
4 changes: 4 additions & 0 deletions Brewfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ brew 'rbenv'
brew 'pre-commit'
brew 'python3'
brew 'jq'
tap 'facebook/fb'
brew 'facebook/fb/idb-companion'
tap 'mobile-dev-inc/tap'
brew 'mobile-dev-inc/tap/maestro'
16 changes: 16 additions & 0 deletions Brewfile.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,22 @@
}
}
}
},
"facebook/fb/idb-companion": {
"version": "1.1.8",
"bottle": false
},
"mobile-dev-inc/tap/maestro": {
"version": "1.38.1",
"bottle": false
}
},
"tap": {
"facebook/fb": {
"revision": "c0386793f59da10c619787f2aa18d938ef1d69c9"
},
"mobile-dev-inc/tap": {
"revision": "14a5d2ab054e7829e8028e827d35a2cc3156a4a0"
}
}
},
Expand Down
86 changes: 86 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,105 @@

### Features

- feat: API to manually start/stop Session Replay (#4414)
- Custom redact modifier for SwiftUI (#4362, #4392)

### Removal of Experimental API

- Remove the deprecated experimental Metrics API (#4406): [Learn more](https://sentry.zendesk.com/hc/en-us/articles/26369339769883-Metrics-Beta-Coming-to-an-End)

### Fixes

- Edge case for swizzleClassNameExclude (#4405): Skip creating transactions for UIViewControllers ignored for swizzling
via the option `swizzleClassNameExclude`.
- Add TTID/TTFD spans when loadView gets skipped (#4415)
- Finish TTID correctly when viewWillAppear is skipped (#4417)
- Swizzling RootUIViewController if ignored by `swizzleClassNameExclude` (#4407)
- Data race in SentrySwizzleInfo.originalCalled (#4434)
- Thread running at user-initiated quality-of-service for session replay (#4439)


### Improvements

- Serializing profile on a BG Thread (#4377) to avoid potentially slightly blocking the main thread.
- Session Replay performance for SwiftUI (#4419)
- Speed up getBinaryImages (#4435) for finishing transactions and capturing events
- Use UInts in envelope deserialization (#4441)

## 8.38.0

### Features

- Added breadcrumb.origin private field (#4358)
- Custom redact modifier for SwiftUI (#4362)
- AppHangV2 detection (#4379) Add a new algorithm for detecting app hangs that differentiates between fully blocking and non-fully blocking app hangs. Read more in-depth in our [docs](https://docs.sentry.io/platforms/apple/guides/ios/configuration/app-hangs/#app-hangs-v2).
- Add support for arm64e (#3398)
- Add mergeable libraries support to dynamic libraries (#4381)

### Improvements

- Speed up HTTP tracking for multiple requests in parallel (#4366)
- Slightly speed up SentryInAppLogic (#4370)
- Rename session replay `redact` options and APIs to `mask` (#4373)
- Stop canceling timer for manual transactions (#4380)

### Fixes

- Fix the versioning to support app release with Beta versions (#4368)
- Linking ongoing trace to crash event (#4393)
- Edge case for swizzleClassNameExclude (#4405)

## 8.38.0-beta.1

### Features

- Added breadcrumb.origin private field (#4358)
- Custom redact modifier for SwiftUI (#4362)
- AppHangV2 detection (#4379) Add a new algorithm for detecting app hangs that differentiates between fully blocking and non-fully blocking app hangs. Read more in-depth in our [docs](https://docs.sentry.io/platforms/apple/guides/ios/configuration/app-hangs/#app-hangs-v2).
- Add support for arm64e (#3398)
- Add mergeable libraries support to dynamic libraries (#4381)

### Improvements

- Speed up HTTP tracking for multiple requests in parallel (#4366)
- Slightly speed up SentryInAppLogic (#4370)
- Rename session replay `redact` options and APIs to `mask` (#4373)
- Stop canceling timer for manual transactions (#4380)

### Fixes

- Fix the versioning to support app release with Beta versions (#4368)
- Linking ongoing trace to crash event (#4393)
- Edge case for swizzleClassNameExclude (#4405): Skip creating transactions for UIViewControllers ignored for swizzling
via the option `swizzleClassNameExclude`.

## 8.37.0

### Features

- Added `thermal_state` to device context (#4305)
- Send envelopes that cannot be cached to disk (#4294)

### Refactoring

- Moved session replay API to `SentrySDK.replay` (#4326)
- Changed default session replay quality to `medium` (#4326)

### Fixes

- Resumes replay when the app becomes active (#4303)
- Session replay redact view with transformation (#4308)
- Correct redact UIView with higher zPosition (#4309)
- Don't redact clipped views (#4325)
- Session replay for crash not created because of a race condition (#4314)
- Double-quoted include, expected angle-bracketed instead (#4298)
- Discontinue use of NSApplicationSupportDirectory in favor of NSCachesDirectory (#4335)
- Safe guard `strncpy` usage (#4336)
- Stop using `redactAllText` as an indicator tha redact is enabled (#4327)

### Improvements

- Avoid extra work when storing invalid envelopes (#4337)

## 8.37.0-beta.1

Expand Down
3 changes: 0 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ Test guidelines:
* Make use of the fixture pattern for test setup code. For examples, checkout [SentryClientTest](/Tests/SentryTests/SentryClientTest.swift) or [SentryHttpTransportTests](/Tests/SentryTests/SentryHttpTransportTests.swift).
* Use [TestData](/Tests/SentryTests/Protocol/TestData.swift) when possible to avoid setting up data classes with test values.
* Name the variable of the class you are testing `sut`, which stands for [system under test](https://en.wikipedia.org/wiki/System_under_test).
* We prefer using [Nimble](https://github.com/Quick/Nimble) over XCTest for test assertions. We can't use the latest Nimble version and are stuck
with [v10.0.0](https://github.com/Quick/Nimble/releases/tag/v10.0.0), cause it's the latest one that still supports Xcode 13.2.1, which we use in CI for
running our tests. [v11.0.0](https://github.com/Quick/Nimble/releases/tag/v11.0.0) already requires Swift 5.6 / Xcode 13.3.
* When calling `SentrySDK.start` in a test, specify only the minimum integrations required to minimize side effects for tests and reduce flakiness.


Expand Down
Loading

0 comments on commit 647740a

Please sign in to comment.