Skip to content

Commit d100344

Browse files
committed
Merge branch 'main' into feat/sentry-dotnet-inproc-handler-strategy
2 parents ba346d6 + b03eb7f commit d100344

File tree

194 files changed

+6149
-722
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

194 files changed

+6149
-722
lines changed

.github/file-filters.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# This is used by the action https://github.com/dorny/paths-filter
2+
3+
high_risk_code: &high_risk_code
4+
# Transport classes
5+
- "sentry/src/main/java/io/sentry/transport/AsyncHttpTransport.java"
6+
- "sentry/src/main/java/io/sentry/transport/HttpConnection.java"
7+
- "sentry/src/main/java/io/sentry/transport/QueuedThreadPoolExecutor.java"
8+
- "sentry/src/main/java/io/sentry/transport/RateLimiter.java"
9+
- "sentry-apache-http-client-5/src/main/java/io/sentry/transport/apache/ApacheHttpClientTransport.java"
10+
11+
# Class used by hybrid SDKs
12+
- "sentry-android-core/src/main/java/io/sentry/android/core/InternalSentrySdk.java"

.github/pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
## :pencil: Checklist
1414
<!--- Put an `x` in the boxes that apply -->
1515

16-
- [ ] I reviewed the submitted code.
1716
- [ ] I added tests to verify the changes.
1817
- [ ] No new PII added or SDK only sends newly added PII if `sendDefaultPII` is enabled.
1918
- [ ] I updated the docs if needed.
19+
- [ ] I updated the wizard if needed.
2020
- [ ] Review from the native team if needed.
2121
- [ ] No breaking change or entry added to the changelog.
2222
- [ ] No breaking change for hybrid SDKs or communicated to hybrid SDKs.

.github/workflows/agp-matrix.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
java-version: '17'
3939

4040
- name: Setup Gradle
41-
uses: gradle/actions/setup-gradle@fd87365911aa12c016c307ea21313f351dc53551 # pin@v3
41+
uses: gradle/actions/setup-gradle@4ba34e96c5f6493e99d0696180a9a8d431577ba9 # pin@v3
4242
with:
4343
gradle-home-cache-cleanup: true
4444

@@ -59,7 +59,7 @@ jobs:
5959

6060
# We tried to use the cache action to cache gradle stuff, but it made tests slower and timeout
6161
- name: Run instrumentation tests
62-
uses: reactivecircus/android-emulator-runner@f0d1ed2dcad93c7479e8b2f2226c83af54494915 # pin@v2
62+
uses: reactivecircus/android-emulator-runner@62dbb605bba737720e10b196cb4220d374026a6d # pin@v2
6363
with:
6464
api-level: 30
6565
force-avd-creation: false
@@ -69,6 +69,7 @@ jobs:
6969
target: 'aosp_atd'
7070
arch: x86
7171
channel: canary # Necessary for ATDs
72+
disk-size: 4096M
7273
script: ./gradlew sentry-android-integration-tests:sentry-uitest-android:connectedReleaseAndroidTest -DtestBuildType=release --daemon
7374

7475
- name: Upload test results

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ jobs:
2727
java-version: '17'
2828

2929
- name: Setup Gradle
30-
uses: gradle/actions/setup-gradle@fd87365911aa12c016c307ea21313f351dc53551 # pin@v3
30+
uses: gradle/actions/setup-gradle@4ba34e96c5f6493e99d0696180a9a8d431577ba9 # pin@v3
3131
with:
3232
gradle-home-cache-cleanup: true
3333

3434
- name: Run Tests with coverage and Lint
3535
run: make preMerge
3636

