Skip to content

Commit 46718e3

Browse files
authored
Merge branch 'main' into feat/sync-file-attachment
2 parents 1ffacfc + 11f4161 commit 46718e3

File tree

151 files changed

+6315
-177
lines changed

Some content is hidden

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

151 files changed

+6315
-177
lines changed

.agents/skills

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../.claude/skills

.claude/skills/test/SKILL.md

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
---
2+
name: test
3+
description: Run tests for a specific SDK module. Use when asked to "run tests", "test module", "run unit tests", "run system tests", "run e2e tests", or test a specific class. Auto-detects unit vs system tests. Supports interactive mode.
4+
allowed-tools: Bash, Read, Glob, AskUserQuestion
5+
argument-hint: [interactive] <module-name-or-file-path> [test-class-filter]
6+
---
7+
8+
# Run Tests
9+
10+
Run tests for a specific module. Auto-detects whether to run unit tests or system tests.
11+
12+
## Step 0: Check for Interactive Mode
13+
14+
If `$ARGUMENTS` starts with `interactive` (e.g., `/test interactive sentry ScopesTest`), enable interactive mode. Strip the `interactive` keyword from the arguments before proceeding.
15+
16+
In interactive mode, use AskUserQuestion at decision points as described in the steps below.
17+
18+
## Step 1: Parse the Argument
19+
20+
The argument can be either:
21+
- A **file path** (e.g., `@sentry/src/test/java/io/sentry/ScopesTest.kt`)
22+
- A **module name** (e.g., `sentry-android-core`, `sentry-samples-spring-boot-4`)
23+
- A **module name + test filter** (e.g., `sentry ScopesTest`)
24+
25+
Extract the module name and optional test class filter from the argument.
26+
27+
**Interactive mode:** If the test filter is ambiguous (e.g., matches multiple test classes across modules), use AskUserQuestion to let the user pick which test class(es) to run.
28+
29+
## Step 2: Detect Test Type
30+
31+
| Signal | Test Type |
32+
|--------|-----------|
33+
| Path contains `sentry-samples/` | System test |
34+
| Module name starts with `sentry-samples-` | System test |
35+
| Everything else | Unit test |
36+
37+
## Step 3a: Run Unit Tests
38+
39+
Determine the Gradle test task:
40+
41+
| Module Pattern | Test Task |
42+
|---------------|-----------|
43+
| `sentry-android-*` | `testDebugUnitTest` |
44+
| `sentry-compose*` | `testDebugUnitTest` |
45+
| `*-android` | `testDebugUnitTest` |
46+
| Everything else | `test` |
47+
48+
**Interactive mode:** Before running, read the test class file and use AskUserQuestion to ask:
49+
- "Run all tests in this class, or a specific method?" — list the test method names as options.
50+
51+
If the user picks a specific method, use `--tests="*ClassName.methodName"` as the filter.
52+
53+
With a test class filter:
54+
```bash
55+
./gradlew ':<module>:<task>' --tests="*<filter>*" --info
56+
```
57+
58+
Without a filter:
59+
```bash
60+
./gradlew ':<module>:<task>' --info
61+
```
62+
63+
## Step 3b: Run System Tests
64+
65+
System tests require the Python-based test runner which manages a mock Sentry server and sample app lifecycle.
66+
67+
1. Ensure the Python venv exists:
68+
```bash
69+
test -d .venv || make setupPython
70+
```
71+
72+
2. Extract the sample module name. For file paths like `sentry-samples/<sample-module>/src/...`, the sample module is the directory name (e.g., `sentry-samples-spring`).
73+
74+
3. Run the system test:
75+
```bash
76+
.venv/bin/python test/system-test-runner.py test --module <sample-module>
77+
```
78+
79+
This starts the mock Sentry server, starts the sample app (Spring Boot/Tomcat/CLI), runs tests via `./gradlew :sentry-samples:<sample-module>:systemTest`, and cleans up afterwards.
80+
81+
## Step 4: Report Results
82+
83+
Summarize the test outcome:
84+
- Total tests run, passed, failed, skipped
85+
- For failures: show the failing test name and the assertion/error message

.github/ISSUE_TEMPLATE/bug_report_android.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,22 @@ body:
5555
validations:
5656
required: true
5757

58+
- type: dropdown
59+
id: other_error_monitoring_solution
60+
attributes:
61+
description: Are you using any other error monitoring solution alongside Sentry?
62+
label: Other Error Monitoring Solution
63+
options:
64+
- "No"
65+
- "Bugsnag"
66+
- "Datadog"
67+
- "Firebase Crashlytics"
68+
- "Instabug/Luciq"
69+
- "NewRelic"
70+
- "Other (please mention in issue description)"
71+
validations:
72+
required: true
73+
5874
- type: input
5975
id: version
6076
attributes:

