Skip to content

Commit 9a9823a

Browse files
authored
ci(st): expand list of full suite triggers (#112299)
#112293 didn't select anything in sentry or getsentry dispatch for src/sentry/options/defaults.py - this kind of stuff is evaluated at module load (before any test context is active) so we don't have coverage data for it added `src/sentry/options` FULL_SUITE_TRIGGERS and also had claude audit for more stuff to put in there
1 parent 0060c73 commit 9a9823a

File tree

1 file changed

+26
-2
lines changed

1 file changed

+26
-2
lines changed

.github/workflows/scripts/compute-sentry-selected-tests.py

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,36 @@
4141
"tests/integration/",
4242
)
4343

44+
# Most of these won't have coverage info because they're evaluated at
45+
# module load time and app warmup, before any per-test coverage context is active.
46+
#
47+
# Tracking a "startup" coverage context doesn't work: django.setup()
48+
# eagerly imports models, fields, validators, utils, etc. We also have
49+
# large dynamic __init__'s so a startup context would select nearly every
50+
# test.
4451
FULL_SUITE_TRIGGERS: list[str | re.Pattern[str]] = [
45-
"src/sentry/testutils/pytest/sentry.py",
52+
re.compile(r"^src/sentry/testutils/pytest/"),
53+
re.compile(r"(^|/)conftest\.py$"),
54+
"src/sentry/runner/initializer.py",
4655
"src/sentry/constants.py",
47-
"pyproject.toml",
56+
# option defaults registered at startup via initialize_app()
57+
re.compile(r"^src/sentry/options/"),
58+
# feature flags registered via manager.add() at import time
59+
re.compile(r"^src/sentry/features/"),
60+
# signal definitions created at module level; receivers depend on these
61+
"src/sentry/signals.py",
62+
# signal handlers registered globally via initialize_receivers()
63+
re.compile(r"^src/sentry/receivers/"),
64+
# stdlib/third-party monkey-patches applied before Django setup
65+
re.compile(r"^src/sentry/monkey/"),
66+
# monkeypatches transaction.atomic for silo-aware DB routing
67+
re.compile(r"^src/sentry/silo/patches/"),
68+
# SiloRouter loaded via DATABASE_ROUTERS; affects every DB query
69+
"src/sentry/db/router.py",
4870
"src/sentry/conf/server.py",
4971
"src/sentry/web/urls.py",
72+
"pyproject.toml",
73+
"uv.lock",
5074
re.compile(r"/migrations/\d{4}_[^/]+\.py$"),
5175
]
5276

0 commit comments

Comments
 (0)