Skip to content

ci(testrunner): rebuild 3.15-dev against current CPython - #19905

Closed
vlad-scherbich wants to merge 1 commit into
vlad/py315-pyo3-contextvarfrom
vlad/py315-testrunner-rebuild
Closed

ci(testrunner): rebuild 3.15-dev against current CPython#19905
vlad-scherbich wants to merge 1 commit into
vlad/py315-pyo3-contextvarfrom
vlad/py315-testrunner-rebuild

Conversation

@vlad-scherbich

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

Copy link
Copy Markdown
Contributor

Description

The pinned testrunner still ships pyenv 3.15-dev = CPython 3.15.0b3+dev (Jun 30).
rc1-built cp315 wheels fail to import on that interpreter (SystemError: unknown slot ID 84/85). Test jobs use TESTRUNNER_IMAGE, not DataDog/images.

This PR bumps pyenv v2.6.31v2.8.4 in docker/Dockerfile. A docker/** push to
main retriggers .github/workflows/testrunner.yml, which recompiles 3.15-dev. It
does not pin 3.15.0.

Impact: the next testrunner image rebuilds. GitLab jobs
keep the old digest until a follow-up pins it.

Testing

Image rebuild runs after merge to main (workflow is push to main on docker/**, not
PR branches). After publish, check python3.15 -VV on the new image, then pin
.gitlab/testrunner.yml.

Risks

Pyenv 2.8.4 also reinstalls 3.8–3.14 from current definitions (patch-level bumps possible).
3.8.20 still exists in 2.8.4.

Additional Notes

@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

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.

docker/Dockerfile                                                       @DataDog/python-guild

@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 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.claude_agent_sdk -×-> ddtrace.trace  (product:llmobs -> product:tracing, score=133)
ddtrace.llmobs._utils -×-> ddtrace.trace  (product:llmobs -> product:tracing, score=133)
ddtrace.appsec._listeners -×-> ddtrace.trace  (product:appsec -> product:tracing, score=133)
ddtrace.debugging._exception.replay -×-> ddtrace.trace  (product:debugging -> 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-us1-prod

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

Copy link
Copy Markdown

Pipelines  Tests

Unblock PR with BitsAI

⚠️ Warnings

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

🚦 2 Pipeline jobs failed

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

View more details · View in GitLab

DataDog/apm-reliability/dd-trace-py | download_dependency_wheels: [3.15.0rc1, 3.15]

View more details · View in GitLab

ℹ️ 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: 001ea1e | 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-28 19:06:52

Comparing candidate commit 001ea1e in PR branch vlad/py315-testrunner-rebuild with baseline commit c2e9f4f in branch vlad/py315-pyo3-contextvar.

📊 Benchmarking dashboard

Found 0 performance improvements and 8 performance regressions! Performance is the same for 578 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.449µs; +2.672µs] or [+14.747%; +16.092%]

scenario:iastaspects-add_aspect

  • 🟥 execution_time [+12.333µs; +14.717µs] or [+12.570%; +15.001%]

scenario:iastaspects-join_aspect

  • 🟥 execution_time [+59.551µs; +63.591µs] or [+28.225%; +30.140%]

scenario:iastaspects-title_aspect

  • 🟥 execution_time [+70.763µs; +79.412µs] or [+26.367%; +29.590%]

scenario:iastaspectsospath-ospathbasename_aspect

  • 🟥 execution_time [+139.876µs; +143.674µs] or [+35.548%; +36.513%]

scenario:iastaspectssplit-rsplit_aspect

  • 🟥 execution_time [+39.679µs; +45.357µs] or [+27.954%; +31.953%]

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

  • 🟥 execution_time [+643.137ns; +701.224ns] or [+23.785%; +25.933%]

scenario:tracer-small

  • 🟥 execution_time [+29.278µs; +31.712µs] or [+9.015%; +9.764%]

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 [-689.008ns; +764.740ns] or [-6.304%; +6.997%]

scenario:coreapiscenario-core_dispatch_1_listener

  • unstable execution_time [-34.213ns; +32.012ns] or [-5.599%; +5.239%]

scenario:coreapiscenario-core_dispatch_50_listeners

  • unstable execution_time [-1356.459ns; +1914.600ns] or [-8.095%; +11.426%]

scenario:coreapiscenario-core_dispatch_exception_listeners

  • unstable execution_time [-884.823ns; +1609.531ns] or [-6.868%; +12.494%]

scenario:coreapiscenario-core_dispatch_listeners

  • unstable execution_time [-261.182ns; +384.643ns] or [-7.220%; +10.633%]

scenario:coreapiscenario-core_dispatch_no_args_listeners

  • unstable execution_time [-193.013ns; +311.825ns] or [-6.714%; +10.847%]

scenario:coreapiscenario-core_dispatch_with_results_1_listener

  • unstable execution_time [-70.632ns; +77.143ns] or [-6.017%; +6.571%]

scenario:coreapiscenario-core_dispatch_with_results_50_listeners

  • unstable execution_time [-4029.239ns; +3917.132ns] or [-9.894%; +9.619%]

scenario:coreapiscenario-core_dispatch_with_results_listeners

  • unstable execution_time [-844.036ns; +706.989ns] or [-10.337%; +8.659%]

scenario:packagesupdateimporteddependencies-import_many_stdlib_cached

  • unstable execution_time [-58414.580ns; +59435.405ns] or [-9.367%; +9.530%]

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

  • 🟥 execution_time [+56.310µs; +61.780µs] or [+20.188%; +22.149%]

scenario:span-start

  • 🟥 execution_time [+1.237ms; +1.476ms] or [+8.917%; +10.634%]

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-lower_aspect
  • scenario:iastaspects-replace_aspect
  • scenario:iastaspects-swapcase_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

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

Updates the testrunner Docker image build so that 3.15-dev (built via pyenv) is regenerated against current CPython 3.15 sources, addressing import failures caused by an older pinned 3.15.0b3+dev interpreter.

Changes:

  • Bump pyenv from v2.6.31 to v2.8.4 in the testrunner docker/Dockerfile.
  • Add clarifying in-file commentary explaining why the pyenv bump is needed to refresh 3.15-dev.

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

@vlad-scherbich
vlad-scherbich force-pushed the vlad/py315-pyo3-contextvar branch from 0f481d5 to f9ee924 Compare August 28, 2026 14:08
@vlad-scherbich
vlad-scherbich force-pushed the vlad/py315-testrunner-rebuild branch from 496f6a1 to 994180a Compare August 28, 2026 14:08
@vlad-scherbich
vlad-scherbich force-pushed the vlad/py315-pyo3-contextvar branch from f9ee924 to 12acbff Compare August 28, 2026 14:57
@vlad-scherbich
vlad-scherbich force-pushed the vlad/py315-testrunner-rebuild branch from 994180a to be14e88 Compare August 28, 2026 14:57
@vlad-scherbich
vlad-scherbich force-pushed the vlad/py315-pyo3-contextvar branch from 12acbff to 59047aa Compare August 28, 2026 15:51
@vlad-scherbich
vlad-scherbich force-pushed the vlad/py315-testrunner-rebuild branch 2 times, most recently from 45a74e6 to cc7c1ae Compare August 28, 2026 16:07
@vlad-scherbich
vlad-scherbich force-pushed the vlad/py315-pyo3-contextvar branch 2 times, most recently from bb9aaf9 to c2e9f4f Compare August 28, 2026 18:33
Bump pyenv v2.6.31 to v2.8.4 so a docker/** push to main rebuilds the
testrunner image. The pinned image still has 3.15.0b3+dev (Jun 30),
which rejects rc1-built cp315 wheels.
@vlad-scherbich
vlad-scherbich force-pushed the vlad/py315-testrunner-rebuild branch from cc7c1ae to 001ea1e Compare August 28, 2026 18:34
@vlad-scherbich

Copy link
Copy Markdown
Contributor Author

Absorbed into #19907 (same two commits; retargeted that PR onto #19903 so one review covers both files). Closing this PR. Branch left in place.

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