Skip to content

Commit 222badb

Browse files
authored
tests: Move rq under toxgen (#4818)
### Description - moved rq under toxgen 🎉 it needed quite some fiddling around with fakeredis versions but seems to work now #### 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 f3b3c70 commit 222badb

File tree

5 files changed

+27
-146
lines changed

5 files changed

+27
-146
lines changed

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

Lines changed: 0 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -22,100 +22,6 @@ env:
2222
CACHED_BUILD_PATHS: |
2323
${{ github.workspace }}/dist-serverless
2424
jobs:
25-
test-tasks-latest:
26-
name: Tasks (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-
# Use Docker container only for Python 3.6
39-
container: ${{ matrix.python-version == '3.6' && 'python:3.6' || null }}
40-
steps:
41-
- uses: actions/[email protected]
42-
- uses: actions/setup-python@v6
43-
if: ${{ matrix.python-version != '3.6' }}
44-
with:
45-
python-version: ${{ matrix.python-version }}
46-
allow-prereleases: true
47-
- name: Start Redis
48-
uses: supercharge/[email protected]
49-
- name: Install Java
50-
uses: actions/setup-java@v5
51-
with:
52-
distribution: 'temurin'
53-
java-version: '21'
54-
- name: Setup Test Env
55-
run: |
56-
pip install "coverage[toml]" tox
57-
- name: Erase coverage
58-
run: |
59-
coverage erase
60-
- name: Test arq latest
61-
run: |
62-
set -x # print commands that are executed
63-
./scripts/runtox.sh "py${{ matrix.python-version }}-arq-latest"
64-
- name: Test beam latest
65-
run: |
66-
set -x # print commands that are executed
67-
./scripts/runtox.sh "py${{ matrix.python-version }}-beam-latest"
68-
- name: Test celery latest
69-
run: |
70-
set -x # print commands that are executed
71-
./scripts/runtox.sh "py${{ matrix.python-version }}-celery-latest"
72-
- name: Test dramatiq latest
73-
run: |
74-
set -x # print commands that are executed
75-
./scripts/runtox.sh "py${{ matrix.python-version }}-dramatiq-latest"
76-
- name: Test huey latest
77-
run: |
78-
set -x # print commands that are executed
79-
./scripts/runtox.sh "py${{ matrix.python-version }}-huey-latest"
80-
- name: Test ray latest
81-
run: |
82-
set -x # print commands that are executed
83-
./scripts/runtox.sh "py${{ matrix.python-version }}-ray-latest"
84-
- name: Test rq latest
85-
run: |
86-
set -x # print commands that are executed
87-
./scripts/runtox.sh "py${{ matrix.python-version }}-rq-latest"
88-
- name: Test spark latest
89-
run: |
90-
set -x # print commands that are executed
91-
./scripts/runtox.sh "py${{ matrix.python-version }}-spark-latest"
92-
- name: Generate coverage XML (Python 3.6)
93-
if: ${{ !cancelled() && matrix.python-version == '3.6' }}
94-
run: |
95-
export COVERAGE_RCFILE=.coveragerc36
96-
coverage combine .coverage-sentry-*
97-
coverage xml --ignore-errors
98-
- name: Generate coverage XML
99-
if: ${{ !cancelled() && matrix.python-version != '3.6' }}
100-
run: |
101-
coverage combine .coverage-sentry-*
102-
coverage xml
103-
- name: Upload coverage to Codecov
104-
if: ${{ !cancelled() }}
105-
uses: codecov/[email protected]
106-
with:
107-
token: ${{ secrets.CODECOV_TOKEN }}
108-
files: coverage.xml
109-
# make sure no plugins alter our coverage reports
110-
plugins: noop
111-
verbose: true
112-
- name: Upload test results to Codecov
113-
if: ${{ !cancelled() }}
114-
uses: codecov/test-results-action@v1
115-
with:
116-
token: ${{ secrets.CODECOV_TOKEN }}
117-
files: .junitxml
118-
verbose: true
11925
test-tasks-pinned:
12026
name: Tasks (pinned)
12127
timeout-minutes: 30

scripts/populate_tox/config.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,17 @@
292292
"requests": {
293293
"package": "requests",
294294
},
295+
"rq": {
296+
"package": "rq",
297+
"deps": {
298+
# https://github.com/jamesls/fakeredis/issues/245
299+
# https://github.com/cunla/fakeredis-py/issues/341
300+
"*": ["fakeredis<2.28.0"],
301+
"<0.9": ["fakeredis<1.0", "redis<3.2.2"],
302+
">=0.9,<0.14": ["fakeredis>=1.0,<1.7.4"],
303+
"py3.6,py3.7": ["fakeredis!=2.26.0"],
304+
},
305+
},
295306
"sanic": {
296307
"package": "sanic",
297308
"deps": {

scripts/populate_tox/populate_tox.py

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

7675

scripts/populate_tox/tox.jinja

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,6 @@ envlist =
5757
# Requests
5858
{py3.6,py3.8,py3.12,py3.13}-requests
5959

60-
# RQ (Redis Queue)
61-
{py3.6}-rq-v{0.6}
62-
{py3.6,py3.9}-rq-v{0.13,1.0}
63-
{py3.6,py3.11}-rq-v{1.5,1.10}
64-
{py3.7,py3.11,py3.12}-rq-v{1.15,1.16}
65-
{py3.7,py3.12,py3.13}-rq-latest
66-
6760
# === Integrations - Auto-generated ===
6861
# These come from the populate_tox.py script. Eventually we should move all
6962
# integration tests there.
@@ -133,24 +126,6 @@ deps =
133126
# Requests
134127
requests: requests>=2.0
135128
136-
# RQ (Redis Queue)
137-
# https://github.com/jamesls/fakeredis/issues/245
138-
rq-v{0.6}: fakeredis<1.0
139-
rq-v{0.6}: redis<3.2.2
140-
rq-v{0.13,1.0,1.5,1.10}: fakeredis>=1.0,<1.7.4
141-
rq-v{1.15,1.16}: fakeredis<2.28.0
142-
{py3.6,py3.7}-rq-v{1.15,1.16}: fakeredis!=2.26.0 # https://github.com/cunla/fakeredis-py/issues/341
143-
rq-latest: fakeredis<2.28.0
144-
{py3.6,py3.7}-rq-latest: fakeredis!=2.26.0 # https://github.com/cunla/fakeredis-py/issues/341
145-
rq-v0.6: rq~=0.6.0
146-
rq-v0.13: rq~=0.13.0
147-
rq-v1.0: rq~=1.0.0
148-
rq-v1.5: rq~=1.5.0
149-
rq-v1.10: rq~=1.10.0
150-
rq-v1.15: rq~=1.15.0
151-
rq-v1.16: rq~=1.16.0
152-
rq-latest: rq
153-
154129
# === Integrations - Auto-generated ===
155130
# These come from the populate_tox.py script. Eventually we should move all
156131
# integration tests there.

tox.ini

Lines changed: 16 additions & 26 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-19T10:59:45.339459+00:00
13+
# Last generated: 2025-09-19T11:39:21.755227+00:00
1414

1515
[tox]
1616
requires =
@@ -57,13 +57,6 @@ envlist =
5757
# Requests
5858
{py3.6,py3.8,py3.12,py3.13}-requests
5959

60-
# RQ (Redis Queue)
61-
{py3.6}-rq-v{0.6}
62-
{py3.6,py3.9}-rq-v{0.13,1.0}
63-
{py3.6,py3.11}-rq-v{1.5,1.10}
64-
{py3.7,py3.11,py3.12}-rq-v{1.15,1.16}
65-
{py3.7,py3.12,py3.13}-rq-latest
66-
6760
# === Integrations - Auto-generated ===
6861
# These come from the populate_tox.py script. Eventually we should move all
6962
# integration tests there.
@@ -231,6 +224,11 @@ envlist =
231224
{py3.9,py3.10}-ray-v2.7.2
232225
{py3.9,py3.12,py3.13}-ray-v2.49.1
233226

227+
{py3.6}-rq-v0.8.2
228+
{py3.6,py3.7}-rq-v0.13.0
229+
{py3.7,py3.11,py3.12}-rq-v1.16.2
230+
{py3.9,py3.12,py3.13}-rq-v2.6.0
231+
234232
{py3.8,py3.9}-spark-v3.0.3
235233
{py3.8,py3.10,py3.11}-spark-v3.5.6
236234
{py3.9,py3.12,py3.13}-spark-v4.0.1
@@ -376,24 +374,6 @@ deps =
376374
# Requests
377375
requests: requests>=2.0
378376

379-
# RQ (Redis Queue)
380-
# https://github.com/jamesls/fakeredis/issues/245
381-
rq-v{0.6}: fakeredis<1.0
382-
rq-v{0.6}: redis<3.2.2
383-
rq-v{0.13,1.0,1.5,1.10}: fakeredis>=1.0,<1.7.4
384-
rq-v{1.15,1.16}: fakeredis<2.28.0
385-
{py3.6,py3.7}-rq-v{1.15,1.16}: fakeredis!=2.26.0 # https://github.com/cunla/fakeredis-py/issues/341
386-
rq-latest: fakeredis<2.28.0
387-
{py3.6,py3.7}-rq-latest: fakeredis!=2.26.0 # https://github.com/cunla/fakeredis-py/issues/341
388-
rq-v0.6: rq~=0.6.0
389-
rq-v0.13: rq~=0.13.0
390-
rq-v1.0: rq~=1.0.0
391-
rq-v1.5: rq~=1.5.0
392-
rq-v1.10: rq~=1.10.0
393-
rq-v1.15: rq~=1.15.0
394-
rq-v1.16: rq~=1.16.0
395-
rq-latest: rq
396-
397377
# === Integrations - Auto-generated ===
398378
# These come from the populate_tox.py script. Eventually we should move all
399379
# integration tests there.
@@ -618,6 +598,16 @@ deps =
618598
ray-v2.7.2: ray==2.7.2
619599
ray-v2.49.1: ray==2.49.1
620600

601+
rq-v0.8.2: rq==0.8.2
602+
rq-v0.13.0: rq==0.13.0
603+
rq-v1.16.2: rq==1.16.2
604+
rq-v2.6.0: rq==2.6.0
605+
rq: fakeredis<2.28.0
606+
rq-v0.8.2: fakeredis<1.0
607+
rq-v0.8.2: redis<3.2.2
608+
rq-v0.13.0: fakeredis>=1.0,<1.7.4
609+
{py3.6,py3.7}-rq: fakeredis!=2.26.0
610+
621611
spark-v3.0.3: pyspark==3.0.3
622612
spark-v3.5.6: pyspark==3.5.6
623613
spark-v4.0.1: pyspark==4.0.1

0 commit comments

Comments
 (0)