Skip to content

Commit f3b3c70

Browse files
authored
tests: Move redis under toxgen (#4824)
### Description Moved redis under toxgen, effectively moving the whole DBs group away from the old system. #### Issues Ref #4506 #### Reminders - Please add tests to validate your changes, and lint your code using `tox -e linters`. - Add GH Issue ID _&_ Linear ID (if applicable) - PR title should use [conventional commit](https://develop.sentry.dev/engineering-practices/commit-messages/#type) style (`feat:`, `fix:`, `ref:`, `meta:`) - For external contributors: [CONTRIBUTING.md](https://github.com/getsentry/sentry-python/blob/master/CONTRIBUTING.md), [Sentry SDK development docs](https://develop.sentry.dev/sdk/), [Discord community](https://discord.gg/Ww9hbqr)
1 parent d5fb1bb commit f3b3c70

File tree

5 files changed

+33
-139
lines changed

5 files changed

+33
-139
lines changed

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

Lines changed: 0 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -22,105 +22,6 @@ env:
2222
CACHED_BUILD_PATHS: |
2323
${{ github.workspace }}/dist-serverless
2424
jobs:
25-
test-dbs-latest:
26-
name: DBs (latest)
27-
timeout-minutes: 30
28-
runs-on: ${{ matrix.os }}
29-
strategy:
30-
fail-fast: false
31-
matrix:
32-
python-version: ["3.7","3.12","3.13"]
33-
# python3.6 reached EOL and is no longer being supported on
34-
# new versions of hosted runners on Github Actions
35-
# ubuntu-20.04 is the last version that supported python3.6
36-
# see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877
37-
os: [ubuntu-22.04]
38-
services:
39-
postgres:
40-
image: postgres
41-
env:
42-
POSTGRES_PASSWORD: sentry
43-
# Set health checks to wait until postgres has started
44-
options: >-
45-
--health-cmd pg_isready
46-
--health-interval 10s
47-
--health-timeout 5s
48-
--health-retries 5
49-
# Maps tcp port 5432 on service container to the host
50-
ports:
51-
- 5432:5432
52-
env:
53-
SENTRY_PYTHON_TEST_POSTGRES_HOST: ${{ matrix.python-version == '3.6' && 'postgres' || 'localhost' }}
54-
SENTRY_PYTHON_TEST_POSTGRES_USER: postgres
55-
SENTRY_PYTHON_TEST_POSTGRES_PASSWORD: sentry
56-
# Use Docker container only for Python 3.6
57-
container: ${{ matrix.python-version == '3.6' && 'python:3.6' || null }}
58-
steps:
59-
- uses: actions/[email protected]
60-
- uses: actions/setup-python@v6
61-
if: ${{ matrix.python-version != '3.6' }}
62-
with:
63-
python-version: ${{ matrix.python-version }}
64-
allow-prereleases: true
65-
- name: "Setup ClickHouse Server"
66-
uses: getsentry/[email protected]
67-
- name: Setup Test Env
68-
run: |
69-
pip install "coverage[toml]" tox
70-
- name: Erase coverage
71-
run: |
72-
coverage erase
73-
- name: Test asyncpg latest
74-
run: |
75-
set -x # print commands that are executed
76-
./scripts/runtox.sh "py${{ matrix.python-version }}-asyncpg-latest"
77-
- name: Test clickhouse_driver latest
78-
run: |
79-
set -x # print commands that are executed
80-
./scripts/runtox.sh "py${{ matrix.python-version }}-clickhouse_driver-latest"
81-
- name: Test pymongo latest
82-
run: |
83-
set -x # print commands that are executed
84-
./scripts/runtox.sh "py${{ matrix.python-version }}-pymongo-latest"
85-
- name: Test redis latest
86-
run: |
87-
set -x # print commands that are executed
88-
./scripts/runtox.sh "py${{ matrix.python-version }}-redis-latest"
89-
- name: Test redis_py_cluster_legacy latest
90-
run: |
91-
set -x # print commands that are executed
92-
./scripts/runtox.sh "py${{ matrix.python-version }}-redis_py_cluster_legacy-latest"
93-
- name: Test sqlalchemy latest
94-
run: |
95-
set -x # print commands that are executed
96-
./scripts/runtox.sh "py${{ matrix.python-version }}-sqlalchemy-latest"
97-
- name: Generate coverage XML (Python 3.6)
98-
if: ${{ !cancelled() && matrix.python-version == '3.6' }}
99-
run: |
100-
export COVERAGE_RCFILE=.coveragerc36
101-
coverage combine .coverage-sentry-*
102-
coverage xml --ignore-errors
103-
- name: Generate coverage XML
104-
if: ${{ !cancelled() && matrix.python-version != '3.6' }}
105-
run: |
106-
coverage combine .coverage-sentry-*
107-
coverage xml
108-
- name: Upload coverage to Codecov
109-
if: ${{ !cancelled() }}
110-
uses: codecov/[email protected]
111-
with:
112-
token: ${{ secrets.CODECOV_TOKEN }}
113-
files: coverage.xml
114-
# make sure no plugins alter our coverage reports
115-
plugins: noop
116-
verbose: true
117-
- name: Upload test results to Codecov
118-
if: ${{ !cancelled() }}
119-
uses: codecov/test-results-action@v1
120-
with:
121-
token: ${{ secrets.CODECOV_TOKEN }}
122-
files: .junitxml
123-
verbose: true
12425
test-dbs-pinned:
12526
name: DBs (pinned)
12627
timeout-minutes: 30

scripts/populate_tox/config.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,15 @@
277277
"python": ">=3.9",
278278
"num_versions": 2,
279279
},
280+
"redis": {
281+
"package": "redis",
282+
"deps": {
283+
"*": ["fakeredis!=1.7.4", "pytest<8.0.0"],
284+
">=4.0,<5.0": ["fakeredis<2.31.0"],
285+
"py3.6,py3.7,py3.8": ["fakeredis<2.26.0"],
286+
"py3.7,py3.8,py3.9,py3.10,py3.11,py3.12,py3.13": ["pytest-asyncio"],
287+
},
288+
},
280289
"redis_py_cluster_legacy": {
281290
"package": "redis-py-cluster",
282291
},

