Skip to content

Commit

Permalink
Merge branch 'main' into hotfix/8.42.1
Browse files Browse the repository at this point in the history
  • Loading branch information
vaind committed Dec 20, 2024
2 parents e3e939e + 07c92b3 commit 35b47fa
Show file tree
Hide file tree
Showing 118 changed files with 2,446 additions and 824 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Build for Debug
run: ./scripts/xcode-test.sh "iOS" "latest" $GITHUB_REF_NAME ci build "iPhone 14" DebugWithoutUIKit uikit-check-build
run: ./scripts/xcode-test.sh "iOS" "latest" $GITHUB_REF_NAME build "iPhone 14" DebugWithoutUIKit uikit-check-build
- name: Ensure UIKit is not linked
run: ./scripts/check-uikit-linkage.sh DebugWithoutUIKit uikit-check-build unlinked SentryWithoutUIKit

Expand All @@ -222,7 +222,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Build for Release
run: ./scripts/xcode-test.sh "iOS" "latest" $GITHUB_REF_NAME ci build "iPhone 14" ReleaseWithoutUIKit uikit-check-build
run: ./scripts/xcode-test.sh "iOS" "latest" $GITHUB_REF_NAME build "iPhone 14" ReleaseWithoutUIKit uikit-check-build
- name: Ensure UIKit is not linked
run: ./scripts/check-uikit-linkage.sh ReleaseWithoutUIKit uikit-check-build unlinked SentryWithoutUIKit

Expand All @@ -232,7 +232,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Build for Debug
run: ./scripts/xcode-test.sh "iOS" "latest" $GITHUB_REF_NAME ci build "iPhone 14" Debug uikit-check-build
run: ./scripts/xcode-test.sh "iOS" "latest" $GITHUB_REF_NAME build "iPhone 14" Debug uikit-check-build
- name: Ensure UIKit is linked
run: ./scripts/check-uikit-linkage.sh Debug uikit-check-build linked Sentry

Expand All @@ -242,6 +242,6 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Build for Release
run: ./scripts/xcode-test.sh "iOS" "latest" $GITHUB_REF_NAME ci build "iPhone 14" Release uikit-check-build
run: ./scripts/xcode-test.sh "iOS" "latest" $GITHUB_REF_NAME build "iPhone 14" Release uikit-check-build
- name: Ensure UIKit is linked
run: ./scripts/check-uikit-linkage.sh Release uikit-check-build linked Sentry
16 changes: 9 additions & 7 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,15 @@ jobs:
with:
languages: ${{ matrix.language }}

- run: >-
env NSUnbufferedIO=YES
xcodebuild
-workspace Sentry.xcworkspace
-scheme Sentry
-configuration Release
-destination platform="iOS Simulator,OS=latest,name=iPhone 14 Pro" | xcpretty && exit ${PIPESTATUS[0]}
- run: |
set -o pipefail && NSUnbufferedIO=YES xcodebuild \
-workspace Sentry.xcworkspace \
-scheme Sentry \
-configuration Release \
-destination platform="iOS Simulator,OS=latest,name=iPhone 14 Pro" \
build 2>&1 |
tee raw-analyze-output.log |
xcbeautify
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
31 changes: 31 additions & 0 deletions .github/workflows/release-comment-issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: "Automation: Notify issues for release"
on:
release:
types:
- published
workflow_dispatch:
inputs:
version:
description: Which version to notify issues for
required: false

# This workflow is triggered when a release is published
jobs:
release-comment-issues:
runs-on: ubuntu-20.04
name: Notify issues
steps:
- name: Get version
id: get_version
run: echo "version=${{ github.event.inputs.version || github.event.release.tag_name }}" >> $GITHUB_OUTPUT

- name: Comment on linked issues that are mentioned in release
if: |
steps.get_version.outputs.version != ''
&& !contains(steps.get_version.outputs.version, 'a')
&& !contains(steps.get_version.outputs.version, 'b')
&& !contains(steps.get_version.outputs.version, 'rc')
uses: getsentry/release-comment-issues-gh-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
version: ${{ steps.get_version.outputs.version }}
10 changes: 8 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,16 @@ jobs:
name: 'Release a new version'
needs: prepare_framework
steps:
- name: Get auth token
id: token
uses: actions/create-github-app-token@5d869da34e18e7287c1daad50e0b8ea0f506ce69 # v1.11.0
with:
app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }}
private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }}
- name: Check out current commit (${{ github.sha }})
uses: actions/checkout@v4
with:
token: ${{ secrets.GH_RELEASE_PAT }}
token: ${{ steps.token.outputs.token }}
fetch-depth: 0