3737
- name: Upload coverage to Codecov
38-
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # pin@v4
38+
uses: codecov/codecov-action@015f24e6818733317a2da2edd6290ab26238649a # pin@v4
3939
with:
4040
name: sentry-java
4141
fail_ci_if_error: false
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Changes In High Risk Code
2+
on:
3+
pull_request:
4+
5+
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
6+
concurrency:
7+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
8+
cancel-in-progress: true
9+
10+
jobs:
11+
files-changed:
12+
name: Detect changed files
13+
runs-on: ubuntu-latest
14+
# Map a step output to a job output
15+
outputs:
16+
high_risk_code: ${{ steps.changes.outputs.high_risk_code }}
17+
high_risk_code_files: ${{ steps.changes.outputs.high_risk_code_files }}
18+
steps:
19+
- uses: actions/checkout@v4
20+
- name: Get changed files
21+
id: changes
22+
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
23+
with:
24+
token: ${{ github.token }}
25+
filters: .github/file-filters.yml
26+
27+
# Enable listing of files matching each filter.
28+
# Paths to files will be available in `${FILTER_NAME}_files` output variable.
29+
list-files: csv
30+
31+
validate-high-risk-code:
32+
if: needs.files-changed.outputs.high_risk_code == 'true'
33+
needs: files-changed
34+
runs-on: ubuntu-latest
35+
steps:
36+
- name: Comment on PR to notify of changes in high risk files
37+
uses: actions/github-script@v7
38+
env:
39+
high_risk_code: ${{ needs.files-changed.outputs.high_risk_code_files }}
40+
with:
41+
script: |
42+
const highRiskFiles = process.env.high_risk_code;
43+
const fileList = highRiskFiles.split(',').map(file => `- [ ] ${file}`).join('\n');
44+
github.rest.issues.createComment({
45+
issue_number: context.issue.number,
46+
owner: context.repo.owner,
47+
repo: context.repo.repo,
48+
body: `### 🚨 Detected changes in high risk code 🚨 \n High-risk code has higher potential to break the SDK and may be hard to test. To prevent severe bugs, apply the rollout process for releasing such changes and be extra careful when changing and reviewing these files:\n ${fileList}`
49+
})

.github/workflows/codeql-analysis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ jobs:
3636
java-version: '17'
3737

3838
- name: Setup Gradle
39-
uses: gradle/actions/setup-gradle@fd87365911aa12c016c307ea21313f351dc53551 # pin@v3
39+
uses: gradle/actions/setup-gradle@4ba34e96c5f6493e99d0696180a9a8d431577ba9 # pin@v3
4040
with:
4141
gradle-home-cache-cleanup: true
4242

4343
- name: Initialize CodeQL
44-
uses: github/codeql-action/init@2d790406f505036ef40ecba973cc774a50395aac # pin@v2
44+
uses: github/codeql-action/init@f09c1c0a94de965c15400f5634aa42fac8fb8f88 # pin@v2
4545
with:
4646
languages: ${{ matrix.language }}
4747

@@ -55,4 +55,4 @@ jobs:
5555
./gradlew buildForCodeQL
5656
5757
- name: Perform CodeQL Analysis
58-
uses: github/codeql-action/analyze@2d790406f505036ef40ecba973cc774a50395aac # pin@v2
58+
uses: github/codeql-action/analyze@f09c1c0a94de965c15400f5634aa42fac8fb8f88 # pin@v2

.github/workflows/enforce-license-compliance.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Setup Gradle
14-
uses: gradle/actions/setup-gradle@fd87365911aa12c016c307ea21313f351dc53551 # pin@v3
14+
uses: gradle/actions/setup-gradle@4ba34e96c5f6493e99d0696180a9a8d431577ba9 # pin@v3
1515
with:
1616
gradle-home-cache-cleanup: true
1717

.github/workflows/generate-javadocs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ jobs:
2020
java-version: '17'
2121

2222
- name: Setup Gradle
23-
uses: gradle/actions/setup-gradle@fd87365911aa12c016c307ea21313f351dc53551 # pin@v3
23+
uses: gradle/actions/setup-gradle@4ba34e96c5f6493e99d0696180a9a8d431577ba9 # pin@v3
2424
with:
2525
gradle-home-cache-cleanup: true
2626

2727
- name: Generate Aggregate Javadocs
2828
run: |
2929
./gradlew aggregateJavadocs
3030
- name: Deploy
31-
uses: JamesIves/github-pages-deploy-action@94f3c658273cf92fb48ef99e5fbc02bd2dc642b2 # [email protected].3
31+
uses: JamesIves/github-pages-deploy-action@62fec3add6773ec5dbbf18d2ee4260911aa35cf4 # [email protected].9
3232
with:
3333
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3434
BRANCH: gh-pages

.github/workflows/integration-tests-benchmarks.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
java-version: '17'
3838

3939
- name: Setup Gradle
40-
uses: gradle/actions/setup-gradle@fd87365911aa12c016c307ea21313f351dc53551 # pin@v3
40+
uses: gradle/actions/setup-gradle@4ba34e96c5f6493e99d0696180a9a8d431577ba9 # pin@v3
4141
with:
4242
gradle-home-cache-cleanup: true
4343

@@ -86,7 +86,7 @@ jobs:
8686
java-version: '17'
8787

