From 560a7b75c683c9f5b0a5c58eebd68429680309ad Mon Sep 17 00:00:00 2001 From: "sentry-junior[bot]" <264270552+sentry-junior[bot]@users.noreply.github.com> Date: Tue, 17 Nov 2026 13:12:46 +0000 Subject: [PATCH 1/5] ci: Split Web 1 test group so Django runs on its own (#8312) Django tests take long, split them off into a separate group so that we can parallelize better. New layout: - **Web 1**: Django - **Web 2**: Flask, Starlette, FastAPI (the rest of the old Web 1) - **Web 3**: aiohttp, asgi, bottle, falcon, litestar, pyramid, quart, sanic, starlite, tornado (the old Web 2) via @sentrivana. -- [View Session](https://junior-prod.sentry.dev/conversations/slack%3AC0BTREZTS2Z%3A1794920307.639339) [[Sentry]](https://sentry.sentry.io/explore/conversations/slack%3AC0BTREZTS2Z%3A1794920307.639339/?project=4510944073809921) Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: Ivana Kellyer <131587164+sentrivana@users.noreply.github.com> --- .github/workflows/test-integrations-web-1.yml | 12 --- .github/workflows/test-integrations-web-2.yml | 42 ++------- .github/workflows/test-integrations-web-3.yml | 93 +++++++++++++++++++ .github/workflows/test.yml | 7 ++ .../split_tox_gh_actions.py | 4 +- tox.ini | 8 +- 6 files changed, 116 insertions(+), 50 deletions(-) create mode 100644 .github/workflows/test-integrations-web-3.yml diff --git a/.github/workflows/test-integrations-web-1.yml b/.github/workflows/test-integrations-web-1.yml index 96da815367..c0d54741ac 100644 --- a/.github/workflows/test-integrations-web-1.yml +++ b/.github/workflows/test-integrations-web-1.yml @@ -58,18 +58,6 @@ jobs: run: | set -x # print commands that are executed ./scripts/runtox.sh "py${{ matrix.python-version }}-django" - - name: Test flask - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-flask" - - name: Test starlette - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-starlette" - - name: Test fastapi - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-fastapi" - name: Upload coverage data if: ${{ !cancelled() }} continue-on-error: true diff --git a/.github/workflows/test-integrations-web-2.yml b/.github/workflows/test-integrations-web-2.yml index 415f191aba..4bed53a034 100644 --- a/.github/workflows/test-integrations-web-2.yml +++ b/.github/workflows/test-integrations-web-2.yml @@ -17,7 +17,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.6","3.7","3.8","3.9","3.10","3.11","3.12","3.13","3.14","3.14t","3.15","3.15t"] + python-version: ["3.6","3.7","3.8","3.9","3.10","3.11","3.13","3.14","3.14t","3.15","3.15t"] os: [ubuntu-22.04] env: # 3.6/3.7 run in the python:X.Y container; tell uv to use that system Python. @@ -37,46 +37,18 @@ jobs: - name: Setup Test Env run: | uv sync - - name: Test aiohttp + - name: Test flask run: | set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-aiohttp" - - name: Test asgi + ./scripts/runtox.sh "py${{ matrix.python-version }}-flask" + - name: Test starlette run: | set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-asgi" - - name: Test bottle + ./scripts/runtox.sh "py${{ matrix.python-version }}-starlette" + - name: Test fastapi run: | set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-bottle" - - name: Test falcon - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-falcon" - - name: Test litestar - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-litestar" - - name: Test pyramid - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-pyramid" - - name: Test quart - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-quart" - - name: Test sanic - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-sanic" - - name: Test starlite - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-starlite" - - name: Test tornado - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-tornado" + ./scripts/runtox.sh "py${{ matrix.python-version }}-fastapi" - name: Upload coverage data if: ${{ !cancelled() }} continue-on-error: true diff --git a/.github/workflows/test-integrations-web-3.yml b/.github/workflows/test-integrations-web-3.yml new file mode 100644 index 0000000000..5034ecfc11 --- /dev/null +++ b/.github/workflows/test-integrations-web-3.yml @@ -0,0 +1,93 @@ +# Do not edit this YAML file. This file is generated automatically by executing +# python scripts/split_tox_gh_actions/split_tox_gh_actions.py +# The template responsible for it is in +# scripts/split_tox_gh_actions/templates/base.jinja +name: Test Web 3 +# Reusable workflow. It is invoked by the top-level `test.yml` orchestrator. +on: + workflow_call: +permissions: + contents: read + actions: read +jobs: + test-web_3: + name: Web 3 + timeout-minutes: 30 + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + python-version: ["3.6","3.7","3.8","3.9","3.10","3.11","3.12","3.13","3.14","3.14t","3.15","3.15t"] + os: [ubuntu-22.04] + env: + # 3.6/3.7 run in the python:X.Y container; tell uv to use that system Python. + TOX_UV_PYTHON_PREFERENCE: ${{ (matrix.python-version == '3.6' || matrix.python-version == '3.7') && 'only-system' || 'managed' }} + container: ${{ (matrix.python-version == '3.6' || matrix.python-version == '3.7') && format('python:{0}', matrix.python-version) || null }} + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - name: Install uv + uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3 + with: + enable-cache: false + - name: Mark workspace safe for git (3.6/3.7 container) + # needed to make git rev-parse work in the containers + # subprocesses (e.g. sentry_sdk.utils.get_git_revision) can run git. + if: ${{ matrix.python-version == '3.6' || matrix.python-version == '3.7' }} + run: git config --global --add safe.directory "$GITHUB_WORKSPACE" + - name: Setup Test Env + run: | + uv sync + - name: Test aiohttp + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-aiohttp" + - name: Test asgi + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-asgi" + - name: Test bottle + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-bottle" + - name: Test falcon + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-falcon" + - name: Test litestar + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-litestar" + - name: Test pyramid + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-pyramid" + - name: Test quart + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-quart" + - name: Test sanic + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-sanic" + - name: Test starlite + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-starlite" + - name: Test tornado + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-tornado" + - name: Upload coverage data + if: ${{ !cancelled() }} + continue-on-error: true + uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 + with: + name: coverage-web_3-${{ matrix.python-version }} + # .coverage-* / .junitxml-* are dotfiles, excluded by default + include-hidden-files: true + path: | + .coverage-sentry-* + .junitxml-* + if-no-files-found: 'ignore' + retention-days: 1 + overwrite: true diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 48064ee647..9bab8fb54d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -130,6 +130,11 @@ jobs: needs: files-changed if: ${{ needs.files-changed.outputs.code == 'true' }} uses: ./.github/workflows/test-integrations-web-2.yml + web_3: + name: Web 3 + needs: files-changed + if: ${{ needs.files-changed.outputs.code == 'true' }} + uses: ./.github/workflows/test-integrations-web-3.yml misc: name: Misc needs: files-changed @@ -153,6 +158,7 @@ jobs: - tasks - web_1 - web_2 + - web_3 - misc # Report whatever coverage exists, even if some test jobs failed. if: ${{ !cancelled() && needs.files-changed.outputs.code == 'true' }} @@ -201,6 +207,7 @@ jobs: - tasks - web_1 - web_2 + - web_3 - misc # Always run so it can gate merges even when a dependency failed. if: always() diff --git a/scripts/split_tox_gh_actions/split_tox_gh_actions.py b/scripts/split_tox_gh_actions/split_tox_gh_actions.py index 9a554ca820..64ff3c0d23 100755 --- a/scripts/split_tox_gh_actions/split_tox_gh_actions.py +++ b/scripts/split_tox_gh_actions/split_tox_gh_actions.py @@ -147,11 +147,13 @@ ], "Web 1": [ "django", + ], + "Web 2": [ "flask", "starlette", "fastapi", ], - "Web 2": [ + "Web 3": [ "aiohttp", "asgi", "bottle", diff --git a/tox.ini b/tox.ini index 3d7e59bdbf..42a737b34f 100644 --- a/tox.ini +++ b/tox.ini @@ -312,6 +312,8 @@ envlist = {py3.12,py3.14,py3.15,py3.15t}-django-v6.1.3 {py3.12,py3.14,py3.15,py3.15t}-django-latest + + # ~~~ Web 2 ~~~ {py3.6,py3.7,py3.8}-flask-v1.1.4 {py3.8,py3.14,py3.15,py3.15t}-flask-v2.3.3 {py3.9,py3.14,py3.15,py3.15t}-flask-v3.1.3 @@ -329,7 +331,7 @@ envlist = {py3.11,py3.14,py3.15,py3.15t}-fastapi-latest - # ~~~ Web 2 ~~~ + # ~~~ Web 3 ~~~ {py3.7}-aiohttp-v3.4.4 {py3.7,py3.8,py3.9}-aiohttp-v3.7.4 {py3.8,py3.12,py3.13}-aiohttp-v3.10.11 @@ -16834,6 +16836,8 @@ deps = {py3.14,py3.14t}-django: coverage==7.11.0 django-latest: pytest-asyncio + + # ~~~ Web 2 ~~~ flask-v1.1.4: flask==1.1.4 py3.8-flask-v1.1.4: Flask-Login==0.6.3 @@ -17742,7 +17746,7 @@ deps = {py3.6}-fastapi: aiocontextvars - # ~~~ Web 2 ~~~ + # ~~~ Web 3 ~~~ aiohttp-v3.4.4: aiohttp==3.4.4 aiohttp-v3.7.4: aiohttp==3.7.4 From 6c15449df9d40c564a0d467247c4799ad5098b73 Mon Sep 17 00:00:00 2001 From: Ariel Even Date: Tue, 17 Nov 2026 15:29:47 +0200 Subject: [PATCH 2/5] fix(tracing): Strip whitespace around '=' in incoming baggage items (#8302) The W3C baggage format allows optional whitespace around '=' in a list member. from_incoming_header only stripped the item as a whole, so 'sentry-sample_rand = 0.5' produced the key 'sample_rand ' and the value ' 0.5'. The incoming sample_rand was then ignored and the corrupted keys were re-sent downstream percent-encoded. ### Description #### Issues #### Reminders - Please add tests to validate your changes, and lint your code using `uv run ruff`. - 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) --- sentry_sdk/tracing_utils.py | 1 + tests/tracing/test_baggage.py | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/sentry_sdk/tracing_utils.py b/sentry_sdk/tracing_utils.py index dd91da3b4d..28c58576a3 100644 --- a/sentry_sdk/tracing_utils.py +++ b/sentry_sdk/tracing_utils.py @@ -786,6 +786,7 @@ def from_incoming_header( with capture_internal_exceptions(): item = item.strip() key, val = item.split("=", 1) + key, val = key.strip(), val.strip() if Baggage.SENTRY_PREFIX_REGEX.match(key): baggage_key = unquote(key.split("-")[1]) sentry_items[baggage_key] = unquote(val) diff --git a/tests/tracing/test_baggage.py b/tests/tracing/test_baggage.py index 3d70a7cfea..6acd3ff590 100644 --- a/tests/tracing/test_baggage.py +++ b/tests/tracing/test_baggage.py @@ -96,3 +96,22 @@ def test_malformed_baggage(): assert baggage.sentry_items == {} assert baggage.third_party_items == "" assert baggage.mutable + + +def test_baggage_with_optional_whitespace_around_equals(): + # W3C baggage allows optional whitespace around "=" in list members + header = ( + "sentry-trace_id = 771a43a4192642f0b136d5159a501700, " + "sentry-sample_rand= 0.5, other-vendor = foo" + ) + + baggage = Baggage.from_incoming_header(header) + + assert baggage.sentry_items == { + "trace_id": "771a43a4192642f0b136d5159a501700", + "sample_rand": "0.5", + } + assert baggage._sample_rand() == 0.5 + assert baggage.serialize() == ( + "sentry-trace_id=771a43a4192642f0b136d5159a501700,sentry-sample_rand=0.5" + ) From 425ec7d983700703e7ec42b1fb4530a5e88bd3cd Mon Sep 17 00:00:00 2001 From: "sentry-junior[bot]" <264270552+sentry-junior[bot]@users.noreply.github.com> Date: Tue, 17 Nov 2026 14:53:11 +0100 Subject: [PATCH 3/5] ci(mypy): Enable possibly-undefined error code (#8290) TL;DR: Get rid of cases where a name could be possibly undefined, because there exists a code branch where it's not set. ### Description Turns on mypy's `possibly-undefined` error code. It flags names that are only assigned on some code paths (in one `if` branch, inside a `try`, in a conditional import) and then used where they might not be bound. At runtime that's an `UnboundLocalError`, which in the SDK would crash the host app's code path. It reported 15 errors in 11 files. Nearly all were correct code that mypy couldn't prove was safe. They're fixed without changing behavior: - **Initialize before branching**: `name = None` in the Litestar/Starlite route handler patch (falls through to the existing `_DEFAULT_TRANSACTION_NAME` fallback), and moved `agent_name = None` out of the `try` in `langchain._get_request_data`. - **Restructure so the binding is obvious**: - `transport.py`: return `PoolManager` straight from the SOCKS `except ImportError` instead of tracking a `use_socks_proxy` flag. - `spotlight.py`: compute `spotlight_js_url` before the `try`. `urljoin` doesn't raise `URLError`, so the exception handling stays the same. - `chalice.py`: pick the patched class once and use it for both reading and patching `_get_view_function_response`, instead of checking the version twice. - `stdlib.py`: `set_on_span` starts as `None` and the tunnel block checks it instead of `span`. They're set together, and spans don't define `__bool__`, so the two checks are equivalent. - **Targeted ignore**: `grpc/aio/server.py` keeps its four explicit `request_streaming`/`response_streaming` branches, which are exhaustive, so the final `handler_factory(wrapped, ...)` call gets `# type: ignore[possibly-undefined]`. - **Fix an annotation**: `beam.raise_exception` always re-raises, so it now returns `NoReturn` instead of `None`. Latent bugs, fixed minimally (I don't know of a real trigger for either): - `mcp.py`: `_tool_handler_wrapper` and `_prompt_handler_wrapper` leave `handler_name` unbound if they get no positional args and no truthy `name` kwarg. That raises `UnboundLocalError` before the user's handler runs. Both now default to `"unknown"`, the same as `_resource_handler_wrapper` already does. - `quart.py`: `_request_websocket_started` leaves `request_websocket` unbound if neither a request nor a websocket context is active. That shouldn't happen for `request_started`/`websocket_started` signals. It now returns early in that case. The branches are reordered so the websocket context still wins when both are active, as before. `enable_error_code` now lists both `possibly-undefined` and `unused-awaitable` (from getsentry/sentry-python#8281, merged into this branch). The sibling mypy follow-up PRs will still conflict trivially on that line; merge the lists when rebasing. Follow-up from getsentry/sentry-python#8281. via @sentrivana. -- [View Session](https://junior-prod.sentry.dev/conversations/agent%3A7a83c05e74f882736a37443f4dfc9ae1) [[Sentry]](https://sentry.sentry.io/explore/conversations/agent%3A7a83c05e74f882736a37443f4dfc9ae1/?project=4510944073809921) --------- Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: Ivana Kellyer <131587164+sentrivana@users.noreply.github.com> --- pyproject.toml | 2 +- sentry_sdk/integrations/beam.py | 4 ++-- sentry_sdk/integrations/chalice.py | 15 +++++++-------- sentry_sdk/integrations/grpc/aio/server.py | 6 ++++-- sentry_sdk/integrations/langchain.py | 2 +- sentry_sdk/integrations/litestar.py | 1 + sentry_sdk/integrations/mcp.py | 2 ++ sentry_sdk/integrations/quart.py | 6 ++++-- sentry_sdk/integrations/starlite.py | 1 + sentry_sdk/integrations/stdlib.py | 3 ++- sentry_sdk/spotlight.py | 6 +++--- sentry_sdk/transport.py | 8 ++------ 12 files changed, 30 insertions(+), 26 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 8eef8da39f..643a275175 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -147,7 +147,7 @@ disallow_incomplete_defs = true disallow_subclassing_any = true disallow_untyped_decorators = true disallow_untyped_defs = true -enable_error_code = ["unused-awaitable"] +enable_error_code = ["possibly-undefined", "unused-awaitable"] no_implicit_optional = true python_version = "3.11" strict_equality = true diff --git a/sentry_sdk/integrations/beam.py b/sentry_sdk/integrations/beam.py index 5141cfb231..e4100e5f95 100644 --- a/sentry_sdk/integrations/beam.py +++ b/sentry_sdk/integrations/beam.py @@ -14,7 +14,7 @@ ) if TYPE_CHECKING: - from typing import Any, Callable, Iterator, TypeVar + from typing import Any, Callable, Iterator, NoReturn, TypeVar from sentry_sdk._types import ExcInfo @@ -141,7 +141,7 @@ def _capture_exception(exc_info: "ExcInfo") -> None: sentry_sdk.capture_event(event, hint=hint) -def raise_exception() -> None: +def raise_exception() -> "NoReturn": """ Raise an exception. """ diff --git a/sentry_sdk/integrations/chalice.py b/sentry_sdk/integrations/chalice.py index 16deb0950c..40b52fe7d3 100644 --- a/sentry_sdk/integrations/chalice.py +++ b/sentry_sdk/integrations/chalice.py @@ -161,13 +161,15 @@ def setup_once() -> None: raise DidNotEnable("Unparsable Chalice version: {}".format(CHALICE_VERSION)) if version < (1, 20): - old_get_view_function_response = Chalice._get_view_function_response + view_function_response_owner = Chalice else: from chalice.app import RestAPIEventHandler # noqa: PLC0415 - old_get_view_function_response = ( - RestAPIEventHandler._get_view_function_response - ) + view_function_response_owner = RestAPIEventHandler + + old_get_view_function_response = ( + view_function_response_owner._get_view_function_response + ) def sentry_event_response( app: "Any", view_function: "F", function_args: "Dict[str, Any]" @@ -180,9 +182,6 @@ def sentry_event_response( app, wrapped_view_function, function_args ) - if version < (1, 20): - Chalice._get_view_function_response = sentry_event_response - else: - RestAPIEventHandler._get_view_function_response = sentry_event_response + view_function_response_owner._get_view_function_response = sentry_event_response # for everything else (like events) chalice.app.EventSourceHandler = EventSourceHandler diff --git a/sentry_sdk/integrations/grpc/aio/server.py b/sentry_sdk/integrations/grpc/aio/server.py index 15dcacab59..99422b9edf 100644 --- a/sentry_sdk/integrations/grpc/aio/server.py +++ b/sentry_sdk/integrations/grpc/aio/server.py @@ -127,8 +127,10 @@ async def wrapped(request: "Any", context: "ServicerContext") -> "Any": # type: async for r in handler.stream_stream(request, context): yield r - return handler_factory( - wrapped, + # The four branches above cover every streaming combination, so both + # names are always bound here. + return handler_factory( # type: ignore[possibly-undefined] + wrapped, # type: ignore[possibly-undefined] request_deserializer=handler.request_deserializer, response_serializer=handler.response_serializer, ) diff --git a/sentry_sdk/integrations/langchain.py b/sentry_sdk/integrations/langchain.py index 78242ba92c..e9a1b4ca6e 100644 --- a/sentry_sdk/integrations/langchain.py +++ b/sentry_sdk/integrations/langchain.py @@ -984,8 +984,8 @@ def _get_request_data( ) tools = tools if tools and len(tools) > 0 else None + agent_name = None try: - agent_name = None if len(args) > 1: agent_name = args[1].get("run_name") if agent_name is None: diff --git a/sentry_sdk/integrations/litestar.py b/sentry_sdk/integrations/litestar.py index 612c4fbfe8..dbff6ee41f 100644 --- a/sentry_sdk/integrations/litestar.py +++ b/sentry_sdk/integrations/litestar.py @@ -298,6 +298,7 @@ async def handle_wrapper( route_handler = scope.get("route_handler") + name = None func = None if route_handler.name is not None: name = route_handler.name diff --git a/sentry_sdk/integrations/mcp.py b/sentry_sdk/integrations/mcp.py index 5fc186f505..0500e1bf3c 100644 --- a/sentry_sdk/integrations/mcp.py +++ b/sentry_sdk/integrations/mcp.py @@ -291,6 +291,7 @@ async def _tool_handler_wrapper( original_kwargs = original_kwargs or {} + handler_name = "unknown" if original_args: handler_name = original_args[0] elif original_kwargs.get("name"): @@ -521,6 +522,7 @@ async def _prompt_handler_wrapper( original_kwargs = original_kwargs or {} + handler_name = "unknown" if original_args: handler_name = original_args[0] elif original_kwargs.get("name"): diff --git a/sentry_sdk/integrations/quart.py b/sentry_sdk/integrations/quart.py index 0aa6dedfa4..0a7e2105fc 100644 --- a/sentry_sdk/integrations/quart.py +++ b/sentry_sdk/integrations/quart.py @@ -177,10 +177,12 @@ async def _request_websocket_started(app: "Quart", **kwargs: "Any") -> None: if integration is None: return - if has_request_context(): - request_websocket = request._get_current_object() if has_websocket_context(): request_websocket = websocket._get_current_object() + elif has_request_context(): + request_websocket = request._get_current_object() + else: + return route_path = None try: diff --git a/sentry_sdk/integrations/starlite.py b/sentry_sdk/integrations/starlite.py index 70a1540263..a6bec66dbd 100644 --- a/sentry_sdk/integrations/starlite.py +++ b/sentry_sdk/integrations/starlite.py @@ -246,6 +246,7 @@ async def handle_wrapper( route_handler = scope.get("route_handler") + name = None func = None if route_handler.name is not None: name = route_handler.name diff --git a/sentry_sdk/integrations/stdlib.py b/sentry_sdk/integrations/stdlib.py index c140b7b70c..395f3194c2 100644 --- a/sentry_sdk/integrations/stdlib.py +++ b/sentry_sdk/integrations/stdlib.py @@ -295,6 +295,7 @@ def putrequest( span_streaming = has_span_streaming_enabled(client.options) span: "Union[Span, StreamedSpan, None]" = None breadcrumb: "dict[str, Any]" = {} + set_on_span: "Optional[Callable[[str, Any], None]]" = None if span_streaming: url_attributes = get_url_attributes(client, parsed_url) @@ -361,7 +362,7 @@ def putrequest( # for proxies, these point to the proxy host/port if tunnel_host: - if span: + if set_on_span is not None: set_on_span(SPANDATA.NETWORK_PEER_ADDRESS, self.host) set_on_span(SPANDATA.NETWORK_PEER_PORT, self.port) diff --git a/sentry_sdk/spotlight.py b/sentry_sdk/spotlight.py index 21165160c8..9a2d22d770 100644 --- a/sentry_sdk/spotlight.py +++ b/sentry_sdk/spotlight.py @@ -134,10 +134,10 @@ def __init__(self: "Self", get_response: "Callable[..., HttpResponse]") -> None: @property def spotlight_script(self: "Self") -> "Optional[str]": if self._spotlight_url is not None and self._spotlight_script is None: + spotlight_js_url = urllib.parse.urljoin( + self._spotlight_url, SPOTLIGHT_JS_ENTRY_PATH + ) try: - spotlight_js_url = urllib.parse.urljoin( - self._spotlight_url, SPOTLIGHT_JS_ENTRY_PATH - ) req = urllib.request.Request( spotlight_js_url, method="HEAD", diff --git a/sentry_sdk/transport.py b/sentry_sdk/transport.py index a3a046ea3d..d085a3cfad 100644 --- a/sentry_sdk/transport.py +++ b/sentry_sdk/transport.py @@ -816,21 +816,17 @@ def _make_pool(self: "Self") -> "Union[PoolManager, ProxyManager]": opts["proxy_headers"] = proxy_headers if proxy.startswith("socks"): - use_socks_proxy = True try: # Check if PySocks dependency is available from urllib3.contrib.socks import SOCKSProxyManager # noqa: PLC0415 except ImportError: - use_socks_proxy = False logger.warning( "You have configured a SOCKS proxy (%s) but support for SOCKS proxies is not installed. Disabling proxy support. Please add `PySocks` (or `urllib3` with the `[socks]` extra) to your dependencies.", proxy, ) - - if use_socks_proxy: - return SOCKSProxyManager(proxy, **opts) - else: return urllib3.PoolManager(**opts) + + return SOCKSProxyManager(proxy, **opts) else: return urllib3.ProxyManager(proxy, **opts) else: From 95de412c635103fa49a26fe3eb106edb74b2cc13 Mon Sep 17 00:00:00 2001 From: Alex Alderman Webb Date: Tue, 17 Nov 2026 15:08:02 +0000 Subject: [PATCH 4/5] test(ray): Collect all client spans to avoid flakes (#8314) The spans may be split across multiple envelopes if the worker takes more than 5 seconds to start up, because the time-based flush condition can collect buckets before the corresponding segment has finished. --- tests/integrations/ray/test_ray.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/integrations/ray/test_ray.py b/tests/integrations/ray/test_ray.py index aa8b00dc00..b255bc1a38 100644 --- a/tests/integrations/ray/test_ray.py +++ b/tests/integrations/ray/test_ray.py @@ -227,10 +227,10 @@ def test_tracing_in_ray_tasks(sentry_init, task_options, task, span_streaming): shutil.rmtree(ray_temp_dir, ignore_errors=True) sentry_sdk.flush() - client_envelope = sentry_sdk.get_client().transport.envelopes[0] client_spans = [ span - for item in client_envelope.items + for envelope in sentry_sdk.get_client().transport.envelopes + for item in envelope.items for span in item.payload.json["items"] ] assert client_spans[1]["name"] == "ray test parent" @@ -446,10 +446,10 @@ def increment(self): shutil.rmtree(ray_temp_dir, ignore_errors=True) sentry_sdk.flush() - client_envelope = sentry_sdk.get_client().transport.envelopes[0] client_spans = [ span - for item in client_envelope.items + for envelope in sentry_sdk.get_client().transport.envelopes + for item in envelope.items for span in item.payload.json["items"] ] From 99bbb77add5a99a25e660e8a42ecacdd89eda4a7 Mon Sep 17 00:00:00 2001 From: Alex Alderman Webb Date: Tue, 17 Nov 2026 15:36:41 +0000 Subject: [PATCH 5/5] ci: Run test steps in parallel (#8313) Run independent steps in parallel. --- .../workflows/test-integrations-agents.yml | 17 ++-- .../test-integrations-ai-workflow.yml | 25 +++--- .github/workflows/test-integrations-ai.yml | 73 ++++++++--------- .github/workflows/test-integrations-cloud.yml | 41 +++++----- .../workflows/test-integrations-common.yml | 9 ++- .github/workflows/test-integrations-dbs.yml | 57 ++++++------- .github/workflows/test-integrations-flags.yml | 33 ++++---- .../workflows/test-integrations-gevent.yml | 9 ++- .../workflows/test-integrations-graphql.yml | 33 ++++---- .github/workflows/test-integrations-mcp.yml | 17 ++-- .github/workflows/test-integrations-misc.yml | 73 ++++++++--------- .../workflows/test-integrations-network.yml | 41 +++++----- .github/workflows/test-integrations-tasks.yml | 65 +++++++-------- .github/workflows/test-integrations-web-1.yml | 9 ++- .github/workflows/test-integrations-web-2.yml | 25 +++--- .github/workflows/test-integrations-web-3.yml | 81 ++++++++++--------- .../templates/test_group.jinja | 13 +-- 17 files changed, 319 insertions(+), 302 deletions(-) diff --git a/.github/workflows/test-integrations-agents.yml b/.github/workflows/test-integrations-agents.yml index 0536b428a4..b7073355ca 100644 --- a/.github/workflows/test-integrations-agents.yml +++ b/.github/workflows/test-integrations-agents.yml @@ -37,14 +37,15 @@ jobs: - name: Setup Test Env run: | uv sync - - name: Test openai_agents - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-openai_agents" - - name: Test pydantic_ai - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-pydantic_ai" + - parallel: + - name: Test openai_agents + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-openai_agents" + - name: Test pydantic_ai + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-pydantic_ai" - name: Upload coverage data if: ${{ !cancelled() }} continue-on-error: true diff --git a/.github/workflows/test-integrations-ai-workflow.yml b/.github/workflows/test-integrations-ai-workflow.yml index 9fb944d520..29703f444e 100644 --- a/.github/workflows/test-integrations-ai-workflow.yml +++ b/.github/workflows/test-integrations-ai-workflow.yml @@ -37,18 +37,19 @@ jobs: - name: Setup Test Env run: | uv sync - - name: Test langchain-base - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-langchain-base" - - name: Test langchain-notiktoken - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-langchain-notiktoken" - - name: Test langgraph - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-langgraph" + - parallel: + - name: Test langchain-base + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-langchain-base" + - name: Test langchain-notiktoken + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-langchain-notiktoken" + - name: Test langgraph + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-langgraph" - name: Upload coverage data if: ${{ !cancelled() }} continue-on-error: true diff --git a/.github/workflows/test-integrations-ai.yml b/.github/workflows/test-integrations-ai.yml index cd6f64fc04..f66b9e2dbd 100644 --- a/.github/workflows/test-integrations-ai.yml +++ b/.github/workflows/test-integrations-ai.yml @@ -37,42 +37,43 @@ jobs: - name: Setup Test Env run: | uv sync - - name: Test anthropic - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-anthropic" - - name: Test cohere - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-cohere" - - name: Test google_genai - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-google_genai" - - name: Test huggingface_hub - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-huggingface_hub" - - name: Test litellm - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-litellm" - - name: Test mistral - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-mistral" - - name: Test openai-base - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-openai-base" - - name: Test openai-notiktoken - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-openai-notiktoken" - - name: Test typesafe - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-typesafe" + - parallel: + - name: Test anthropic + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-anthropic" + - name: Test cohere + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-cohere" + - name: Test google_genai + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-google_genai" + - name: Test huggingface_hub + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-huggingface_hub" + - name: Test litellm + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-litellm" + - name: Test mistral + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-mistral" + - name: Test openai-base + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-openai-base" + - name: Test openai-notiktoken + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-openai-notiktoken" + - name: Test typesafe + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-typesafe" - name: Upload coverage data if: ${{ !cancelled() }} continue-on-error: true diff --git a/.github/workflows/test-integrations-cloud.yml b/.github/workflows/test-integrations-cloud.yml index 3cb957c613..1cbd0f4f66 100644 --- a/.github/workflows/test-integrations-cloud.yml +++ b/.github/workflows/test-integrations-cloud.yml @@ -41,26 +41,27 @@ jobs: - name: Setup Test Env run: | uv sync - - name: Test aws_lambda - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-aws_lambda" - - name: Test boto3 - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-boto3" - - name: Test chalice - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-chalice" - - name: Test cloud_resource_context - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-cloud_resource_context" - - name: Test gcp - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-gcp" + - parallel: + - name: Test aws_lambda + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-aws_lambda" + - name: Test boto3 + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-boto3" + - name: Test chalice + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-chalice" + - name: Test cloud_resource_context + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-cloud_resource_context" + - name: Test gcp + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-gcp" - name: Upload coverage data if: ${{ !cancelled() }} continue-on-error: true diff --git a/.github/workflows/test-integrations-common.yml b/.github/workflows/test-integrations-common.yml index 9d071b7eae..cf19652d18 100644 --- a/.github/workflows/test-integrations-common.yml +++ b/.github/workflows/test-integrations-common.yml @@ -37,10 +37,11 @@ jobs: - name: Setup Test Env run: | uv sync - - name: Test common - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-common" + - parallel: + - name: Test common + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-common" - name: Upload coverage data if: ${{ !cancelled() }} continue-on-error: true diff --git a/.github/workflows/test-integrations-dbs.yml b/.github/workflows/test-integrations-dbs.yml index d7d17f7eca..18ec851fd2 100644 --- a/.github/workflows/test-integrations-dbs.yml +++ b/.github/workflows/test-integrations-dbs.yml @@ -69,34 +69,35 @@ jobs: - name: Setup Test Env run: | uv sync - - name: Test aiomysql - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-aiomysql" - - name: Test asyncpg - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-asyncpg" - - name: Test clickhouse_driver - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-clickhouse_driver" - - name: Test pymongo - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-pymongo" - - name: Test redis - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-redis" - - name: Test redis_py_cluster_legacy - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-redis_py_cluster_legacy" - - name: Test sqlalchemy - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-sqlalchemy" + - parallel: + - name: Test aiomysql + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-aiomysql" + - name: Test asyncpg + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-asyncpg" + - name: Test clickhouse_driver + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-clickhouse_driver" + - name: Test pymongo + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-pymongo" + - name: Test redis + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-redis" + - name: Test redis_py_cluster_legacy + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-redis_py_cluster_legacy" + - name: Test sqlalchemy + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-sqlalchemy" - name: Upload coverage data if: ${{ !cancelled() }} continue-on-error: true diff --git a/.github/workflows/test-integrations-flags.yml b/.github/workflows/test-integrations-flags.yml index b7a99d1559..0fb0ac70a1 100644 --- a/.github/workflows/test-integrations-flags.yml +++ b/.github/workflows/test-integrations-flags.yml @@ -37,22 +37,23 @@ jobs: - name: Setup Test Env run: | uv sync - - name: Test launchdarkly - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-launchdarkly" - - name: Test openfeature - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-openfeature" - - name: Test statsig - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-statsig" - - name: Test unleash - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-unleash" + - parallel: + - name: Test launchdarkly + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-launchdarkly" + - name: Test openfeature + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-openfeature" + - name: Test statsig + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-statsig" + - name: Test unleash + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-unleash" - name: Upload coverage data if: ${{ !cancelled() }} continue-on-error: true diff --git a/.github/workflows/test-integrations-gevent.yml b/.github/workflows/test-integrations-gevent.yml index 51f7f23848..896a8d3258 100644 --- a/.github/workflows/test-integrations-gevent.yml +++ b/.github/workflows/test-integrations-gevent.yml @@ -37,10 +37,11 @@ jobs: - name: Setup Test Env run: | uv sync - - name: Test gevent - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-gevent" + - parallel: + - name: Test gevent + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-gevent" - name: Upload coverage data if: ${{ !cancelled() }} continue-on-error: true diff --git a/.github/workflows/test-integrations-graphql.yml b/.github/workflows/test-integrations-graphql.yml index 7ec352fd73..071a051be2 100644 --- a/.github/workflows/test-integrations-graphql.yml +++ b/.github/workflows/test-integrations-graphql.yml @@ -37,22 +37,23 @@ jobs: - name: Setup Test Env run: | uv sync - - name: Test ariadne - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-ariadne" - - name: Test gql - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-gql" - - name: Test graphene - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-graphene" - - name: Test strawberry - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-strawberry" + - parallel: + - name: Test ariadne + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-ariadne" + - name: Test gql + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-gql" + - name: Test graphene + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-graphene" + - name: Test strawberry + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-strawberry" - name: Upload coverage data if: ${{ !cancelled() }} continue-on-error: true diff --git a/.github/workflows/test-integrations-mcp.yml b/.github/workflows/test-integrations-mcp.yml index 71d7274cca..b0a7c0903e 100644 --- a/.github/workflows/test-integrations-mcp.yml +++ b/.github/workflows/test-integrations-mcp.yml @@ -37,14 +37,15 @@ jobs: - name: Setup Test Env run: | uv sync - - name: Test mcp - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-mcp" - - name: Test fastmcp - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-fastmcp" + - parallel: + - name: Test mcp + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-mcp" + - name: Test fastmcp + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-fastmcp" - name: Upload coverage data if: ${{ !cancelled() }} continue-on-error: true diff --git a/.github/workflows/test-integrations-misc.yml b/.github/workflows/test-integrations-misc.yml index 884034726c..1d6d72903e 100644 --- a/.github/workflows/test-integrations-misc.yml +++ b/.github/workflows/test-integrations-misc.yml @@ -37,42 +37,43 @@ jobs: - name: Setup Test Env run: | uv sync - - name: Test loguru - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-loguru" - - name: Test opentelemetry - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-opentelemetry" - - name: Test otlp - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-otlp" - - name: Test potel - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-potel" - - name: Test pure_eval - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-pure_eval" - - name: Test trytond - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-trytond" - - name: Test typer - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-typer" - - name: Test integration_deactivation - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-integration_deactivation" - - name: Test shadowed_module - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-shadowed_module" + - parallel: + - name: Test loguru + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-loguru" + - name: Test opentelemetry + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-opentelemetry" + - name: Test otlp + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-otlp" + - name: Test potel + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-potel" + - name: Test pure_eval + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-pure_eval" + - name: Test trytond + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-trytond" + - name: Test typer + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-typer" + - name: Test integration_deactivation + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-integration_deactivation" + - name: Test shadowed_module + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-shadowed_module" - name: Upload coverage data if: ${{ !cancelled() }} continue-on-error: true diff --git a/.github/workflows/test-integrations-network.yml b/.github/workflows/test-integrations-network.yml index 3cce032345..185e2ad648 100644 --- a/.github/workflows/test-integrations-network.yml +++ b/.github/workflows/test-integrations-network.yml @@ -37,26 +37,27 @@ jobs: - name: Setup Test Env run: | uv sync - - name: Test grpc - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-grpc" - - name: Test httpx0 - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-httpx0" - - name: Test httpx2 - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-httpx2" - - name: Test pyreqwest - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-pyreqwest" - - name: Test requests - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-requests" + - parallel: + - name: Test grpc + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-grpc" + - name: Test httpx0 + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-httpx0" + - name: Test httpx2 + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-httpx2" + - name: Test pyreqwest + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-pyreqwest" + - name: Test requests + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-requests" - name: Upload coverage data if: ${{ !cancelled() }} continue-on-error: true diff --git a/.github/workflows/test-integrations-tasks.yml b/.github/workflows/test-integrations-tasks.yml index 6d57f38b67..926f2ad50f 100644 --- a/.github/workflows/test-integrations-tasks.yml +++ b/.github/workflows/test-integrations-tasks.yml @@ -53,38 +53,39 @@ jobs: - name: Setup Test Env run: | uv sync - - name: Test arq - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-arq" - - name: Test beam - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-beam" - - name: Test celery - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-celery" - - name: Test dramatiq - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-dramatiq" - - name: Test huey - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-huey" - - name: Test ray - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-ray" - - name: Test rq - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-rq" - - name: Test spark - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-spark" + - parallel: + - name: Test arq + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-arq" + - name: Test beam + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-beam" + - name: Test celery + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-celery" + - name: Test dramatiq + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-dramatiq" + - name: Test huey + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-huey" + - name: Test ray + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-ray" + - name: Test rq + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-rq" + - name: Test spark + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-spark" - name: Upload coverage data if: ${{ !cancelled() }} continue-on-error: true diff --git a/.github/workflows/test-integrations-web-1.yml b/.github/workflows/test-integrations-web-1.yml index c0d54741ac..bbe37c6290 100644 --- a/.github/workflows/test-integrations-web-1.yml +++ b/.github/workflows/test-integrations-web-1.yml @@ -54,10 +54,11 @@ jobs: - name: Setup Test Env run: | uv sync - - name: Test django - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-django" + - parallel: + - name: Test django + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-django" - name: Upload coverage data if: ${{ !cancelled() }} continue-on-error: true diff --git a/.github/workflows/test-integrations-web-2.yml b/.github/workflows/test-integrations-web-2.yml index 4bed53a034..c6c0f269fd 100644 --- a/.github/workflows/test-integrations-web-2.yml +++ b/.github/workflows/test-integrations-web-2.yml @@ -37,18 +37,19 @@ jobs: - name: Setup Test Env run: | uv sync - - name: Test flask - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-flask" - - name: Test starlette - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-starlette" - - name: Test fastapi - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-fastapi" + - parallel: + - name: Test flask + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-flask" + - name: Test starlette + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-starlette" + - name: Test fastapi + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-fastapi" - name: Upload coverage data if: ${{ !cancelled() }} continue-on-error: true diff --git a/.github/workflows/test-integrations-web-3.yml b/.github/workflows/test-integrations-web-3.yml index 5034ecfc11..cf8f831596 100644 --- a/.github/workflows/test-integrations-web-3.yml +++ b/.github/workflows/test-integrations-web-3.yml @@ -37,46 +37,47 @@ jobs: - name: Setup Test Env run: | uv sync - - name: Test aiohttp - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-aiohttp" - - name: Test asgi - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-asgi" - - name: Test bottle - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-bottle" - - name: Test falcon - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-falcon" - - name: Test litestar - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-litestar" - - name: Test pyramid - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-pyramid" - - name: Test quart - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-quart" - - name: Test sanic - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-sanic" - - name: Test starlite - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-starlite" - - name: Test tornado - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-tornado" + - parallel: + - name: Test aiohttp + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-aiohttp" + - name: Test asgi + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-asgi" + - name: Test bottle + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-bottle" + - name: Test falcon + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-falcon" + - name: Test litestar + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-litestar" + - name: Test pyramid + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-pyramid" + - name: Test quart + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-quart" + - name: Test sanic + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-sanic" + - name: Test starlite + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-starlite" + - name: Test tornado + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-tornado" - name: Upload coverage data if: ${{ !cancelled() }} continue-on-error: true diff --git a/scripts/split_tox_gh_actions/templates/test_group.jinja b/scripts/split_tox_gh_actions/templates/test_group.jinja index f0bb36f464..f468dbf9d1 100644 --- a/scripts/split_tox_gh_actions/templates/test_group.jinja +++ b/scripts/split_tox_gh_actions/templates/test_group.jinja @@ -101,12 +101,13 @@ run: | uv sync - {% for framework in frameworks %} - - name: Test {{ framework }} - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "{% raw %}py${{ matrix.python-version }}{% endraw %}-{{ framework }}" - {% endfor %} + - parallel: + {% for framework in frameworks %} + - name: Test {{ framework }} + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "{% raw %}py${{ matrix.python-version }}{% endraw %}-{{ framework }}" + {% endfor %} - name: Upload coverage data if: {% raw %}${{ !cancelled() }}{% endraw %}