Skip to content

ci(testrunner): rebuild 3.15-dev and pin Cython<3.3 on the 3.15 cache (PROF-14439) - #19907

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 3 commits into
mainfrom
vlad/py315-testrunner-cython-pin
Sep 2, 2026
Merged

ci(testrunner): rebuild 3.15-dev and pin Cython<3.3 on the 3.15 cache (PROF-14439)#19907
gh-worker-dd-mergequeue-cf854d[bot] merged 3 commits into
mainfrom
vlad/py315-testrunner-cython-pin

Conversation

@vlad-scherbich

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

Copy link
Copy Markdown
Contributor

Description

Delta vs #19903.

docker/Dockerfile: pyenv v2.6.31v2.8.4. A docker/** push to main retriggers .github/workflows/testrunner.yml and recompiles 3.15-dev. Does not pin a 3.15.0 interpreter or the GitLab TESTRUNNER_IMAGE digest.

.cached_testrunner EXT_CACHE_VENV: pip install … 'Cython<3.3' when PYTHON_VERSION=3.15; other versions stay unpinned Cython.

If this merges and nothing else new lands: the next testrunner image rebuilds with pyenv 2.8.4, and the 3.15 cache venv gets Cython 3.2.x. GitLab jobs keep the old digest until a follow-up pins it.

Testing

Image rebuild is the testrunner workflow after merge to main. After publish, pin .gitlab/testrunner.yml. Confirm the generated 3.15 build_base_venvs before_script installs Cython<3.3.

Risks

Pyenv 2.8.4 also reinstalls 3.8–3.14 (patch-level bumps possible). Cython pin is 3.15-only.

Additional Notes

Does not duplicate #19861 (pyproject.toml unchanged). No release note: CI chore, changelog/no-changelog.

Base: #19903. Next: #19904.

@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 main using the target branch CODEOWNERS file.
CODEOWNERS team requests not listed below are not required by the current file set.

No remaining files require a CODEOWNERS review.

@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 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.internal.ci_visibility.api._base -×-> ddtrace.trace  (product:ci_visibility -> product:tracing, score=132)
ddtrace.appsec._listeners -×-> ddtrace.trace  (product:appsec -> product:tracing, score=132)
ddtrace.llmobs._integrations.pydantic_ai -×-> ddtrace.trace  (product:llmobs -> product:tracing, score=132)
ddtrace.llmobs._integrations.openai -×-> ddtrace.trace  (product:llmobs -> 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

@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

@datadog-datadog-prod-us1-2

datadog-datadog-prod-us1-2 Bot commented Aug 27, 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: a77787f | 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-09-02 02:25:08

Comparing candidate commit a77787f in PR branch vlad/py315-testrunner-cython-pin with baseline commit a78b774 in branch main.

📊 Benchmarking dashboard

Found 0 performance improvements and 7 performance regressions! Performance is the same for 577 metrics, 10 unstable metrics, 1 known flaky benchmarks, 17 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:httppropagationextract-tracecontext_headers

  • 🟥 execution_time [+2.297µs; +2.524µs] or [+7.222%; +7.938%]

scenario:httppropagationinject-ids_only

  • 🟥 execution_time [+1.772µs; +1.897µs] or [+10.854%; +11.625%]

scenario:iastaspects-rstrip_aspect

  • 🟥 execution_time [+69.170µs; +75.908µs] or [+18.041%; +19.799%]

scenario:iastaspects-stringio_noaspect

  • 🟥 execution_time [+23.984µs; +27.953µs] or [+7.250%; +8.449%]

scenario:iastaspectsospath-ospathbasename_aspect

  • 🟥 execution_time [+113.997µs; +120.768µs] or [+28.871%; +30.586%]

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

  • 🟥 execution_time [+388.535ns; +430.794ns] or [+14.635%; +16.226%]

scenario:tracer-small

  • 🟥 execution_time [+42.776µs; +44.759µs] or [+13.323%; +13.940%]

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 [-713.208ns; +765.517ns] or [-6.497%; +6.973%]

scenario:coreapiscenario-core_dispatch_1_listener

  • unstable execution_time [-33.612ns; +35.381ns] or [-5.416%; +5.701%]

scenario:coreapiscenario-core_dispatch_50_listeners

  • unstable execution_time [-1713.802ns; +1628.532ns] or [-9.919%; +9.425%]

scenario:coreapiscenario-core_dispatch_exception_listeners

  • unstable execution_time [-1178.705ns; +1282.420ns] or [-9.143%; +9.947%]

scenario:coreapiscenario-core_dispatch_listeners

  • unstable execution_time [-332.523ns; +327.927ns] or [-8.946%; +8.822%]

scenario:coreapiscenario-core_dispatch_no_args_listeners

  • unstable execution_time [-257.140ns; +260.186ns] or [-8.702%; +8.805%]

scenario:coreapiscenario-core_dispatch_with_results_1_listener

  • unstable execution_time [-75.075ns; +76.227ns] or [-6.367%; +6.465%]

scenario:coreapiscenario-core_dispatch_with_results_50_listeners

  • unstable execution_time [-3883.244ns; +4065.163ns] or [-9.530%; +9.976%]

scenario:coreapiscenario-core_dispatch_with_results_listeners

  • unstable execution_time [-789.141ns; +746.990ns] or [-9.728%; +9.208%]

scenario:packagesupdateimporteddependencies-import_many_stdlib_cached

  • unstable execution_time [-63.383µs; +55.959µs] or [-10.040%; +8.864%]

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:span-start

  • 🟥 execution_time [+1.764ms; +2.013ms] or [+12.987%; +14.823%]

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

This PR updates the GitLab CI build_base_venvs template (.cached_testrunner) to avoid installing Cython 3.3.x into the EXT_CACHE_VENV when running the Python 3.15 arm, because Cython 3.3.0’s cp315 wheel can segfault on pre-rc1 Python 3.15 interpreters. This keeps the base-venv cache bootstrapping stable on 3.15 while leaving 3.9–3.14 behavior unchanged.

Changes:

  • Add a PYTHON_VERSION == 3.15 conditional in .cached_testrunner to install Cython<3.3 only for the 3.15 venv cache.
  • Preserve the existing unpinned Cython install path for Python 3.9–3.14.

💡 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-testrunner-rebuild branch from 496f6a1 to 994180a Compare August 28, 2026 14:08
@vlad-scherbich
vlad-scherbich force-pushed the vlad/py315-testrunner-cython-pin branch from 992d101 to d872a18 Compare August 28, 2026 14:08
@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-testrunner-cython-pin branch from d872a18 to 8b2e454 Compare August 28, 2026 14:57
@vlad-scherbich
vlad-scherbich force-pushed the vlad/py315-testrunner-rebuild branch from be14e88 to 45a74e6 Compare August 28, 2026 15:51
@vlad-scherbich
vlad-scherbich force-pushed the vlad/py315-testrunner-cython-pin branch from 8b2e454 to 5785062 Compare August 28, 2026 15:51
@vlad-scherbich
vlad-scherbich force-pushed the vlad/py315-testrunner-rebuild branch from 45a74e6 to cc7c1ae Compare August 28, 2026 16:07
@vlad-scherbich
vlad-scherbich force-pushed the vlad/py315-testrunner-cython-pin branch from 5785062 to 7e222d3 Compare August 28, 2026 16:07
@vlad-scherbich
vlad-scherbich force-pushed the vlad/py315-testrunner-rebuild branch from cc7c1ae to 001ea1e Compare August 28, 2026 18:34
@vlad-scherbich
vlad-scherbich force-pushed the vlad/py315-testrunner-cython-pin branch from 7e222d3 to 639f7b7 Compare August 28, 2026 18:34
@vlad-scherbich vlad-scherbich changed the title ci(testrunner): pin Cython<3.3 on the 3.15 venv cache ci(testrunner): rebuild 3.15-dev and pin Cython<3.3 on the 3.15 cache Aug 28, 2026
@vlad-scherbich
vlad-scherbich changed the base branch from vlad/py315-testrunner-rebuild to vlad/py315-pyo3-contextvar August 28, 2026 19:19
@vlad-scherbich
vlad-scherbich requested a lite review from Copilot August 28, 2026 19:26

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

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

@vlad-scherbich
vlad-scherbich marked this pull request as ready for review August 28, 2026 19:34
@vlad-scherbich
vlad-scherbich requested a review from a team as a code owner August 28, 2026 19:34
@vlad-scherbich
vlad-scherbich requested a review from a team as a code owner August 28, 2026 19:34
@vlad-scherbich
vlad-scherbich requested review from Yun-Kim and emmettbutler and removed request for a team August 28, 2026 19:34
@vlad-scherbich vlad-scherbich changed the title ci(testrunner): rebuild 3.15-dev and pin Cython<3.3 on the 3.15 cache ci(testrunner): rebuild 3.15-dev and pin Cython<3.3 on the 3.15 cache (PROF-14439) Aug 28, 2026
@vlad-scherbich
vlad-scherbich requested a review from a team as a code owner August 30, 2026 18:26
@vlad-scherbich
vlad-scherbich force-pushed the vlad/py315-pyo3-contextvar branch from 72d7f7a to 792f843 Compare August 31, 2026 18:30
@vlad-scherbich
vlad-scherbich force-pushed the vlad/py315-testrunner-cython-pin branch from afd0994 to 60de544 Compare August 31, 2026 18:30
Comment thread .codespellignorelines Outdated
@vlad-scherbich
vlad-scherbich force-pushed the vlad/py315-pyo3-contextvar branch from 792f843 to 34d0900 Compare September 1, 2026 02:16
@vlad-scherbich
vlad-scherbich force-pushed the vlad/py315-testrunner-cython-pin branch from 60de544 to 601e853 Compare September 1, 2026 02:31
Bump pyenv to v2.8.4 so the testrunner image is not stuck on 3.15.0b3+dev.
Ignore gpg colon-format fingerprint lines (fpr) so codespell can scan this file.
Cython 3.3 cp315 wheels SIGSEGV on pre-rc1 3.15; pyproject.toml pin does
not apply in the cached testrunner restore path.
TODO(py-315): drop this pin once testrunner 3.15 is 3.15.0rc1+.
gpg --with-colons prints fpr; codespell treats it as a typo of for.
Put it on the ignore-words-list instead of copying Dockerfile grep lines.
@vlad-scherbich
vlad-scherbich changed the base branch from vlad/py315-pyo3-contextvar to main September 2, 2026 01:52
@vlad-scherbich
vlad-scherbich force-pushed the vlad/py315-testrunner-cython-pin branch from 61d15e1 to a77787f Compare September 2, 2026 01:52
@vlad-scherbich

Copy link
Copy Markdown
Contributor Author

/merge -m squash

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351 Bot commented Sep 2, 2026

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-09-02 02:10:50 UTC ℹ️ Start processing command /merge -m squash


2026-09-02 02:11:08 UTC ℹ️ MergeQueue: Pull request is not mergeable yet

It will be processed automatically as soon as GitHub reports it as mergeable. View in MergeQueue UI.

  • Run /code blockers to see what is blocking it.
  • Run /remove to cancel it.

2026-09-02 02:29:12 UTC ℹ️ MergeQueue: merge request added to the queue

The expected merge time in main is approximately 1h (p90).


2026-09-02 03:06:39 UTC ℹ️ MergeQueue: This merge request was merged

@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot merged commit 4459ab6 into main Sep 2, 2026
1375 checks passed
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot deleted the vlad/py315-testrunner-cython-pin branch September 2, 2026 03:06
gh-worker-dd-mergequeue-cf854d Bot pushed a commit that referenced this pull request Sep 2, 2026
… (PROF-14439) (#19904)

## Description

Delta vs #19907.

riot's `install_dev_pkg` runs `pip install -e .`, so pip enforces `requires-python = ">=3.9,<3.15"` and refuses the dev package on 3.15. This PR sets `PIP_IGNORE_REQUIRES_PYTHON=1` only for the `PYTHON_VERSION=3.15` arm of `build_base_venvs`. Published metadata stays `<3.15`.

## Testing

Inspect the generated `build_base_venvs` `before_script` for `PYTHON_VERSION=3.15` and confirm the ignore is set only on that arm.

## Risks

None. 3.15-only env var; other matrix versions unchanged.

## Additional Notes

No release note: CI chore, `changelog/no-changelog`. Base: #19907. Next: #19906.


Co-authored-by: vlad.scherbich <vlad.scherbich@datadoghq.com>
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