scripts/populate_tox/populate_tox.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@
6969
"potel",
7070
# Integrations that can be migrated -- we should eventually remove all
7171
# of these from the IGNORE list
72-
"redis",
7372
"requests",
7473
"rq",
7574
}

scripts/populate_tox/tox.jinja

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,6 @@ envlist =
5454
# OpenTelemetry Experimental (POTel)
5555
{py3.8,py3.9,py3.10,py3.11,py3.12,py3.13}-potel
5656

57-
# Redis
58-
{py3.6,py3.8}-redis-v{3}
59-
{py3.7,py3.8,py3.11}-redis-v{4}
60-
{py3.7,py3.11,py3.12}-redis-v{5}
61-
{py3.7,py3.12,py3.13}-redis-latest
62-
6357
# Requests
6458
{py3.6,py3.8,py3.12,py3.13}-requests
6559

@@ -136,17 +130,6 @@ deps =
136130
# OpenTelemetry Experimental (POTel)
137131
potel: -e .[opentelemetry-experimental]
138132
139-
# Redis
140-
redis: fakeredis!=1.7.4
141-
redis: pytest<8.0.0
142-
{py3.6,py3.7,py3.8}-redis: fakeredis<2.26.0
143-
{py3.7,py3.8,py3.9,py3.10,py3.11,py3.12,py3.13}-redis: pytest-asyncio
144-
redis-v3: redis~=3.0
145-
redis-v4: redis~=4.0
146-
redis-v4: fakeredis<2.31.0
147-
redis-v5: redis~=5.0
148-
redis-latest: redis
149-
150133
# Requests
151134
requests: requests>=2.0
152135

tox.ini

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# The file (and all resulting CI YAMLs) then need to be regenerated via
1111
# "scripts/generate-test-files.sh".
1212
#
13-
# Last generated: 2025-09-18T10:42:56.677852+00:00
13+
# Last generated: 2025-09-19T10:59:45.339459+00:00
1414

1515
[tox]
1616
requires =
@@ -54,12 +54,6 @@ envlist =
5454
# OpenTelemetry Experimental (POTel)
5555
{py3.8,py3.9,py3.10,py3.11,py3.12,py3.13}-potel
5656

57-
# Redis
58-
{py3.6,py3.8}-redis-v{3}
59-
{py3.7,py3.8,py3.11}-redis-v{4}
60-
{py3.7,py3.11,py3.12}-redis-v{5}
61-
{py3.7,py3.12,py3.13}-redis-latest
62-
6357
# Requests
6458
{py3.6,py3.8,py3.12,py3.13}-requests
6559

@@ -109,7 +103,7 @@ envlist =
109103
{py3.10,py3.11,py3.12}-openai_agents-v0.0.19
110104
{py3.10,py3.12,py3.13}-openai_agents-v0.1.0
111105
{py3.10,py3.12,py3.13}-openai_agents-v0.2.11
112-
{py3.10,py3.12,py3.13}-openai_agents-v0.3.0
106+
{py3.10,py3.12,py3.13}-openai_agents-v0.3.1
113107