- uses: actions/download-artifact@v4
Expand All @@ -61,7 +67,7 @@ jobs:
- name: Prepare release
uses: getsentry/action-prepare-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GH_RELEASE_PAT }}
GITHUB_TOKEN: ${{ steps.token.outputs.token }}
with:
version: ${{ github.event.inputs.version }}
force: ${{ github.event.inputs.force }}
Expand Down
40 changes: 34 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ jobs:
matrix:
# Can't run tests on watchOS because XCTest is not available
include:
# We are running tests on iOS 17 and later, as there were OS-internal changes introduced in succeeding versions.

# iOS 16
- runs-on: macos-13
platform: "iOS"
Expand All @@ -90,32 +92,58 @@ jobs:
test-destination-os: "17.2"
device: "iPhone 15"

# iOS 18
- runs-on: macos-15
platform: "iOS"
xcode: "16.1"
test-destination-os: "18.1"
device: "iPhone 16"

# We don't run the unit tests on macOS 13 cause we run them on all on GH actions available iOS versions.
# The chance of missing a bug solely on tvOS 16 that doesn't occur on iOS, macOS 12 or macOS 14 is minimal.
# We are running tests on macOS 14 and later, as there were OS-internal changes introduced in succeeding versions.

# macOS 14
- runs-on: macos-14
platform: "macOS"
xcode: "15.4"
test-destination-os: "latest"

# Catalyst. We only test the latest version, as
# the risk something breaking on Catalyst and not
# macOS 15
- runs-on: macos-15
platform: "macOS"
xcode: "16.1"
test-destination-os: "latest"

# Catalyst. We test the latest version, as the risk something breaking on Catalyst and not
# on an older iOS or macOS version is low.
# In addition we are running tests on macOS 14, as there were OS-internal changes introduced in succeeding versions.
- runs-on: macos-14
platform: "Catalyst"
xcode: "15.4"
test-destination-os: "latest"

- runs-on: macos-15
platform: "Catalyst"
xcode: "16.1"
test-destination-os: "latest"

# We don't run the unit tests on tvOS 16 cause we run them on all on GH actions available iOS versions.
# The chance of missing a bug solely on tvOS 16 that doesn't occur on iOS, tvOS 15 or tvOS 16 is minimal.
# We are running tests on tvOS 17 and latest, as there were OS-internal changes introduced in succeeding versions.

# tvOS 17
- runs-on: macos-14
platform: "tvOS"
xcode: "15.4"
test-destination-os: "17.5"

# tvOS 18
- runs-on: macos-15
platform: "tvOS"
xcode: "16.1"
test-destination-os: "18.1"

steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
Expand All @@ -140,14 +168,14 @@ jobs:
# We split building and running tests in two steps so we know how long running the tests takes.
- name: Build tests
id: build_tests
run: ./scripts/xcode-test.sh ${{matrix.platform}} ${{matrix.test-destination-os}} $GITHUB_REF_NAME ci build-for-testing "${{matrix.device}}" TestCI
run: ./scripts/xcode-test.sh ${{matrix.platform}} ${{matrix.test-destination-os}} $GITHUB_REF_NAME build-for-testing "${{matrix.device}}" TestCI

- name: Run tests
# We call a script with the platform so the destination
# passed to xcodebuild doesn't end up in the job name,
# because GitHub Actions don't provide an easy way of
# manipulating string in expressions.
run: ./scripts/xcode-test.sh ${{matrix.platform}} ${{matrix.test-destination-os}} $GITHUB_REF_NAME ci test-without-building "${{matrix.device}}" TestCI
run: ./scripts/xcode-test.sh ${{matrix.platform}} ${{matrix.test-destination-os}} $GITHUB_REF_NAME test-without-building "${{matrix.device}}" TestCI

