Skip to content

ci(riot): schedule Python 3.15 jobs for a starter set (PROF-14439) - #19906

Open
vlad-scherbich wants to merge 10 commits into
vlad/py315-riot-installfrom
vlad/py315-riotfile
Open

ci(riot): schedule Python 3.15 jobs for a starter set (PROF-14439)#19906
vlad-scherbich wants to merge 10 commits into
vlad/py315-riot-installfrom
vlad/py315-riotfile

Conversation

@vlad-scherbich

@vlad-scherbich vlad-scherbich commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Description

Delta vs #19904.

Adds (3, 15) to SUPPORTED_PYTHON_VERSIONS and opts in smoke_test and sourcecode via select_pys(max_version="3.15"). Wrap-heavy suites (httplib, dbapi, subprocess, detect_global_locks) stay at the default. Default MAX_PYTHON_VERSION stays "3.14" so uncapped select_pys() does not mix 3.15 hashes into 3.9–3.14 --exitfirst jobs.

If this merges and nothing else new lands: those two suites schedule 3.15 jobs. This does not widen requires-python and does not enable wrap() on 3.15.

Testing

scripts/lint riot (doctest) and scripts/lint style riotfile.py.

Risks

smoke_test is required by build_base_venvs whenever 3.15 is in the matrix.

Additional Notes

No release note: CI chore, changelog/no-changelog. Wrap lift is #19910 on main / #19928 on this stack.

Contributes to #17816

@vlad-scherbich vlad-scherbich added the changelog/no-changelog A changelog entry is not required for this PR. label Aug 27, 2026
@cit-pr-commenter-54b7da

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

Copy link
Copy Markdown

Codeowners resolved as

Resolved from the full PR diff against vlad/py315-riot-install using the target branch CODEOWNERS file.
CODEOWNERS team requests not listed below are not required by the current file set.

.gitlab/scripts/prune-unsupported-wheels.sh                             @DataDog/python-guild @DataDog/apm-core-python
.gitlab/templates/cached-testrunner.yml                                 @DataDog/python-guild @DataDog/apm-core-python
.riot/requirements/10db676.txt                                          @DataDog/apm-python
.riot/requirements/15d6332.txt                                          @DataDog/apm-python
.riot/requirements/1abe7fb.txt                                          @DataDog/apm-python
.riot/requirements/b388a93.txt                                          @DataDog/apm-python
.riot/requirements/c2ce19f.txt                                          @DataDog/apm-python
.riot/requirements/ee54ec5.txt                                          @DataDog/apm-python
hooks/pre-commit/05-run-bandit                                          @DataDog/python-guild
hooks/scripts/run-mypy.sh                                               @DataDog/python-guild
pyproject.toml                                                          @DataDog/python-guild
riotfile.py                                                             @DataDog/apm-python
tests/internal/test_py315_import_degrade.py                             @DataDog/apm-core-python

@cit-pr-commenter-54b7da

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

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 27, 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._integrations.google_adk -×-> ddtrace.trace  (product:llmobs -> product:tracing, score=133)
ddtrace.debugging._debugger -×-> ddtrace.trace  (product:debugging -> product:tracing, score=133)
ddtrace.llmobs._integrations.llama_index -×-> ddtrace.trace  (product:llmobs -> product:tracing, score=133)
ddtrace.llmobs._integrations.anthropic -×-> ddtrace.trace  (product:llmobs -> 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-prod-us1-5

datadog-prod-us1-5 Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Pipelines  Tests

Unblock PR with BitsAI

⚠️ Warnings

Your PR has failed checks. Please review the issues below and take necessary action before merging.

🚦 4 Pipeline jobs failed

DataDog/apm-reliability/dd-trace-py | check_requirements_lockfiles — 🔧 Needs a code fix, caused by this PR

View more details · View in GitLab

DataDog/apm-reliability/dd-trace-py | contrib/sourcecode 1/1 — 🔧 Needs a code fix, caused by this PR

View more details · View in GitLab

DataDog/apm-reliability/dd-trace-py | rust ci — 🔧 Needs a code fix, caused by this PR

View more details · View in GitLab

View all 4 failed jobs.

ℹ️ Info

No other issues found (see more)

🧪 All tests passed
❄️ No new flaky tests detected

Useful? React with 👍 / 👎

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

@pr-commenter

pr-commenter Bot commented Aug 27, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-08-30 03:20:03

Comparing candidate commit 8d8e684 in PR branch vlad/py315-riotfile with baseline commit 19654b8 in branch vlad/py315-riot-install.

📊 Benchmarking dashboard

Found 0 performance improvements and 6 performance regressions! Performance is the same for 580 metrics, 10 unstable metrics, 3 known flaky benchmarks, 15 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.580µs; +2.736µs] or [+15.323%; +16.251%]

