Skip to content

refactor(tests): standardize test runner interface - #19878

Open
mabdinur wants to merge 3 commits into
mainfrom
codex/test-interface-docs
Open

refactor(tests): standardize test runner interface#19878
mabdinur wants to merge 3 commits into
mainfrom
codex/test-interface-docs

Conversation

@mabdinur

@mabdinur mabdinur commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Description

Provides one contributor-facing test interface before the Riot-to-uv migration. scripts/run-tests accepts top-level -s / --skip-ddtrace-install, forwards test arguments after one --, supports --list, and preserves the legacy double-separator form. Contributor execution docs use repository scripts, while environment-maintenance docs continue to identify riotfile.py, .riot/requirements, lock regeneration, and the suitespec.yml CI mapping that the uv migration will retain.

This is a prerequisite for #19713 so that the migration can replace the implementation without changing contributor workflows.

Testing

  • Verified --list against Flask and CI Visibility paths; both resolved their current Riot environments.
  • Passed a focused requests test with a fresh build, top-level -s, and the legacy double-separator form.
  • Passed scripts/lint checks and scripts/lint suitespec-check.

Risks

Low. Argument parsing remains backward-compatible with the documented legacy form, and environment authoring still uses the existing Riot files.

Additional Notes

Reno changes are intentionally excluded and remain owned by #19836.

@mabdinur
mabdinur requested review from a team as code owners August 26, 2026 19:34
@mabdinur mabdinur added the changelog/no-changelog A changelog entry is not required for this PR. label Aug 26, 2026
@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Aug 26, 2026

Copy link
Copy Markdown

Codeowners resolved as

Resolved from the full PR diff against main using the target branch CODEOWNERS file.
CODEOWNERS team requests not listed below are not required by the current file set.

.claude/hooks/detect-native-build-error.py                              @DataDog/python-guild
.claude/skills/apm-integrations/SKILL.md                                @DataDog/python-guild
.claude/skills/apm-integrations/references/design-decisions.md          @DataDog/python-guild
.claude/skills/apm-integrations/references/implementation-guide.md      @DataDog/python-guild
.claude/skills/llmobs-integrations/references/implementation-guide.md   @DataDog/python-guild
.claude/skills/llmobs-integrations/references/testing-guide.md          @DataDog/python-guild
.claude/skills/run-tests/SKILL.md                                       @DataDog/python-guild
.cursor/rules/repo-structure.mdc                                        @DataDog/python-guild
.cursor/rules/testing.mdc                                               @DataDog/python-guild
.github/PULL_REQUEST_TEMPLATE/python_315_bump.md                        @DataDog/python-guild @DataDog/apm-core-python
AGENTS.md                                                               @DataDog/python-guild
docs/build_system.rst                                                   @DataDog/python-guild
docs/contributing-integrations.rst                                      @DataDog/python-guild
docs/contributing-testing.rst                                           @DataDog/python-guild
docs/native-code-review.md                                              @DataDog/python-guild
docs/troubleshooting.rst                                                @DataDog/python-guild
scripts/iast/README                                                     @DataDog/asm-python
scripts/integration_registry/README.md                                  @DataDog/apm-idm-python
scripts/run-tests                                                       @DataDog/python-guild
tests/ci_visibility/api/README.md                                       @DataDog/ci-app-libraries

@cit-pr-commenter-54b7da

Copy link
Copy Markdown

Circular import analysis

⚠️ Existing circular imports

There are 3 circular imports that already exist on the base branch and have not been changed by this PR.

ddtrace.llmobs -> ddtrace.llmobs._evaluators -> ddtrace.llmobs._evaluators.format -> ddtrace.llmobs._experiment -> ddtrace.llmobs
ddtrace.errortracking._handled_exceptions.bytecode_injector -> ddtrace.errortracking._handled_exceptions.callbacks -> ddtrace.errortracking._handled_exceptions.collector -> ddtrace.errortracking._handled_exceptions.bytecode_reporting -> ddtrace.errortracking._handled_exceptions.bytecode_injector
ddtrace.appsec._asm_request_context -> ddtrace.appsec._iast._iast_request_context_base -> ddtrace.appsec._iast._iast_env -> ddtrace.appsec._iast.reporter -> ddtrace.appsec._exploit_prevention.stack_traces -> ddtrace.appsec._asm_request_context

@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Aug 26, 2026

Copy link
Copy Markdown

Dependency direction analysis

⚠️ Existing dependency direction violations

There are 240 dependency direction violations that already exist on the base branch and have not been changed by this PR.

Show existing violations (showing 5 of 240 highest severity)
ddtrace.internal.tracemethods -×-> ddtrace.trace  (internal-core -> product:tracing, score=135)
ddtrace.llmobs._evaluators.runner -×-> ddtrace.trace  (product:llmobs -> product:tracing, score=133)
ddtrace.debugging._signal.tracing -×-> ddtrace.trace  (product:debugging -> product:tracing, score=133)
ddtrace.appsec._contrib.flask -×-> ddtrace.trace  (product:appsec -> product:tracing, score=133)
ddtrace.appsec._listeners -×-> ddtrace.trace  (product:appsec -> product:tracing, score=133)

To see all violations, download the layers-base.json and layers-pr.json artifacts from this CI job and run:

uv run --script scripts/import-analysis/layers.py compare layers-base.json layers-pr.json

@datadog-datadog-prod-us1-2

datadog-datadog-prod-us1-2 Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 1e6a73e | Docs | View more details | Give us feedback!

@datadog-datadog-prod-us1-2 datadog-datadog-prod-us1-2 Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Datadog Autotest: PASS

More details

The static reviewer found no defect in the changed argument handling. The new logic keeps the old two-separator form and sends test arguments after one separator.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Datadog Autotest · Commit 3b0f6d6 · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3b0f6d6de4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/run-tests Outdated
Comment thread .github/PULL_REQUEST_TEMPLATE/python_315_bump.md Outdated
Comment thread docs/contributing-testing.rst Outdated
Comment thread scripts/integration_registry/README.md
@mabdinur
mabdinur force-pushed the codex/test-interface-docs branch 2 times, most recently from a5dd106 to db5e450 Compare August 26, 2026 20:12
@mabdinur
mabdinur force-pushed the codex/test-interface-docs branch from db5e450 to dfc235b Compare August 26, 2026 20:19
@mabdinur
mabdinur requested a review from brettlangdon August 26, 2026 20:34
Comment thread .claude/skills/apm-integrations/references/implementation-guide.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/no-changelog A changelog entry is not required for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants