Skip to content

Commit 9563833

Browse files
Merge remote-tracking branch 'origin/master' into fix/grpc-aio-metadata-list
2 parents 0323fd7 + 955108e commit 9563833

File tree

254 files changed

+11350
-2978
lines changed

Some content is hidden

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

254 files changed

+11350
-2978
lines changed

.coveragerc36

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# This is the coverage.py config for Python 3.6
2+
# The config for newer Python versions is in pyproject.toml.
3+
4+
[run]
5+
branch = true
6+
omit =
7+
/tmp/*
8+
*/tests/*
9+
*/.venv/*
10+
11+
12+
[report]
13+
exclude_lines =
14+
if TYPE_CHECKING:

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
blank_issues_enabled: false
1+
blank_issues_enabled: true
22
contact_links:
33
- name: Support Request
44
url: https://sentry.io/support

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,6 @@
22

33
---
44

5-
## General Notes
5+
Thank you for contributing to `sentry-python`! Please add tests to validate your changes, and lint your code using `tox -e linters`.
66

7-
Thank you for contributing to `sentry-python`!
8-
9-
Please add tests to validate your changes, and lint your code using `tox -e linters`.
10-
11-
Running the test suite on your PR might require maintainer approval. Some tests (AWS Lambda) additionally require a maintainer to add a special label to run and will fail if the label is not present.
12-
13-
#### For maintainers
14-
15-
Sensitive test suites require maintainer review to ensure that tests do not compromise our secrets. This review must be repeated after any code revisions.
16-
17-
Before running sensitive test suites, please carefully check the PR. Then, apply the `Trigger: tests using secrets` label. The label will be removed after any code changes to enforce our policy requiring maintainers to review all code revisions before running sensitive tests.
7+
Running the test suite on your PR might require maintainer approval. The AWS Lambda tests additionally require a maintainer to add a special label, and they will fail until this label is added.

.github/workflows/ci.yml

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
timeout-minutes: 10
2525

2626
steps:
27-
- uses: actions/checkout@v4.1.7
27+
- uses: actions/checkout@v4.2.2
2828
- uses: actions/setup-python@v5
2929
with:
3030
python-version: 3.12
@@ -39,7 +39,7 @@ jobs:
3939
timeout-minutes: 10
4040

4141
steps:
42-
- uses: actions/checkout@v4.1.7
42+
- uses: actions/checkout@v4.2.2
4343
- uses: actions/setup-python@v5
4444
with:
4545
python-version: 3.12
@@ -54,7 +54,7 @@ jobs:
5454
timeout-minutes: 10
5555

5656
steps:
57-
- uses: actions/checkout@v4.1.7
57+
- uses: actions/checkout@v4.2.2
5858
- uses: actions/setup-python@v5
5959
with:
6060
python-version: 3.12
@@ -70,19 +70,22 @@ jobs:
7070
# This will also trigger "make dist" that creates the Python packages
7171
make aws-lambda-layer
7272
- name: Upload Python Packages
73-
uses: actions/upload-artifact@v3
73+
uses: actions/upload-artifact@v4
7474
with:
75-
name: ${{ github.sha }}
75+
name: artifact-build_lambda_layer
7676
path: |
7777
dist/*
78+
if-no-files-found: 'error'
79+
# since this artifact will be merged, compression is not necessary
80+
compression-level: '0'
7881

7982
docs:
8083
name: Build SDK API Doc
8184
runs-on: ubuntu-latest
8285
timeout-minutes: 10
8386

8487
steps:
85-
- uses: actions/checkout@v4.1.7
88+
- uses: actions/checkout@v4.2.2
8689
- uses: actions/setup-python@v5
8790
with:
8891
python-version: 3.12
@@ -91,7 +94,23 @@ jobs:
9194
make apidocs
9295
cd docs/_build && zip -r gh-pages ./
9396
94-
- uses: actions/[email protected]
97+
- uses: actions/upload-artifact@v4
98+
with:
99+
name: artifact-docs
100+
path: |
101+
docs/_build/gh-pages.zip
102+
if-no-files-found: 'error'
103+
# since this artifact will be merged, compression is not necessary
104+
compression-level: '0'
105+
106+
merge:
107+
name: Create Release Artifact
108+
runs-on: ubuntu-latest
109+
needs: [build_lambda_layer, docs]
110+
steps:
111+
- uses: actions/upload-artifact/merge@v4
95112
with:
113+
# Craft expects release assets from github to be a single artifact named after the sha.
96114
name: ${{ github.sha }}
97-
path: docs/_build/gh-pages.zip
115+
pattern: artifact-*
116+
delete-merged: true

.github/workflows/codeql-analysis.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,15 @@ on:
1717
- master
1818
- sentry-sdk-2.0
1919
pull_request:
20-
# The branches below must be a subset of the branches above
21-
branches:
22-
- master
23-
- sentry-sdk-2.0
2420
schedule:
2521
- cron: '18 18 * * 3'
2622

23+
# Cancel in progress workflows on pull_requests.
24+
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
25+
concurrency:
26+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
27+
cancel-in-progress: true
28+
2729
permissions:
2830
contents: read
2931

@@ -46,7 +48,7 @@ jobs:
4648

4749
steps:
4850
- name: Checkout repository
49-
uses: actions/checkout@v4.1.7
51+
uses: actions/checkout@v4.2.2
5052

5153
# Initializes the CodeQL tools for scanning.
5254
- name: Initialize CodeQL

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@ on:
88
- release/*
99
- sentry-sdk-2.0
1010
pull_request:
11-
branches:
12-
- master
13-
- main
14-
- sentry-sdk-2.0
11+
12+
# Cancel in progress workflows on pull_requests.
13+
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
1516

1617
jobs:
1718
enforce-license-compliance:

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
runs-on: ubuntu-latest
1919
name: "Release a new version"
2020
steps:
21-
- uses: actions/checkout@v4.1.7
21+
- uses: actions/checkout@v4.2.2
2222
with:
2323
token: ${{ secrets.GH_RELEASE_PAT }}
2424
fetch-depth: 0

.github/workflows/test-integrations-ai.yml

Lines changed: 37 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# Do not edit this file. This file is generated automatically by executing
2+
# python scripts/split-tox-gh-actions/split-tox-gh-actions.py
13
name: Test AI
24
on:
35
push:
@@ -25,21 +27,21 @@ jobs:
2527
strategy:
2628
fail-fast: false
2729
matrix:
28-
python-version: ["3.7","3.9","3.11","3.12"]
30+
python-version: ["3.7","3.9","3.11","3.12","3.13"]
2931
# python3.6 reached EOL and is no longer being supported on
3032
# new versions of hosted runners on Github Actions
3133
# ubuntu-20.04 is the last version that supported python3.6
3234
# see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877
3335
os: [ubuntu-20.04]
3436
steps:
35-
- uses: actions/checkout@v4.1.7
37+
- uses: actions/checkout@v4.2.2
3638
- uses: actions/setup-python@v5
3739
with:
3840
python-version: ${{ matrix.python-version }}
3941
allow-prereleases: true
4042
- name: Setup Test Env
4143
run: |
42-
pip install coverage tox
44+
pip install "coverage[toml]" tox
4345
- name: Erase coverage
4446
run: |
4547
coverage erase
@@ -63,45 +65,55 @@ jobs:
6365
run: |
6466
set -x # print commands that are executed
6567
./scripts/runtox.sh "py${{ matrix.python-version }}-huggingface_hub-latest"
68+
- name: Generate coverage XML (Python 3.6)
69+
if: ${{ !cancelled() && matrix.python-version == '3.6' }}
70+
run: |
71+
export COVERAGE_RCFILE=.coveragerc36
72+
coverage combine .coverage-sentry-*
73+
coverage xml --ignore-errors
6674
- name: Generate coverage XML
67-
if: ${{ !cancelled() }}
75+
if: ${{ !cancelled() && matrix.python-version != '3.6' }}
6876
run: |
69-
coverage combine .coverage*
70-
coverage xml -i
77+
coverage combine .coverage-sentry-*
78+
coverage xml
7179
- name: Upload coverage to Codecov
7280
if: ${{ !cancelled() }}
73-
uses: codecov/codecov-action@v4.5.0
81+
uses: codecov/codecov-action@v4.6.0
7482
with:
7583
token: ${{ secrets.CODECOV_TOKEN }}
7684
files: coverage.xml
85+
# make sure no plugins alter our coverage reports
86+
plugin: noop
87+
verbose: true
7788
- name: Upload test results to Codecov
7889
if: ${{ !cancelled() }}
7990
uses: codecov/test-results-action@v1
8091
with:
8192
token: ${{ secrets.CODECOV_TOKEN }}
8293
files: .junitxml
94+
verbose: true
8395
test-ai-pinned:
8496
name: AI (pinned)
8597
timeout-minutes: 30
8698
runs-on: ${{ matrix.os }}
8799
strategy:
88100
fail-fast: false
89101
matrix:
90-
python-version: ["3.7","3.9","3.11","3.12"]
102+
python-version: ["3.7","3.9","3.11","3.12","3.13"]
91103
# python3.6 reached EOL and is no longer being supported on
92104
# new versions of hosted runners on Github Actions
93105
# ubuntu-20.04 is the last version that supported python3.6
94106
# see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877
95107
os: [ubuntu-20.04]
96108
steps:
97-
- uses: actions/checkout@v4.1.7
109+
- uses: actions/checkout@v4.2.2
98110
- uses: actions/setup-python@v5
99111
with:
100112
python-version: ${{ matrix.python-version }}
101113
allow-prereleases: true
102114
- name: Setup Test Env
103115
run: |
104-
pip install coverage tox
116+
pip install "coverage[toml]" tox
105117
- name: Erase coverage
106118
run: |
107119
coverage erase
@@ -125,25 +137,35 @@ jobs:
125137
run: |
126138
set -x # print commands that are executed
127139
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-huggingface_hub"
140+
- name: Generate coverage XML (Python 3.6)
141+
if: ${{ !cancelled() && matrix.python-version == '3.6' }}
142+
run: |
143+
export COVERAGE_RCFILE=.coveragerc36
144+
coverage combine .coverage-sentry-*
145+
coverage xml --ignore-errors
128146
- name: Generate coverage XML
129-
if: ${{ !cancelled() }}
147+
if: ${{ !cancelled() && matrix.python-version != '3.6' }}
130148
run: |
131-
coverage combine .coverage*
132-
coverage xml -i
149+
coverage combine .coverage-sentry-*
150+
coverage xml
133151
- name: Upload coverage to Codecov
134152
if: ${{ !cancelled() }}
135-
uses: codecov/codecov-action@v4.5.0
153+
uses: codecov/codecov-action@v4.6.0
136154
with:
137155
token: ${{ secrets.CODECOV_TOKEN }}
138156
files: coverage.xml
157+
# make sure no plugins alter our coverage reports
158+
plugin: noop
159+
verbose: true
139160
- name: Upload test results to Codecov
140161
if: ${{ !cancelled() }}
141162
uses: codecov/test-results-action@v1
142163
with:
143164
token: ${{ secrets.CODECOV_TOKEN }}
144165
files: .junitxml
166+
verbose: true
145167
check_required_tests:
146-
name: All AI tests passed
168+
name: All pinned AI tests passed
147169
needs: test-ai-pinned
148170
# Always run this, even if a dependent job failed
149171
if: always()

.github/workflows/test-integrations-aws-lambda.yml

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# Do not edit this file. This file is generated automatically by executing
2+
# python scripts/split-tox-gh-actions/split-tox-gh-actions.py
13
name: Test AWS Lambda
24
on:
35
push:
@@ -30,7 +32,7 @@ jobs:
3032
name: permissions check
3133
runs-on: ubuntu-20.04
3234
steps:
33-
- uses: actions/checkout@v4.1.7
35+
- uses: actions/checkout@v4.2.2
3436
with:
3537
persist-credentials: false
3638
- name: Check permissions on PR
@@ -65,7 +67,7 @@ jobs:
6567
os: [ubuntu-20.04]
6668
needs: check-permissions
6769
steps:
68-
- uses: actions/checkout@v4.1.7
70+
- uses: actions/checkout@v4.2.2
6971
with:
7072
ref: ${{ github.event.pull_request.head.sha || github.ref }}
7173
- uses: actions/setup-python@v5
@@ -74,33 +76,43 @@ jobs:
7476
allow-prereleases: true
7577
- name: Setup Test Env
7678
run: |
77-
pip install coverage tox
79+
pip install "coverage[toml]" tox
7880
- name: Erase coverage
7981
run: |
8082
coverage erase
8183
- name: Test aws_lambda pinned
8284
run: |
8385
set -x # print commands that are executed
8486
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-aws_lambda"
87+
- name: Generate coverage XML (Python 3.6)
88+
if: ${{ !cancelled() && matrix.python-version == '3.6' }}
89+
run: |
90+
export COVERAGE_RCFILE=.coveragerc36
91+
coverage combine .coverage-sentry-*
92+
coverage xml --ignore-errors
8593
- name: Generate coverage XML
86-
if: ${{ !cancelled() }}
94+
if: ${{ !cancelled() && matrix.python-version != '3.6' }}
8795
run: |
88-
coverage combine .coverage*
89-
coverage xml -i
96+
coverage combine .coverage-sentry-*
97+
coverage xml
9098
- name: Upload coverage to Codecov
9199
if: ${{ !cancelled() }}
92-
uses: codecov/codecov-action@v4.5.0
100+
uses: codecov/codecov-action@v4.6.0
93101
with:
94102
token: ${{ secrets.CODECOV_TOKEN }}
95103
files: coverage.xml
104+
# make sure no plugins alter our coverage reports
105+
plugin: noop
106+
verbose: true
96107
- name: Upload test results to Codecov
97108
if: ${{ !cancelled() }}
98109
uses: codecov/test-results-action@v1
99110
with:
100111
token: ${{ secrets.CODECOV_TOKEN }}
101112
files: .junitxml
113+
verbose: true
102114
check_required_tests:
103-
name: All AWS Lambda tests passed
115+
name: All pinned AWS Lambda tests passed
104116
needs: test-aws_lambda-pinned
105117
# Always run this, even if a dependent job failed
106118
if: always()

0 commit comments

Comments
 (0)