scenario:iastaspects-add_aspect

  • 🟥 execution_time [+9.231µs; +11.540µs] or [+9.166%; +11.460%]

scenario:iastaspectsospath-ospathbasename_aspect

  • 🟥 execution_time [+130.261µs; +135.703µs] or [+31.264%; +32.570%]

scenario:iastaspectssplit-rsplit_aspect

  • 🟥 execution_time [+28.923µs; +38.244µs] or [+20.204%; +26.715%]

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

  • 🟥 execution_time [+602.588ns; +655.848ns] or [+21.910%; +23.846%]

scenario:tracer-small

  • 🟥 execution_time [+33.610µs; +36.590µs] or [+10.171%; +11.073%]

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 [-684.258ns; +780.345ns] or [-6.257%; +7.135%]

scenario:coreapiscenario-core_dispatch_1_listener

  • unstable execution_time [-32.182ns; +34.414ns] or [-5.298%; +5.666%]

scenario:coreapiscenario-core_dispatch_50_listeners

  • unstable execution_time [-1609.940ns; +1685.174ns] or [-9.456%; +9.898%]

scenario:coreapiscenario-core_dispatch_exception_listeners

  • unstable execution_time [-1553.507ns; +1049.472ns] or [-11.488%; +7.761%]

scenario:coreapiscenario-core_dispatch_listeners

  • unstable execution_time [-324.567ns; +326.439ns] or [-8.820%; +8.871%]

scenario:coreapiscenario-core_dispatch_no_args_listeners

  • unstable execution_time [-256.814ns; +256.255ns] or [-8.751%; +8.732%]

scenario:coreapiscenario-core_dispatch_with_results_1_listener

  • unstable execution_time [-62.988ns; +81.775ns] or [-5.400%; +7.010%]

scenario:coreapiscenario-core_dispatch_with_results_50_listeners

  • unstable execution_time [-3972.812ns; +3923.633ns] or [-9.748%; +9.628%]

scenario:coreapiscenario-core_dispatch_with_results_listeners

  • unstable execution_time [-816.762ns; +730.505ns] or [-10.052%; +8.991%]

scenario:packagesupdateimporteddependencies-import_many_stdlib_cached

  • unstable execution_time [-55.875µs; +62.033µs] or [-8.994%; +9.986%]

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-casefold_noaspect

  • 🟥 execution_time [+66.984µs; +72.984µs] or [+26.824%; +29.227%]

scenario:iastaspects-translate_aspect

  • 🟥 execution_time [+92.505µs; +102.122µs] or [+21.487%; +23.721%]

scenario:span-start

  • 🟥 execution_time [+1.219ms; +1.371ms] or [+8.584%; +9.650%]

Known flaky benchmarks without significant changes:

  • scenario:errortrackingflasksqli-baseline
  • scenario:flasksimple-iast-get
  • scenario:iastaspects-casefold_aspect
  • scenario:iastaspects-index_aspect
  • scenario:iastaspects-ljust_noaspect
  • scenario:iastaspects-lower_aspect
  • scenario:iastaspects-replace_aspect
  • scenario:iastaspects-swapcase_aspect
  • scenario:iastaspects-title_noaspect
  • 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

Copilot AI 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.

Pull request overview

This PR updates the Riot CI configuration to make Python 3.15 available for opt-in scheduling while keeping the default Riot max version capped at 3.14, and adds the corresponding 3.15 lockfiles for a starter set of suites.

