Skip to content

build(deps): Bump pytest from 9.0.3 to 9.1.1 - #8705

Draft
sentry-junior[bot] wants to merge 2 commits into
masterfrom
deps/pytest-9.1.1
Draft

sentry-junior[bot] wants to merge 2 commits into
masterfrom
deps/pytest-9.1.1

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

pytest 9.1 runs one garbage collection pass where 9.0 ran five. getsentry/sentry got a measurable test-time drop from the same bump (getsentry/sentry#128858). pyproject.toml already allows >=9.0.3, so the bump itself only touches uv.lock.

pytest 9.1 also turns a mark on a fixture into a collection error, and that broke tests/test_snql_api.py. test_invalid_columns_composite_query had @pytest.fixture() stacked on its parametrize. Because of that, it has never run as a test since it was added in #4399, and its expected error messages went stale. This PR removes the decorator and updates the messages to the current Validation failed for entity <entity>: Tag keys (...) not resolved format. It also sorts the unresolved keys in EntityContainsColumnsValidator, so the message is stable when more than one key is missing; before, the order followed set iteration.

Open question: snuba's tests are dominated by ClickHouse I/O, not Python allocation, so the speedup may be small.

via @joshuarli.

--

View Session [Sentry]

sentry-junior Bot and others added 2 commits November 21, 2026 15:55
pytest 9.1 runs one garbage collection pass where 9.0 ran five, which
cut test time in getsentry/sentry (getsentry/sentry#128858).

Co-Authored-By: Joshua Li <14209781+joshuarli@users.noreply.github.com>
Co-Authored-By: Kedar Vaidya <kedar.vaidya@sentry.io>
pytest 9.1 turns a mark on a fixture into a collection error.
test_invalid_columns_composite_query was decorated with
@pytest.fixture(), so since 2023 it never ran as a test and its
expected messages went stale. Drop the decorator, expect the current
"Tag keys (...) not resolved" message, and sort the missing keys so
the message with more than one key is stable.

Co-Authored-By: Joshua Li <14209781+joshuarli@users.noreply.github.com>
@sentry-junior

sentry-junior Bot commented Nov 23, 2026

Copy link
Copy Markdown
Contributor Author

CI timing: before → after

After: run 44921798153 attempt 1 and attempt 2. The uv.lock change takes the API sentry path. Before is the median (and range) of 8 successful master ci runs from 2026-11-10 to 2026-11-23 that took the API sentry path (both Run snuba CI tests and Run full tests). Snuba test lanes use all 30 master runs.

Metric Before After (2 runs) Change
test lane 741s 722s / 728s −13 to −19s, within noise
Slowest test lane 972s (884–1116s) 976s / 909s no change
Test-lane runner time 131 min 129 / 125 min within noise
sentry shard, median (API path) 943s (846–1013s) 1006s / 978s no change
  • No measurable speedup. Snuba's tests are bound by ClickHouse I/O, not by Python garbage collection.
  • The reason to merge is correctness: test_invalid_columns_composite_query runs for the first time.

This branch has not been deployed

No deployments
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.

1 participant