ci: Isolate `httpx` test suite from `httpx2` (#7398) · intertermux-code/sentry-python@fb85760 · GitHub
Skip to content

Commit fb85760

Browse files
ZaafirRizwanclaude
andauthored
ci: Isolate httpx test suite from httpx2 (getsentry#7398)
Closes getsentry#7151 ### Problem `scripts/runtox.sh` selects tox environments with an unanchored `grep` over `tox -l`: ```sh ENV="$(uv run tox -l | grep -- "$searchstring" | grep -v -- '-latest$' | tr $'\n' ',')" ``` The Network workflow's `Test httpx` step passes `py<version>-httpx`, which therefore also matches the `py<version>-httpx2-*` environments. The result: - On versions where both suites exist (e.g. 3.12), the `httpx` job ran the httpx2 suite as well as its own, duplicating the work already done by the `httpx2` job. - On 3.14 / 3.14t / 3.15, where there are no `httpx` environments at all, the `httpx` job ran **only** httpx2 environments — which is what the issue reports. ### Fix Rename the tox test suite from `httpx` to `httpx0` (httpx is still on 0.x), so the `httpx0` and `httpx2` selectors can no longer collide. This follows the precedent set for `openai-base` in getsentry#4730, where the suite was renamed rather than making the selector boundary-aware. `integration_name: "httpx"` is added alongside the rename so the suite keeps resolving to the existing integration: - `_TESTPATH` stays `tests/integrations/httpx` (the test directory is unchanged) - the minimum supported version lookup against `_MIN_VERSIONS` in `sentry_sdk/integrations/__init__.py` keeps working, so the suite still floors at httpx 0.16.0 Without `integration_name` the suite would point at a nonexistent `tests/integrations/httpx0` directory and lose its version floor. ### Changes - `scripts/populate_tox/config.py` — rename the suite, add `integration_name` - `scripts/split_tox_gh_actions/split_tox_gh_actions.py` — update the `Network` group - `scripts/populate_tox/README.md` — the `python` key example documents this suite; updated to match - `tox.ini` and `.github/workflows/test-integrations-network.yml` — regenerated The `tox.ini` diff is a pure rename: 207 lines removed, 207 added, no version or dependency changes. ### Note The same class of collision still exists for `redis`, which is a prefix of `redis_py_cluster_legacy`, so the `Test redis` step also runs the cluster-legacy suite. Left out of this PR to keep it scoped to getsentry#7151 — happy to open a separate issue for it. Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
1 parent 4e3528e commit fb85760

5 files changed

Lines changed: 231 additions & 230 deletions

File tree

‎.github/workflows/test-integrations-network.yml‎

Lines changed: 2 additions & 2 deletions

‎scripts/populate_tox/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ a Python version older than 3.9 if the HTTPX version is 0.28 or higher, you can
146146
say:
147147

148148
```python
149-
"httpx": {
149+
"httpx0": {
150150
"python": {
151151
# run the test suite for httpx v0.28+ on Python 3.9+ only
152152
">=0.28": ">=3.9",

‎scripts/populate_tox/config.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,9 @@
205205
},
206206
"python": ">=3.7",
207207
},
208-
"httpx": {
208+
"httpx0": {
209209
"package": "httpx",
210+
"integration_name": "httpx",
210211
"deps": {
211212
"*": ["anyio>=3,<5", "pytest-asyncio"],
212213
"<0.24": ["anyio<4"],

‎scripts/split_tox_gh_actions/split_tox_gh_actions.py‎

Lines changed: 1 addition & 1 deletion

0 commit comments

Comments
 (0)