Changes:

  • Add (3, 15) to SUPPORTED_PYTHON_VERSIONS and extend doctests to cover 3.15.
  • Keep the default Riot cap at MAX_PYTHON_VERSION = "3.14" while opting six selected venvs into 3.15 via select_pys(max_version="3.15").
  • Add six new .riot/requirements/*.txt lockfiles generated under Python 3.15 for the newly introduced 3.15 hashes.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
riotfile.py Adds 3.15 to supported versions, keeps default max at 3.14, and opts specific venvs into 3.15 selection.
.riot/requirements/ee54ec5.txt New Python 3.15 lockfile for one of the newly-added 3.15 venv hashes.
.riot/requirements/c2ce19f.txt New Python 3.15 lockfile for one of the newly-added 3.15 venv hashes (includes setuptools in unsafe section).
.riot/requirements/b388a93.txt New Python 3.15 lockfile for one of the newly-added 3.15 venv hashes.
.riot/requirements/1abe7fb.txt New Python 3.15 lockfile for one of the newly-added 3.15 venv hashes.
.riot/requirements/15d6332.txt New Python 3.15 lockfile for one of the newly-added 3.15 venv hashes.
.riot/requirements/10db676.txt New Python 3.15 lockfile for one of the newly-added 3.15 venv hashes.
Suppressed comments (1)

riotfile.py:71

  • str_to_version() can return variable-length tuples (the doctest includes "3" -> (3,)), but the return type annotation is tuple[int, int]. Updating the return annotation to tuple[int, ...] matches the actual behavior.
    >>> str_to_version("3")
    (3,)

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread riotfile.py
Comment thread riotfile.py
@vlad-scherbich
vlad-scherbich force-pushed the vlad/py315-riot-install branch from faa10e0 to ff3b31d Compare August 28, 2026 14:08
gh-worker-dd-mergequeue-cf854d Bot pushed a commit that referenced this pull request Aug 28, 2026
**prev:** [#19906](#19906) | **next:** [#19910](#19910)

## Summary

Wrapping context + bytecode injection for 3.15. Delta vs #19906 only (monitoring + 3.15 assemblies).

## Test plan

- [ ] CI green on this branch
- [ ] Stack merges cleanly into the next PR's base branch


Co-authored-by: vlad-scherbich <vlad.scherbich@datadoghq.com>
Co-authored-by: gabriele.tornetta <gabriele.tornetta@datadoghq.com>
@vlad-scherbich
vlad-scherbich force-pushed the vlad/py315-riot-install branch from ff3b31d to 1d86b3f Compare August 28, 2026 14:57
@vlad-scherbich
vlad-scherbich force-pushed the vlad/py315-riot-install branch from 1d86b3f to 32c9f29 Compare August 28, 2026 15:51
@vlad-scherbich
vlad-scherbich force-pushed the vlad/py315-riotfile branch 2 times, most recently from f7e0135 to bd4659f Compare August 28, 2026 16:07
@vlad-scherbich
vlad-scherbich force-pushed the vlad/py315-riot-install branch from 32c9f29 to 801e339 Compare August 28, 2026 16:07
Add (3, 15) to SUPPORTED_PYTHON_VERSIONS and opt in six venvs. Default
max stays 3.14 so uncapped suites do not mix 3.15 into 3.9-3.14 jobs.
requires-python is unchanged; 3.15 installs fail until #19904.
@vlad-scherbich
vlad-scherbich force-pushed the vlad/py315-riot-install branch from 801e339 to 19654b8 Compare August 28, 2026 18:34
@vlad-scherbich vlad-scherbich changed the title ci(riot): schedule Python 3.15 jobs for a starter set ci(riot): schedule Python 3.15 jobs for a starter set (PROF-14439) Aug 28, 2026
@vlad-scherbich
vlad-scherbich marked this pull request as ready for review August 28, 2026 19:44
#17849 wrapping is merging to main; hashes sharing jobs and pip
install -e . (#19904) are the remaining reasons MAX stays 3.14.
@vlad-scherbich
vlad-scherbich requested a review from a team as a code owner August 28, 2026 19:44
@vlad-scherbich
vlad-scherbich requested review from Kyle-Verhoog and removed request for a team August 28, 2026 19:44
#19861 only makes cp315 optional in the package validator. Un-prune after
IMAGE_TAG can build a correct wheel, and only once 3.15 is supported.

(cherry picked from commit 703428b)
Monitoring inject_hook already works. The wrap raise tests are skipif
below NEXT and would demand a raise after wrap lift; they do not pin
this PR error-string change.

(cherry picked from commit 08c8693)
The SSI max bump does not need a bandit/mypy skip of lib-injection/.

(cherry picked from commit 0cf5c73)
Lint extra bytecode==0.18.1 on 3.15 is not the runtime dep
bytecode>=0.19.0. Leave both; they are different extras.

(cherry picked from commit 5bd7d37)
Drop it once the testrunner 3.15 interpreter is 3.15.0rc1+, when Cython 3.3 cp315 wheels no longer SIGSEGV.

(cherry picked from commit fbea5a1)
httplib, dbapi, subprocess, and detect_global_locks wrap and share
GitLab --exitfirst jobs. wrap() still raises on 3.15 on this stack.
Lint extra bytecode==0.18.1 conflicts with runtime bytecode>=0.19.0
when uv resolves extras for requires-python that includes 3.15.

(cherry picked from commit cac61ca)
@vlad-scherbich
vlad-scherbich requested review from a team as code owners August 30, 2026 02:49
@vlad-scherbich
vlad-scherbich requested review from juanjux and removed request for a team August 30, 2026 02:49
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