Skip to content

Commit 1e97d79

Browse files
ci: reflect scripts/run-test-suite fix harness dependency in suitespec test [backport 1.19] (#7028)
Backport 0dede17 from #7000 to 1.19. This fixes failing `pre_check` failing wherever #6941 was merged. `tests/.suitespec.json` being modified should trigger the doctests in `tests/suitespec.py`, otherwise a change there may merge, and then cause `pre_check` to fail on `2.x` where the `scripts/*py` tests are run. Also, the non `.py` scripts in `scripts/` should still cause tests to run. ## Checklist - [x] Change(s) are motivated and described in the PR description. - [x] Testing strategy is described if automated tests are not included in the PR. - [x] Risk is outlined (performance impact, potential for breakage, maintainability, etc). - [x] Change is maintainable (easy to change, telemetry, documentation). - [x] [Library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) are followed. If no release note is required, add label `changelog/no-changelog`. - [x] Documentation is included (in-code, generated user docs, [public corp docs](https://github.com/DataDog/documentation/)). - [x] Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)) ## Reviewer Checklist - [x] Title is accurate. - [x] No unnecessary changes are introduced. - [x] Description motivates each change. - [x] Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes unless absolutely necessary. - [x] Testing strategy adequately addresses listed risk(s). - [x] Change is maintainable (easy to change, telemetry, documentation). - [x] Release note makes sense to a user of the library. - [x] Reviewer has explicitly acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment. - [x] Backport labels are set in a manner that is consistent with the [release branch maintenance policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting) - [x] If this PR touches code that signs or publishes builds or packages, or handles credentials of any kind, I've requested a review from `@DataDog/security-design-and-guidance`. - [x] This PR doesn't touch any of that. Co-authored-by: Romain Komorn <[email protected]>
1 parent 80018e2 commit 1e97d79

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

scripts/gen_circleci_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def check(name: str, command: str, paths: t.Set[str]) -> None:
7777
check(
7878
name="Run scripts/*.py tests",
7979
command="hatch run scripts:test",
80-
paths={"scripts/*.py"},
80+
paths={"scripts/*.py", "scripts/mkwheelhouse", "scripts/run-test-suite", "tests/.suitespec.json"},
8181
)
8282
check(
8383
name="Run conftest tests",

tests/suitespec.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ def get_patterns(suite: str) -> t.Set[str]:
2020
'ddtrace/settings/dynamic_instrumentation.py', 'ddtrace/settings/exception_debugging.py',
2121
'ddtrace/settings/http.py', 'ddtrace/settings/integration.py', 'ddtrace/span.py', 'ddtrace/tracer.py',
2222
'ddtrace/tracing/*', 'ddtrace/version.py', 'hatch.toml', 'pyproject.toml', 'riotfile.py', 'scripts/ddtest',
23-
'setup.cfg', 'setup.py', 'tests/.suitespec.json', 'tests/__init__.py', 'tests/conftest.py', 'tests/debugging/*']
23+
'scripts/run-test-suite', 'setup.cfg', 'setup.py', 'tests/.suitespec.json', 'tests/__init__.py',
24+
'tests/conftest.py', 'tests/debugging/*']
2425
>>> get_patterns("foobar")
2526
set()
2627
>>> sorted(get_patterns("urllib3")) # doctest: +NORMALIZE_WHITESPACE
@@ -33,9 +34,10 @@ def get_patterns(suite: str) -> t.Set[str]:
3334
'ddtrace/py.typed', 'ddtrace/sampler.py', 'ddtrace/settings/__init__.py',
3435
'ddtrace/settings/_database_monitoring.py', 'ddtrace/settings/config.py', 'ddtrace/settings/http.py',
3536
'ddtrace/settings/integration.py', 'ddtrace/span.py', 'ddtrace/tracer.py', 'ddtrace/tracing/*',
36-
'ddtrace/version.py', 'hatch.toml', 'pyproject.toml', 'riotfile.py', 'scripts/ddtest', 'setup.cfg', 'setup.py',
37-
'tests/.suitespec.json', 'tests/__init__.py', 'tests/conftest.py', 'tests/contrib/__init__.py',
38-
'tests/contrib/patch.py', 'tests/contrib/urllib3/*', 'tests/snapshots/tests.contrib.urllib3.*']
37+
'ddtrace/version.py', 'hatch.toml', 'pyproject.toml', 'riotfile.py', 'scripts/ddtest', 'scripts/run-test-suite',
38+
'setup.cfg', 'setup.py', 'tests/.suitespec.json', 'tests/__init__.py', 'tests/conftest.py',
39+
'tests/contrib/__init__.py', 'tests/contrib/patch.py', 'tests/contrib/urllib3/*',
40+
'tests/snapshots/tests.contrib.urllib3.*']
3941
"""
4042
compos = SUITESPEC["components"]
4143
if suite not in SUITESPEC["suites"]:

0 commit comments

Comments
 (0)