Fix SA dialect suite collapse under pytest 9 --strict-markers#13
Merged
Conversation
The scheduled CI on main has been failing every day since 2026-06-08 with:
INTERNALERROR> Failed: 'mypy' not found in `markers` configuration option
Root cause: SQLAlchemy's testing plugin registers a handful of pytest
markers dynamically — some at import time via
``config.add_to_marker.<name>`` (mypy, memory_intensive, timing_intensive),
others during collection via ``test_class.add_marker(...)`` (backend,
sparse_backend, sparse_driver_backend). pytest 9.x tightened
``--strict-markers`` so that these lookups now fail before SA's
session-start hook can register the markers itself, aborting the whole
sa_suite session at collection.
The repo opts into ``--strict-markers`` globally via
``pyproject.toml`` addopts (intentional — it catches typos in our own
markers), and that flag is inherited by the sa_suite job's pytest
invocation. We can't just drop it without losing the safety net on the
rest of the tree.
Fix: pre-register the SA-internal markers in ``tests/sa_suite/conftest.py``
so the lookup succeeds. The change is scoped to the sa_suite directory
and has no effect on the unit / contract / fuzz / perf / integration /
differential jobs.
Verified locally with pytest 9.1.0 + SQLAlchemy 2.0.51 + chdb 4.1.9
(matching the CI environment): 595 passed, 673 skipped — same skip count
as the pre-regression baseline.
Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Scheduled CI on
mainhas been failing every day since 2026-06-08 with:(See e.g. run 27606145536.)
Root cause
SQLAlchemy's testing plugin registers a handful of pytest markers dynamically:
config.add_to_marker.<name>:mypy,memory_intensive,timing_intensivetest_class.add_marker(...):backend,sparse_backend,sparse_driver_backendpytest 9.x tightened
--strict-markersso these lookups nowfail()before SA's session-start hook can register the markers itself, aborting the wholesa_suitesession at collection.The repo opts into
--strict-markersglobally viapyproject.tomladdopts— intentional, it catches typos in our own markers — and the sa_suite job inherits the flag. Dropping--strict-markersglobally would lose that safety net on the rest of the tree.Fix
Pre-register the SA-internal markers in
tests/sa_suite/conftest.pyso the lookup succeeds. Scoped to the sa_suite directory; no effect on the unit / contract / fuzz / perf / integration / differential jobs.Test plan
pytest -ra -m "not integration and not differential and not perf and not fuzz": 314 passedGenerated with Claude Code
via Happy