- name: Slowest Tests
if: ${{ always() }}
Expand Down Expand Up @@ -184,7 +212,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@015f24e6818733317a2da2edd6290ab26238649a # pin@v5.0.7
uses: codecov/codecov-action@7f8b4b4bde536c465e797be725718b88c5d95e0e # pin@v5.1.1
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 @@ -196,7 +224,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@015f24e6818733317a2da2edd6290ab26238649a # pin@v5.0.7
uses: codecov/codecov-action@7f8b4b4bde536c465e797be725718b88c5d95e0e # pin@v5.1.1
if: ${{ steps.codecov_1.outcome == 'failure' && contains(matrix.platform, 'iOS') && !contains(github.ref, 'release') && github.event.schedule == '' }}
with:
token: ${{ secrets.CODECOV_TOKEN }}
Expand Down
1 change: 1 addition & 0 deletions Brewfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ brew 'clang-format'
brew 'swiftlint'
brew 'pre-commit'
brew 'python3'
brew 'xcbeautify'
27 changes: 24 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
# Changelog

## Unreleased

### Improvements

- Improve compiler error message for missing Swift declarations due to APPLICATION_EXTENSION_API_ONLY (#4603)
- Mask screenshots for errors (#4623)

### Features

- Show session replay options as replay tags (#4639)

### Fixes

- `SentrySdkInfo.packages` should be an array (#4626)
- Use the same SdkInfo for envelope header and event (#4629)

### Internal

- Remove loading `integrations` names from `event.extra` (#4627)
- Add Hybrid SDKs API to add extra SDK packages (#4637)

## 8.42.1

### Fixes
Expand All @@ -18,10 +39,11 @@
### Fixes

- Session replay touch tracking race condition (#4548)
- Use `options.reportAccessibilityIdentifier` for Breadcrumbs and UIEvents (#4569)
- Use `options.reportAccessibilityIdentifier` for Breadcrumbs and UIEvents (#4569)
- Session replay transformed view masking (#4529)
- Load integration from same binary (#4541)
- Masking for fast animations (#4574)
- Masking for fast animations #4574
- Fix GraphQL context for HTTP client error tracking (#4567)

### Improvements
Expand Down Expand Up @@ -52,12 +74,11 @@
### Fixes

- Session replay touch tracking race condition (#4548)
- Use `options.reportAccessibilityIdentifier` for Breadcrumbs and UIEvents (#4569)
- Use `options.reportAccessibilityIdentifier` for Breadcrumbs and UIEvents (#4569)
- Session replay transformed view masking (#4529)
- Load integration from same binary (#4541)
- Masking for fast animations #4574


### Improvements

- impr: Speed up getBinaryImages V2 (#4539). Follow up on (#4435)
Expand Down
1 change: 0 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ gem "bundler", ">= 2"
gem "cocoapods", ">= 1.9.1"
gem "fastlane"
gem "rest-client"
gem "xcpretty"
gem "slather"

eval_gemfile("fastlane/Pluginfile")
1 change: 0 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,6 @@ DEPENDENCIES
fastlane-plugin-sentry
rest-client
slather
xcpretty

BUNDLED WITH
2.4.20
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ GIT-REF := $(shell git rev-parse --abbrev-ref HEAD)

test:
@echo "--> Running all tests"
./scripts/xcode-test.sh iOS latest $(GIT-REF) YES test Test
./scripts/xcode-test.sh iOS latest $(GIT-REF) test Test
./scripts/xcode-slowest-tests.sh
.PHONY: test

Expand All @@ -61,7 +61,7 @@ test-ui-critical:

analyze:
rm -rf analyzer
xcodebuild analyze -workspace Sentry.xcworkspace -scheme Sentry -configuration Release CLANG_ANALYZER_OUTPUT=html CLANG_ANALYZER_OUTPUT_DIR=analyzer -destination "platform=iOS Simulator,OS=latest,name=iPhone 11" CODE_SIGNING_ALLOWED="NO" | xcpretty -t && [[ -z `find analyzer -name "*.html"` ]]
set -o pipefail && NSUnbufferedIO=YES xcodebuild analyze -workspace Sentry.xcworkspace -scheme Sentry -configuration Release CLANG_ANALYZER_OUTPUT=html CLANG_ANALYZER_OUTPUT_DIR=analyzer -destination "platform=iOS Simulator,OS=latest,name=iPhone 11" CODE_SIGNING_ALLOWED="NO" 2>&1 | xcbeautify && [[ -z `find analyzer -name "*.html"` ]]

# Since Carthage 0.38.0 we need to create separate .framework.zip and .xcframework.zip archives.
# After creating the zips we create a JSON to be able to test Carthage locally.
Expand Down
Loading

0 comments on commit 35b47fa

Please sign in to comment.