Skip to content

Commit 9703685

Browse files
authored
Drop Python 2.7, 3.5 from CI (getsentry#2640)
- remove special treatment for Python 2.7 from CI YAML generating - remove Python 2.7, 3.5 test environments from `tox.ini`
1 parent 8dddcf1 commit 9703685

14 files changed

Lines changed: 66 additions & 463 deletions

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ jobs:
5353
test-aws_lambda-pinned:
5454
name: AWS Lambda (pinned)
5555
timeout-minutes: 30
56-
needs: check-permissions
5756
runs-on: ${{ matrix.os }}
5857
strategy:
5958
fail-fast: false
@@ -64,6 +63,7 @@ jobs:
6463
# ubuntu-20.04 is the last version that supported python3.6
6564
# see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877
6665
os: [ubuntu-20.04]
66+
needs: check-permissions
6767
steps:
6868
- uses: actions/checkout@v4
6969
with:

.github/workflows/test-integrations-cloud-computing.yml

Lines changed: 1 addition & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -114,46 +114,9 @@ jobs:
114114
with:
115115
token: ${{ secrets.CODECOV_TOKEN }}
116116
files: coverage.xml
117-
test-cloud_computing-py27:
118-
name: Cloud Computing (py27)
119-
timeout-minutes: 30
120-
runs-on: ubuntu-20.04
121-
container: python:2.7
122-
steps:
123-
- uses: actions/checkout@v4
124-
- name: Setup Test Env
125-
run: |
126-
pip install coverage "tox>=3,<4"
127-
- name: Erase coverage
128-
run: |
129-
coverage erase
130-
- name: Test boto3 py27
131-
run: |
132-
set -x # print commands that are executed
133-
./scripts/runtox.sh --exclude-latest "py2.7-boto3" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
134-
- name: Test chalice py27
135-
run: |
136-
set -x # print commands that are executed
137-
./scripts/runtox.sh --exclude-latest "py2.7-chalice" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
138-
- name: Test cloud_resource_context py27
139-
run: |
140-
set -x # print commands that are executed
141-
./scripts/runtox.sh --exclude-latest "py2.7-cloud_resource_context" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
142-
- name: Test gcp py27
143-
run: |
144-
set -x # print commands that are executed
145-
./scripts/runtox.sh --exclude-latest "py2.7-gcp" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
146-
- name: Generate coverage XML
147-
run: |
148-
coverage combine .coverage*
149-
coverage xml -i
150-
- uses: codecov/codecov-action@v3
151-
with:
152-
token: ${{ secrets.CODECOV_TOKEN }}
153-
files: coverage.xml
154117
check_required_tests:
155118
name: All Cloud Computing tests passed
156-
needs: [test-cloud_computing-pinned, test-cloud_computing-py27]
119+
needs: test-cloud_computing-pinned
157120
# Always run this, even if a dependent job failed
158121
if: always()
159122
runs-on: ubuntu-20.04
@@ -162,7 +125,3 @@ jobs:
162125
if: contains(needs.test-cloud_computing-pinned.result, 'failure') || contains(needs.test-cloud_computing-pinned.result, 'skipped')
163126
run: |
164127
echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1
165-
- name: Check for 2.7 failures
166-
if: contains(needs.test-cloud_computing-py27.result, 'failure') || contains(needs.test-cloud_computing-py27.result, 'skipped')
167-
run: |
168-
echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1

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

Lines changed: 2 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
strategy:
2626
fail-fast: false
2727
matrix:
28-
python-version: ["3.5","3.6","3.7","3.8","3.9","3.10","3.11","3.12"]
28+
python-version: ["3.6","3.7","3.8","3.9","3.10","3.11","3.12"]
2929
# python3.6 reached EOL and is no longer being supported on
3030
# new versions of hosted runners on Github Actions
3131
# ubuntu-20.04 is the last version that supported python3.6
@@ -54,34 +54,9 @@ jobs:
5454
with:
5555
token: ${{ secrets.CODECOV_TOKEN }}
5656
files: coverage.xml
57-
test-common-py27:
58-
name: Common (py27)
59-
timeout-minutes: 30
60-
runs-on: ubuntu-20.04
61-
container: python:2.7
62-
steps:
63-
- uses: actions/checkout@v4
64-
- name: Setup Test Env
65-
run: |
66-
pip install coverage "tox>=3,<4"
67-
- name: Erase coverage
68-
run: |
69-
coverage erase
70-
- name: Test common py27
71-
run: |
72-
set -x # print commands that are executed
73-
./scripts/runtox.sh --exclude-latest "py2.7-common" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
74-
- name: Generate coverage XML
75-
run: |
76-
coverage combine .coverage*
77-
coverage xml -i
78-
- uses: codecov/codecov-action@v3
79-
with:
80-
token: ${{ secrets.CODECOV_TOKEN }}
81-
files: coverage.xml
8257
check_required_tests:
8358
name: All Common tests passed
84-
needs: [test-common-pinned, test-common-py27]
59+
needs: test-common-pinned
8560
# Always run this, even if a dependent job failed
8661
if: always()
8762
runs-on: ubuntu-20.04
@@ -90,7 +65,3 @@ jobs:
9065
if: contains(needs.test-common-pinned.result, 'failure') || contains(needs.test-common-pinned.result, 'skipped')
9166
run: |
9267
echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1
93-
- name: Check for 2.7 failures
94-
if: contains(needs.test-common-py27.result, 'failure') || contains(needs.test-common-py27.result, 'skipped')
95-
run: |
96-
echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1

.github/workflows/test-integrations-data-processing.yml

Lines changed: 3 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
strategy:
2626
fail-fast: false
2727
matrix:
28-
python-version: ["3.5","3.7","3.8","3.11","3.12"]
28+
python-version: ["3.6","3.7","3.8","3.11","3.12"]
2929
# python3.6 reached EOL and is no longer being supported on
3030
# new versions of hosted runners on Github Actions
3131
# ubuntu-20.04 is the last version that supported python3.6
@@ -77,7 +77,7 @@ jobs:
7777
strategy:
7878
fail-fast: false
7979
matrix:
80-
python-version: ["3.5","3.6","3.7","3.8","3.9","3.10","3.11","3.12"]
80+
python-version: ["3.6","3.7","3.8","3.9","3.10","3.11","3.12"]
8181
# python3.6 reached EOL and is no longer being supported on
8282
# new versions of hosted runners on Github Actions
8383
# ubuntu-20.04 is the last version that supported python3.6
@@ -122,50 +122,9 @@ jobs:
122122
with:
123123
token: ${{ secrets.CODECOV_TOKEN }}
124124
files: coverage.xml
125-
test-data_processing-py27:
126-
name: Data Processing (py27)
127-
timeout-minutes: 30
128-
runs-on: ubuntu-20.04
129-
container: python:2.7
130-
steps:
131-
- uses: actions/checkout@v4
132-
- name: Setup Test Env
133-
run: |
134-
pip install coverage "tox>=3,<4"
135-
- name: Erase coverage
136-
run: |
137-
coverage erase
138-
- name: Test arq py27
139-
run: |
140-
set -x # print commands that are executed
141-
./scripts/runtox.sh --exclude-latest "py2.7-arq" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
142-
- name: Test beam py27
143-
run: |
144-
set -x # print commands that are executed
145-
./scripts/runtox.sh --exclude-latest "py2.7-beam" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
146-
- name: Test celery py27
147-
run: |
148-
set -x # print commands that are executed
149-
./scripts/runtox.sh --exclude-latest "py2.7-celery" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
150-
- name: Test huey py27
151-
run: |
152-
set -x # print commands that are executed
153-
./scripts/runtox.sh --exclude-latest "py2.7-huey" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
154-
- name: Test rq py27
155-
run: |
156-
set -x # print commands that are executed
157-
./scripts/runtox.sh --exclude-latest "py2.7-rq" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
158-
- name: Generate coverage XML
159-
run: |
160-
coverage combine .coverage*
161-
coverage xml -i
162-
- uses: codecov/codecov-action@v3
163-
with:
164-
token: ${{ secrets.CODECOV_TOKEN }}
165-
files: coverage.xml
166125
check_required_tests:
167126
name: All Data Processing tests passed
168-
needs: [test-data_processing-pinned, test-data_processing-py27]
127+
needs: test-data_processing-pinned
169128
# Always run this, even if a dependent job failed
170129
if: always()
171130
runs-on: ubuntu-20.04
@@ -174,7 +133,3 @@ jobs:
174133
if: contains(needs.test-data_processing-pinned.result, 'failure') || contains(needs.test-data_processing-pinned.result, 'skipped')
175134
run: |
176135
echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1
177-
- name: Check for 2.7 failures
178-
if: contains(needs.test-data_processing-py27.result, 'failure') || contains(needs.test-data_processing-py27.result, 'skipped')
179-
run: |
180-
echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1

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

Lines changed: 1 addition & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -158,68 +158,9 @@ jobs:
158158
with:
159159
token: ${{ secrets.CODECOV_TOKEN }}
160160
files: coverage.xml
161-
test-databases-py27:
162-
name: Databases (py27)
163-
timeout-minutes: 30
164-
runs-on: ubuntu-20.04
165-
container: python:2.7
166-
services:
167-
postgres:
168-
image: postgres
169-
env:
170-
POSTGRES_PASSWORD: sentry
171-
# Set health checks to wait until postgres has started
172-
options: >-
173-
--health-cmd pg_isready
174-
--health-interval 10s
175-
--health-timeout 5s
176-
--health-retries 5
177-
# Maps tcp port 5432 on service container to the host
178-
ports:
179-
- 5432:5432
180-
env:
181-
SENTRY_PYTHON_TEST_POSTGRES_USER: postgres
182-
SENTRY_PYTHON_TEST_POSTGRES_PASSWORD: sentry
183-
SENTRY_PYTHON_TEST_POSTGRES_NAME: ci_test
184-
SENTRY_PYTHON_TEST_POSTGRES_HOST: postgres
185-
steps:
186-
- uses: actions/checkout@v4
187-
- uses: getsentry/action-clickhouse-in-ci@v1
188-
- name: Setup Test Env
189-
run: |
190-
pip install coverage "tox>=3,<4"
191-
psql postgresql://postgres:sentry@postgres:5432 -c "create database ${SENTRY_PYTHON_TEST_POSTGRES_NAME};" || true
192-
psql postgresql://postgres:sentry@postgres:5432 -c "grant all privileges on database ${SENTRY_PYTHON_TEST_POSTGRES_NAME} to ${SENTRY_PYTHON_TEST_POSTGRES_USER};" || true
193-
- name: Erase coverage
194-
run: |
195-
coverage erase
196-
- name: Test asyncpg py27
197-
run: |
198-
set -x # print commands that are executed
199-
./scripts/runtox.sh --exclude-latest "py2.7-asyncpg" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
200-
- name: Test clickhouse_driver py27
201-
run: |
202-
set -x # print commands that are executed
203-
./scripts/runtox.sh --exclude-latest "py2.7-clickhouse_driver" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
204-
- name: Test pymongo py27
205-
run: |
206-
set -x # print commands that are executed
207-
./scripts/runtox.sh --exclude-latest "py2.7-pymongo" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
208-
- name: Test sqlalchemy py27
209-
run: |
210-
set -x # print commands that are executed
211-
./scripts/runtox.sh --exclude-latest "py2.7-sqlalchemy" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
212-
- name: Generate coverage XML
213-
run: |
214-
coverage combine .coverage*
215-
coverage xml -i
216-
- uses: codecov/codecov-action@v3
217-
with:
218-
token: ${{ secrets.CODECOV_TOKEN }}
219-
files: coverage.xml
220161
check_required_tests:
221162
name: All Databases tests passed
222-
needs: [test-databases-pinned, test-databases-py27]
163+
needs: test-databases-pinned
223164
# Always run this, even if a dependent job failed
224165
if: always()
225166
runs-on: ubuntu-20.04
@@ -228,7 +169,3 @@ jobs:
228169
if: contains(needs.test-databases-pinned.result, 'failure') || contains(needs.test-databases-pinned.result, 'skipped')
229170
run: |
230171
echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1
231-
- name: Check for 2.7 failures
232-
if: contains(needs.test-databases-py27.result, 'failure') || contains(needs.test-databases-py27.result, 'skipped')
233-
run: |
234-
echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
strategy:
2626
fail-fast: false
2727
matrix:
28-
python-version: ["3.5","3.8","3.11","3.12"]
28+
python-version: ["3.6","3.8","3.11","3.12"]
2929
# python3.6 reached EOL and is no longer being supported on
3030
# new versions of hosted runners on Github Actions
3131
# ubuntu-20.04 is the last version that supported python3.6
@@ -73,7 +73,7 @@ jobs:
7373
strategy:
7474
fail-fast: false
7575
matrix:
76-
python-version: ["3.5","3.6","3.7","3.8","3.9","3.11","3.12"]
76+
python-version: ["3.6","3.7","3.8","3.9","3.11","3.12"]
7777
# python3.6 reached EOL and is no longer being supported on
7878
# new versions of hosted runners on Github Actions
7979
# ubuntu-20.04 is the last version that supported python3.6

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

Lines changed: 1 addition & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -114,46 +114,9 @@ jobs:
114114
with:
115115
token: ${{ secrets.CODECOV_TOKEN }}
116116
files: coverage.xml
117-
test-networking-py27:
118-
name: Networking (py27)
119-
timeout-minutes: 30
120-
runs-on: ubuntu-20.04
121-
container: python:2.7
122-
steps:
123-
- uses: actions/checkout@v4
124-
- name: Setup Test Env
125-
run: |
126-
pip install coverage "tox>=3,<4"
127-
- name: Erase coverage
128-
run: |
129-
coverage erase
130-
- name: Test gevent py27
131-
run: |
132-
set -x # print commands that are executed
133-
./scripts/runtox.sh --exclude-latest "py2.7-gevent" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
134-
- name: Test grpc py27
135-
run: |
136-
set -x # print commands that are executed
137-
./scripts/runtox.sh --exclude-latest "py2.7-grpc" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
138-
- name: Test httpx py27
139-
run: |
140-
set -x # print commands that are executed
141-
./scripts/runtox.sh --exclude-latest "py2.7-httpx" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
142-
- name: Test requests py27
143-
run: |
144-
set -x # print commands that are executed
145-
./scripts/runtox.sh --exclude-latest "py2.7-requests" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
146-
- name: Generate coverage XML
147-
run: |
148-
coverage combine .coverage*
149-
coverage xml -i
150-
- uses: codecov/codecov-action@v3
151-
with:
152-
token: ${{ secrets.CODECOV_TOKEN }}
153-
files: coverage.xml
154117
check_required_tests:
155118
name: All Networking tests passed
156-
needs: [test-networking-pinned, test-networking-py27]
119+
needs: test-networking-pinned
157120
# Always run this, even if a dependent job failed
158121
if: always()
159122
runs-on: ubuntu-20.04
@@ -162,7 +125,3 @@ jobs:
162125
if: contains(needs.test-networking-pinned.result, 'failure') || contains(needs.test-networking-pinned.result, 'skipped')
163126
run: |
164127
echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1
165-
- name: Check for 2.7 failures
166-
if: contains(needs.test-networking-py27.result, 'failure') || contains(needs.test-networking-py27.result, 'skipped')
167-
run: |
168-
echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1

0 commit comments

Comments
 (0)