Skip to content

ci: Isolate httpx test suite from httpx2 - #7398

Open
ZaafirRizwan wants to merge 1 commit into
getsentry:masterfrom
ZaafirRizwan:httpx0-rename
Open

ci: Isolate httpx test suite from httpx2#7398
ZaafirRizwan wants to merge 1 commit into
getsentry:masterfrom
ZaafirRizwan:httpx0-rename

Conversation

@ZaafirRizwan

Copy link
Copy Markdown

Closes #7151

Problem

scripts/runtox.sh selects tox environments with an unanchored grep over tox -l:

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 #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 #7151 — happy to open a separate issue for it.

`scripts/runtox.sh` selects tox environments with an unanchored `grep` over
`tox -l`, so the `Test httpx` step's selector `py<version>-httpx` also matched
the `py<version>-httpx2-*` environments.

That meant the `httpx` CI job ran the httpx2 suite in addition to its own, and
on Python 3.14/3.14t/3.15 — where there are no `httpx` environments at all —
the `httpx` job ran *only* httpx2 environments, so the two suites were no
longer distinguishable in CI.

Rename the tox suite from `httpx` to `httpx0` (httpx is still on 0.x) so the
two selectors can no longer collide, following the precedent set for
`openai-base` in getsentry#4730. `integration_name: "httpx"` keeps the suite pointed at
`tests/integrations/httpx` and preserves the minimum supported version lookup
in `sentry_sdk/integrations/__init__.py`.

`tox.ini` and the Network workflow are regenerated accordingly.

Closes getsentry#7151

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

httpx CI group also runs httpx2 test suite

1 participant