8888
- name: Setup Gradle
89-
uses: gradle/actions/setup-gradle@fd87365911aa12c016c307ea21313f351dc53551 # pin@v3
89+
uses: gradle/actions/setup-gradle@4ba34e96c5f6493e99d0696180a9a8d431577ba9 # pin@v3
9090
with:
9191
gradle-home-cache-cleanup: true
9292

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
name: UI Tests Critical
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
env:
14+
BASE_PATH: "sentry-android-integration-tests/sentry-uitest-android-critical"
15+
BUILD_PATH: "build/outputs/apk/release"
16+
APK_NAME: "sentry-uitest-android-critical-release.apk"
17+
APK_ARTIFACT_NAME: "sentry-uitest-android-critical-release"
18+
MAESTRO_VERSION: "1.39.0"
19+
20+
jobs:
21+
build:
22+
name: Build
23+
runs-on: ubuntu-latest
24+
steps:
25+
- name: Checkout code
26+
uses: actions/checkout@v4
27+
28+
- name: Set up Java 17
29+
uses: actions/setup-java@v4
30+
with:
31+
distribution: 'temurin'
32+
java-version: '17'
33+
34+
- name: Setup Gradle
35+
uses: gradle/actions/setup-gradle@4ba34e96c5f6493e99d0696180a9a8d431577ba9 # pin@v3
36+
with:
37+
gradle-home-cache-cleanup: true
38+
39+
- name: Build debug APK
40+
run: make assembleUiTestCriticalRelease
41+
42+
- name: Upload APK artifact
43+
uses: actions/upload-artifact@v4
44+
with:
45+
name: ${{env.APK_ARTIFACT_NAME}}
46+
path: "${{env.BASE_PATH}}/${{env.BUILD_PATH}}/${{env.APK_NAME}}"
47+
retention-days: 1
48+
49+
run-maestro-tests:
50+
name: Run Tests for API Level ${{ matrix.api-level }}
51+
needs: build
52+
runs-on: ubuntu-latest
53+
strategy:
54+
# we want that the matrix keeps running, default is to cancel them if it fails.
55+
fail-fast: false
56+
matrix:
57+
include:
58+
- api-level: 30 # Android 11
59+
target: aosp_atd
60+
channel: canary # Necessary for ATDs
61+
arch: x86_64
62+
- api-level: 31 # Android 12
63+
target: aosp_atd
64+
channel: canary # Necessary for ATDs
65+
arch: x86_64
66+
- api-level: 33 # Android 13
67+
target: aosp_atd
68+
channel: canary # Necessary for ATDs
69+
arch: x86_64
70+
- api-level: 34 # Android 14
71+
target: aosp_atd
72+
channel: canary # Necessary for ATDs
73+
arch: x86_64
74+
steps:
75+
- name: Checkout code
76+
uses: actions/checkout@v4
77+
78+
- name: Setup KVM
79+
shell: bash
80+
run: |
81+
# check if virtualization is supported...
82+
sudo apt install -y --no-install-recommends cpu-checker coreutils && echo "CPUs=$(nproc --all)" && kvm-ok
83+
# allow access to KVM to run the emulator
84+
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' \
85+
| sudo tee /etc/udev/rules.d/99-kvm4all.rules
86+
sudo udevadm control --reload-rules
87+
sudo udevadm trigger --name-match=kvm
88+
89+
- name: Download APK artifact
90+
uses: actions/download-artifact@v4
91+
with:
92+
name: ${{env.APK_ARTIFACT_NAME}}
93+
94+
- name: Install Maestro
95+
uses: dniHze/maestro-test-action@bda8a93211c86d0a05b7a4597c5ad134566fbde4 # [email protected]
96+
with:
97+
version: ${{env.MAESTRO_VERSION}}
98+
99+
- name: Run tests
100+
uses: reactivecircus/android-emulator-runner@62dbb605bba737720e10b196cb4220d374026a6d # [email protected]
101+
with:
102+
api-level: ${{ matrix.api-level }}
103+
force-avd-creation: false
104+
disable-animations: true
105+
disable-spellchecker: true
106+
target: ${{ matrix.target }}
107+
channel: ${{ matrix.channel }}
108+
arch: ${{ matrix.arch }}
109+
emulator-options: >
110+
-no-window
111+
-no-snapshot-save
112+
-gpu swiftshader_indirect
113+
-noaudio
114+
-no-boot-anim
115+
-camera-back none
116+
-camera-front none
117+
-timezone US/Pacific
118+
script: |
119+
adb install -r -d "${{env.APK_NAME}}"
120+
maestro test "${{env.BASE_PATH}}/maestro" --debug-output "${{env.BASE_PATH}}/maestro-logs"
121+
122+
- name: Upload Maestro test results
123+
if: failure()
124+
uses: actions/upload-artifact@v4
125+
with:
126+
name: maestro-logs
127+
path: "${{env.BASE_PATH}}/maestro-logs"
128+
retention-days: 1

0 commit comments

Comments
 (0)