.github/ISSUE_TEMPLATE/bug_report_java.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,25 @@ body:
5353
validations:
5454
required: true
5555

56+
- type: dropdown
57+
id: other_error_monitoring
58+
attributes:
59+
description: Are you using any other error monitoring solution alongside Sentry?
60+
label: Other Error Monitoring Solution
61+
options:
62+
- "Yes"
63+
- "No"
64+
validations:
65+
required: true
66+
67+
- type: input
68+
id: other_error_monitoring_name
69+
attributes:
70+
label: Other Error Monitoring Solution Name
71+
description: If you're using another error monitoring solution side-by-side, please enter the name of the other solution.
72+
validations:
73+
required: false
74+
5675
- type: input
5776
id: version
5877
attributes:

.github/workflows/agp-matrix.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ jobs:
2828

2929
steps:
3030
- name: Checkout Repo
31-
uses: actions/checkout@v6
31+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
3232
with:
3333
submodules: 'recursive'
3434

3535
- name: Setup Java Version
36-
uses: actions/setup-java@v5
36+
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5
3737
with:
3838
distribution: 'temurin'
3939
java-version: '17'
@@ -50,7 +50,7 @@ jobs:
5050
sudo udevadm trigger --name-match=kvm
5151
5252
- name: AVD cache
53-
uses: actions/cache@v5
53+
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5
5454
id: avd-cache
5555
with:
5656
path: |
@@ -94,7 +94,7 @@ jobs:
9494

9595
- name: Upload test results
9696
if: always()
97-
uses: actions/upload-artifact@v7
97+
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7
9898
with:
9999
name: test-results-AGP${{ matrix.agp }}-Integrations${{ matrix.integrations }}
100100
path: |

.github/workflows/build.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,19 @@ jobs:
1919

2020
steps:
2121
- name: Checkout Repo
22-
uses: actions/checkout@v6
22+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
2323
with:
2424
submodules: 'recursive'
2525

2626
- name: Setup Java Version
27-
uses: actions/setup-java@v5
27+
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5
2828
with:
2929
distribution: 'temurin'
3030
java-version: '17'
3131

3232
# Workaround for https://github.com/gradle/actions/issues/21 to use config cache
3333
- name: Cache buildSrc
34-
uses: actions/cache@v5
34+
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5
3535
with:
3636
path: buildSrc/build
3737
key: build-logic-${{ hashFiles('buildSrc/src/**', 'buildSrc/build.gradle.kts','buildSrc/settings.gradle.kts') }}
@@ -53,7 +53,7 @@ jobs:
5353

5454
- name: Upload test results
5555
if: always()
56-
uses: actions/upload-artifact@v7
56+
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7
5757
with:
5858
name: test-results-build
5959
path: |

.github/workflows/changelog-preview.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ permissions:
1515

1616
jobs:
1717
changelog-preview:
18-
uses: getsentry/craft/.github/workflows/changelog-preview.yml@v2
18+
uses: getsentry/craft/.github/workflows/changelog-preview.yml@f4889d04564e47311038ecb6b910fef6b6cf1363 # v2
1919
secrets: inherit

.github/workflows/changes-in-high-risk-code.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
high_risk_code: ${{ steps.changes.outputs.high_risk_code }}
1717
high_risk_code_files: ${{ steps.changes.outputs.high_risk_code_files }}
1818
steps:
19-
- uses: actions/checkout@v6
19+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
2020
- name: Get changed files
2121
id: changes
2222
uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1
@@ -34,7 +34,7 @@ jobs:
3434
runs-on: ubuntu-latest
3535
steps:
3636
- name: Comment on PR to notify of changes in high risk files
37-
uses: actions/github-script@v8
37+
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
3838
env:
3939
high_risk_code: ${{ needs.files-changed.outputs.high_risk_code_files }}
4040
with:

.github/workflows/check-tombstone-proto-schema.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111

1212
steps:
13-
- uses: actions/checkout@v6
13+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
1414

1515
- name: Check for newer Tombstone proto schema
1616
run: ./scripts/check-tombstone-proto-schema.sh

.github/workflows/codeql-analysis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ jobs:
2020

2121
steps:
2222
- name: Checkout Repo
23-
uses: actions/checkout@v6
23+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
2424
with:
2525
submodules: 'recursive'
2626

2727
- name: Setup Java Version
28-
uses: actions/setup-java@v5
28+
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5
2929
with:
3030
distribution: 'temurin'
3131
java-version: '17'

0 commit comments

Comments
 (0)