114108
{py3.8,py3.10,py3.11}-huggingface_hub-v0.24.7
115109
{py3.8,py3.12,py3.13}-huggingface_hub-v0.28.1
@@ -121,7 +115,7 @@ envlist =
121115
{py3.6,py3.7}-boto3-v1.12.49
122116
{py3.6,py3.9,py3.10}-boto3-v1.20.54
123117
{py3.7,py3.11,py3.12}-boto3-v1.28.85
124-
{py3.9,py3.12,py3.13}-boto3-v1.40.33
118+
{py3.9,py3.12,py3.13}-boto3-v1.40.34
125119

126120
{py3.6,py3.7,py3.8}-chalice-v1.16.0
127121
{py3.6,py3.7,py3.8}-chalice-v1.21.9
@@ -141,6 +135,13 @@ envlist =
141135
{py3.6,py3.10,py3.11}-pymongo-v3.13.0
142136
{py3.9,py3.12,py3.13}-pymongo-v4.15.1
143137

138+
{py3.6}-redis-v2.10.6
139+
{py3.6,py3.7,py3.8}-redis-v3.5.3
140+
{py3.7,py3.10,py3.11}-redis-v4.6.0
141+
{py3.8,py3.11,py3.12}-redis-v5.3.1
142+
{py3.9,py3.12,py3.13}-redis-v6.4.0
143+
{py3.9,py3.12,py3.13}-redis-v7.0.0b1
144+
144145
{py3.6}-redis_py_cluster_legacy-v1.3.6
145146
{py3.6,py3.7,py3.8}-redis_py_cluster_legacy-v2.1.3
146147

@@ -372,17 +373,6 @@ deps =
372373
# OpenTelemetry Experimental (POTel)
373374
potel: -e .[opentelemetry-experimental]
374375

375-
# Redis
376-
redis: fakeredis!=1.7.4
377-
redis: pytest<8.0.0
378-
{py3.6,py3.7,py3.8}-redis: fakeredis<2.26.0
379-
{py3.7,py3.8,py3.9,py3.10,py3.11,py3.12,py3.13}-redis: pytest-asyncio
380-
redis-v3: redis~=3.0
381-
redis-v4: redis~=4.0
382-
redis-v4: fakeredis<2.31.0
383-
redis-v5: redis~=5.0
384-
redis-latest: redis
385-
386376
# Requests
387377
requests: requests>=2.0
388378

@@ -460,7 +450,7 @@ deps =
460450
openai_agents-v0.0.19: openai-agents==0.0.19
461451
openai_agents-v0.1.0: openai-agents==0.1.0
462452
openai_agents-v0.2.11: openai-agents==0.2.11
463-
openai_agents-v0.3.0: openai-agents==0.3.0
453+
openai_agents-v0.3.1: openai-agents==0.3.1
464454
openai_agents: pytest-asyncio
465455

466456
huggingface_hub-v0.24.7: huggingface_hub==0.24.7
@@ -474,7 +464,7 @@ deps =
474464
boto3-v1.12.49: boto3==1.12.49
475465
boto3-v1.20.54: boto3==1.20.54
476466
boto3-v1.28.85: boto3==1.28.85
477-
boto3-v1.40.33: boto3==1.40.33
467+
boto3-v1.40.34: boto3==1.40.34
478468
{py3.7,py3.8}-boto3: urllib3<2.0.0
479469

480470
chalice-v1.16.0: chalice==1.16.0
@@ -498,6 +488,18 @@ deps =
498488
pymongo-v4.15.1: pymongo==4.15.1
499489
pymongo: mockupdb
500490

491+
redis-v2.10.6: redis==2.10.6
492+
redis-v3.5.3: redis==3.5.3
493+
redis-v4.6.0: redis==4.6.0
494+
redis-v5.3.1: redis==5.3.1
495+
redis-v6.4.0: redis==6.4.0
496+
redis-v7.0.0b1: redis==7.0.0b1
497+
redis: fakeredis!=1.7.4
498+
redis: pytest<8.0.0
499+
redis-v4.6.0: fakeredis<2.31.0
500+
{py3.6,py3.7,py3.8}-redis: fakeredis<2.26.0
501+
{py3.7,py3.8,py3.9,py3.10,py3.11,py3.12,py3.13}-redis: pytest-asyncio
502+
501503
redis_py_cluster_legacy-v1.3.6: redis-py-cluster==1.3.6
502504
redis_py_cluster_legacy-v2.1.3: redis-py-cluster==2.1.3
503505

0 commit comments

Comments
 (0)