Skip to content

fix(internal): run fork PR #21428 through CI [DO NOT MERGE] - #21448

Draft
taegyunkim wants to merge 4 commits into
mainfrom
taegyun.kim/mirror-21428
Draft

taegyunkim wants to merge 4 commits into
mainfrom
taegyun.kim/mirror-21428

Conversation

@taegyunkim

@taegyunkim taegyunkim commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Description

This PR exists only to run CI for a fork PR. Do not merge.

Original PR: #21428

Head commit: 97a290e680bcc02806037a30c83729f1085d1c1a, identical to the original PR.

@taegyunkim taegyunkim added the changelog/no-changelog A changelog entry is not required for this PR. label Nov 2, 2026
@taegyunkim taegyunkim removed the changelog/no-changelog A changelog entry is not required for this PR. label Nov 2, 2026
@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Dependency direction analysis

⚠️ Existing dependency direction violations

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

Show existing violations (showing 5 of 104 highest severity)
ddtrace.internal.tracemethods -×-> ddtrace.trace  (internal-core -> product:tracing, score=122)
ddtrace.llmobs._integrations.vertexai -×-> ddtrace.trace  (product:llmobs -> product:tracing, score=120)
ddtrace.llmobs._integrations.crewai -×-> ddtrace.trace  (product:llmobs -> product:tracing, score=120)
ddtrace.llmobs._integrations.bedrock_agents -×-> ddtrace.trace  (product:llmobs -> product:tracing, score=120)
ddtrace.llmobs._integrations.pydantic_ai -×-> ddtrace.trace  (product:llmobs -> product:tracing, score=120)

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

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.

ddtrace/internal/module.py                                              @DataDog/debugger-python @DataDog/apm-core-python
releasenotes/notes/fix-module-spec-loader-mismatch-b1e7b73f7e7aa3f6.yaml  @DataDog/apm-python
tests/internal/test_module.py                                           @DataDog/debugger-python @DataDog/apm-core-python

@datadog-datadog-us1-prod

datadog-datadog-us1-prod Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Pipelines  Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

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

@pr-commenter

pr-commenter Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-11-09 16:30:26

Comparing candidate commit 97a290e in PR branch taegyun.kim/mirror-21428 with baseline commit b2fc819 in branch main.

📊 Benchmarking dashboard

Found 0 performance improvements and 0 performance regressions! Performance is the same for 584 metrics, 10 unstable metrics, 1 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 ----------------------------------'

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 [-693.304ns; +725.593ns] or [-6.419%; +6.718%]

scenario:coreapiscenario-core_dispatch_1_listener

  • unstable execution_time [-36.489ns; +33.073ns] or [-5.279%; +4.784%]

scenario:coreapiscenario-core_dispatch_50_listeners

  • unstable execution_time [-1696.619ns; +1987.903ns] or [-8.476%; +9.931%]

scenario:coreapiscenario-core_dispatch_exception_listeners

  • unstable execution_time [-1998.754ns; +1539.181ns] or [-10.260%; +7.901%]

scenario:coreapiscenario-core_dispatch_listeners

  • unstable execution_time [-350.038ns; +374.722ns] or [-7.983%; +8.546%]

scenario:coreapiscenario-core_dispatch_no_args_listeners

  • unstable execution_time [-214.167ns; +222.529ns] or [-7.890%; +8.198%]

scenario:coreapiscenario-core_dispatch_with_results_1_listener

  • unstable execution_time [-90.827ns; +85.803ns] or [-6.399%; +6.045%]

scenario:coreapiscenario-core_dispatch_with_results_50_listeners

  • unstable execution_time [-4749.628ns; +4568.562ns] or [-9.400%; +9.042%]

scenario:coreapiscenario-core_dispatch_with_results_listeners

  • unstable execution_time [-997.612ns; +938.704ns] or [-9.269%; +8.722%]

scenario:packagesupdateimporteddependencies-import_many_stdlib_cached

  • unstable execution_time [-53.691µs; +59.337µs] or [-9.213%; +10.182%]

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.

Known flaky benchmarks without significant changes:

  • scenario:packagespackageforrootmodulemapping-cache_off

1AbdullahButt and others added 4 commits November 7, 2026 04:38
The import hook's chained loader restores the original loader on the
module after import, but set it on `module.spec` instead of
`module.__spec__`. The AttributeError was swallowed, so `__spec__.loader`
kept pointing at the chained loader while `__loader__` was restored.
On Python 3.15 this makes traceback formatting emit a DeprecationWarning
for file modules imported after ddtrace.

Fixes #21425

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…oader

A wrapped loader can replace `__loader__` / `__spec__.loader` while it
executes the module; `importlib.util.LazyLoader` swaps in the eager loader
this way. Restoring unconditionally put the LazyLoader back, so the first
attribute access re-entered lazy loading through the wrong loader and
module attributes were missing on Python 3.12+.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@taegyunkim
taegyunkim force-pushed the taegyun.kim/mirror-21428 branch from 7e6d88a to 97a290e Compare November 9, 2026 15:57
gnufede added a commit that referenced this pull request Nov 24, 2026
## Description

**Stacked on #22018** (base `gnufede/package-split-prep`). This freezes
every file of the package split's first wave, so nothing can drift
between the port and the bridge. It replaces #21967, #21973 and #21990.

33 files are frozen, with hashes of their content after #22018:

- **Moving whole to `ddtrace-internal`**
(DataDog/datadog-apm-python#77): `utils/cache.py`, `utils/paths.py`,
`utils/obfuscation.py`, `utils/time.py`, `compat.py`, `assembly.py`,
`logger.py`, `settings/__init__.py`, `settings/env.py`, `module.py`,
`bytecode_injection/core.py`.
- **Partially moving, frozen whole** so the ported symbols stay
identical:
- `utils/__init__.py` (`get_argument_value`, `set_argument_value`,
`ArgumentError`);
  - `utils/formats.py` (`asbool`);
  - `utils/inspection.py` (`resolved_code_origin`);
  - `bytecode_injection/__init__.py` (`HookType`, `INJECTION_ASSEMBLY`).
- **Moving to `ddtrace-coverage`** (DataDog/datadog-apm-python#82): all
18 files under `ddtrace/internal/coverage/`.

`src/native` is not frozen here. The native switch is a separate step
that waits on the profiling team's agreement on the profiling FFI
approach.

The bridge PR, landing after `ddtrace-internal` 0.4.0 and
`ddtrace-coverage` 0.1.0 are released, replaces these modules with
re-exports and removes these entries in the same PR.

## Testing

Only `frozen-paths.txt` changes. All 33 hashes were checked against the
committed file contents (the same comparison `freeze-check.yml` makes).

## Risks

- **Edits are blocked** to these files until the bridge lands. Open PRs
that touch them must merge first or rebase afterwards. Earlier we saw
`module.py` (#21428, #21448), `coverage/instrumented_mode.py` and
`coverage/util.py` (#21405), and older prototype drafts.
- **Hash timing.** Hashes are taken from #22018's content. If #22018
changes before merging, they need regenerating.

## Additional Notes

None.

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants