Skip to content

feat(tests): migrate security suites to uv - #20063

Open
mabdinur wants to merge 1 commit into
codex/declare-all-suitespecfrom
codex/migrate-security-suitespec
Open

feat(tests): migrate security suites to uv#20063
mabdinur wants to merge 1 commit into
codex/declare-all-suitespecfrom
codex/migrate-security-suitespec

Conversation

@mabdinur

@mabdinur mabdinur commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Description

  • Declares AppSec, IAST, SCA, and AI Guard test environments in suitespec.
  • Runs those security suites through the uv test runner.
  • Preserves the existing Riot commands, dependencies, environment variables, and lock identities as the migration oracle.
  • Includes the current xdist configuration for AppSec threat suites.

The primary regression gate is test_uv_suitespec_matches_riot. It compares every migrated environment with Riot, including commands, direct dependencies, environment variables, and lock hashes. Reviewers do not need to manually audit all 362 expanded security environments.

Testing

  • Ran test_uv_suitespec_matches_riot: all 362 security environments match Riot
  • Generated the GitLab test configuration successfully
  • Smoke-tested AppSec, IAST, SCA, and AI Guard environments with uv
  • Ran scripts/lint suitespec-check
  • Ran scripts/lint checks

Risks

Low. This changes test environment orchestration only. The existing Riot definitions and lock files remain in place for parity validation.

Additional Notes

This PR is stacked on #20012. No release note is needed for this test-infrastructure change.

@mabdinur
mabdinur requested review from a team as code owners September 3, 2026 20:45
@mabdinur
mabdinur requested review from avara1986 and juanjux and removed request for a team September 3, 2026 20:45
@mabdinur mabdinur added the changelog/no-changelog A changelog entry is not required for this PR. label Sep 3, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 3, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-03T20:49:56.814393Z 19ea0ca PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@cit-pr-commenter-54b7da

Copy link
Copy Markdown

Codeowners resolved as

Resolved from the full PR diff against codex/declare-all-suitespec using the target branch CODEOWNERS file.
CODEOWNERS team requests not listed below are not required by the current file set.

tests/aiguard/suitespec.yml                                             @DataDog/asm-python
tests/appsec/suitespec.yml                                              @DataDog/asm-python
tests/suitespec.py                                                      @DataDog/python-guild @DataDog/apm-core-python

@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.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.llmobs -> ddtrace.llmobs._evaluators -> ddtrace.llmobs._evaluators.format -> ddtrace.llmobs._experiment -> ddtrace.llmobs
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

Copy link
Copy Markdown

Dependency direction analysis

⚠️ Existing dependency direction violations

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

Show existing violations (showing 5 of 230 highest severity)
ddtrace.internal.tracemethods -×-> ddtrace.trace  (internal-core -> product:tracing, score=134)
ddtrace.llmobs._integrations.litellm -×-> ddtrace.trace  (product:llmobs -> product:tracing, score=132)
ddtrace.llmobs._integrations.vllm -×-> ddtrace.trace  (product:llmobs -> product:tracing, score=132)
ddtrace.debugging._signal.model -×-> ddtrace.trace  (product:debugging -> product:tracing, score=132)
ddtrace.appsec._contrib.django -×-> ddtrace.trace  (product:appsec -> product:tracing, score=132)

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-prod-us1-4

datadog-prod-us1-4 Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

🔄 Datadog retried 12 tests - 12 passed on retry View in Datadog

🚧 1 test that failed was ignored due to quarantine View in Datadog

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

@pr-commenter

pr-commenter Bot commented Sep 3, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-09-03 21:16:08

Comparing candidate commit 19ea0ca in PR branch codex/migrate-security-suitespec with baseline commit 6a7d079 in branch main.

📊 Benchmarking dashboard

Found 0 performance improvements and 5 performance regressions! Performance is the same for 581 metrics, 10 unstable metrics, 2 known flaky benchmarks, 16 flaky benchmarks without significant changes.

Explanation

This is an A/B test comparing a candidate commit's performance against that of a baseline commit. Performance changes are noted in the tables below as:

  • 🟩 = significantly better candidate vs. baseline
  • 🟥 = significantly worse candidate vs. baseline

We compute a confidence interval (CI) over the relative difference of means between metrics from the candidate and baseline commits, considering the baseline as the reference.

If the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD), the change is considered significant.

Feel free to reach out to #apm-benchmarking-platform on Slack if you have any questions.

More details about the CI and significant changes

You can imagine this CI as a range of values that is likely to contain the true difference of means between the candidate and baseline commits.

CIs of the difference of means are often centered around 0%, because often changes are not that big:

---------------------------------(------|---^--------)-------------------------------->
                              -0.6%    0%  0.3%     +1.2%
                                 |          |        |
         lower bound of the CI --'          |        |
sample mean (center of the CI) -------------'        |
         upper bound of the CI ----------------------'

As described above, a change is considered significant if the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD).

For instance, for an execution time metric, this confidence interval indicates a significantly worse performance:

----------------------------------------|---------|---(---------^---------)---------->
                                       0%        1%  1.3%      2.2%      3.1%
                                                  |   |         |         |
       significant impact threshold --------------'   |         |         |
                      lower bound of CI --------------'         |         |
       sample mean (center of the CI) --------------------------'         |
                      upper bound of CI ----------------------------------'

scenario:httppropagationinject-ids_only

  • 🟥 execution_time [+2.842µs; +3.053µs] or [+16.591%; +17.828%]

scenario:iastaspects-ljust_aspect

  • 🟥 execution_time [+110.597µs; +121.546µs] or [+20.307%; +22.318%]

scenario:iastaspectsospath-ospathbasename_aspect

  • 🟥 execution_time [+120.954µs; +127.534µs] or [+30.424%; +32.079%]

scenario:telemetryaddmetric-1-count-metric-1-times

  • 🟥 execution_time [+642.555ns; +676.161ns] or [+23.637%; +24.873%]

scenario:tracer-small

  • 🟥 execution_time [+35.733µs; +38.348µs] or [+10.870%; +11.665%]

Unstable benchmarks

These benchmarks have a confidence interval too wide to call a change; treat them as noise rather than signal.

scenario:coreapiscenario-context_with_data_listeners

  • unstable execution_time [-712.553ns; +799.533ns] or [-6.363%; +7.140%]

scenario:coreapiscenario-core_dispatch_1_listener

  • unstable execution_time [-33.337ns; +34.295ns] or [-5.412%; +5.568%]

scenario:coreapiscenario-core_dispatch_50_listeners

  • unstable execution_time [-1794.819ns; +1585.674ns] or [-10.271%; +9.074%]

scenario:coreapiscenario-core_dispatch_exception_listeners

  • unstable execution_time [-1149.999ns; +1410.194ns] or [-8.622%; +10.573%]

scenario:coreapiscenario-core_dispatch_listeners

  • unstable execution_time [-356.102ns; +310.972ns] or [-9.479%; +8.277%]

scenario:coreapiscenario-core_dispatch_no_args_listeners

  • unstable execution_time [-265.227ns; +259.223ns] or [-8.879%; +8.678%]

scenario:coreapiscenario-core_dispatch_with_results_1_listener

  • unstable execution_time [-80.712ns; +66.376ns] or [-7.068%; +5.812%]

scenario:coreapiscenario-core_dispatch_with_results_50_listeners

  • unstable execution_time [-3997.313ns; +3953.434ns] or [-9.778%; +9.671%]

scenario:coreapiscenario-core_dispatch_with_results_listeners

  • unstable execution_time [-834.705ns; +704.812ns] or [-10.272%; +8.674%]

scenario:packagesupdateimporteddependencies-import_many_stdlib_cached

  • unstable execution_time [-52.212µs; +57.462µs] or [-9.051%; +9.961%]

Known flaky benchmarks

These benchmarks are marked as flaky and will not trigger a failure. Modify FLAKY_BENCHMARKS_REGEX to control which benchmarks are marked as flaky.

scenario:iastaspects-swapcase_aspect

  • 🟥 execution_time [+46.036µs; +55.321µs] or [+17.143%; +20.600%]

scenario:span-start

  • 🟥 execution_time [+1.871ms; +2.027ms] or [+13.169%; +14.264%]

Known flaky benchmarks without significant changes:

  • scenario:errortrackingflasksqli-baseline
  • scenario:flasksimple-iast-get
  • scenario:iastaspects-casefold_aspect
  • scenario:iastaspects-casefold_noaspect
  • scenario:iastaspects-index_aspect
  • scenario:iastaspects-ljust_noaspect
  • scenario:iastaspects-lower_aspect
  • scenario:iastaspects-replace_aspect
  • scenario:iastaspects-title_noaspect
  • scenario:iastaspects-translate_aspect
  • scenario:iastaspects-translate_noaspect
  • scenario:iastaspects-upper_noaspect
  • scenario:packagespackageforrootmodulemapping-cache_off
  • scenario:packagespackageforrootmodulemapping-cache_on
  • scenario:sethttpmeta-all-enabled
  • scenario:telemetryaddmetric-record-100-metrics

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.

2 participants