Skip to content

chore(package-split): freeze quiet coverage files - #21990

Closed
gnufede wants to merge 1 commit into
gnufede/freeze-internal-batch2from
gnufede/freeze-internal-batch3
Closed

gnufede wants to merge 1 commit into
gnufede/freeze-internal-batch2from
gnufede/freeze-internal-batch3

Conversation

@gnufede

@gnufede gnufede commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

Superseded by #22019, which freezes every wave-1 file in a single PR, stacked on #22018.

Description

Stacked on #21973; base branch gnufede/freeze-internal-batch2. This freezes the ddtrace/internal/coverage files that no open PR touches, so they can't diverge from the ddtrace-coverage package being prepared in DataDog/datadog-apm-python. The 7 files:

  • __init__.py
  • coverage_lines.py
  • import_instrumentation_py3_12.py
  • installer.py
  • instrumentation_py3_16.py
  • instrumentation_py3_9.py
  • report.py

A comment block in frozen-paths.txt lists what is still pending, and why:

  • utils/time.py, logger.py, settings/env.py: waiting on their own preparation PRs.
  • module.py: waiting on open PRs that touch it.
  • The rest of coverage/* and bytecode_injection/core.py: touched by open draft PRs.
  • Partially moved files (utils/__init__.py, utils/formats.py, utils/inspection.py, bytecode_injection/__init__.py): documented, not frozen.

Testing

The freeze-check loop from freeze-check.yml was run locally against the merge of this branch with main: all 13 entries match.

Risks

It blocks edits to these 7 files until they're unfrozen.

Additional Notes

None.

The package split moves ddtrace/internal/coverage into ddtrace-coverage.
Freeze the files that no open PR touches and that have seen little
churn, so they cannot diverge from the package copy.

Files that open PRs still change (utils/time.py, logger.py,
settings/env.py, module.py, most coverage modules, bytecode_injection
core.py) are listed in frozen-paths.txt as pending instead, because
freezing them now would block those PRs. Partially moved, widely edited
files (utils/__init__, formats, inspection, bytecode_injection/__init__)
are deliberately not frozen.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@cit-pr-commenter-54b7da

Copy link
Copy Markdown

Codeowners resolved as

Resolved from the full PR diff against gnufede/freeze-internal-batch2 using the target branch CODEOWNERS file.
CODEOWNERS team requests not listed below are not required by the current file set.

frozen-paths.txt                                                        @DataDog/apm-core-python

@cit-pr-commenter-54b7da

Copy link
Copy Markdown

Dependency direction analysis

⚠️ Existing dependency direction violations

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

Show existing violations (showing 5 of 22 highest severity)
ddtrace.internal.tracemethods -×-> ddtrace.trace  (internal-core -> product:tracing, score=103)
ddtrace.llmobs._integrations.bedrock_agents -×-> ddtrace.trace  (product:llmobs -> product:tracing, score=101)
ddtrace.llmobs._integrations.base -×-> ddtrace.trace  (product:llmobs -> product:tracing, score=101)
ddtrace.internal.span_bus -×-> ddtrace._trace.span  (internal-core -> product:tracing, score=35)
ddtrace.llmobs._llmobs -×-> ddtrace._trace.span  (product:llmobs -> product:tracing, score=33)

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

@gnufede gnufede closed this Nov 23, 2026
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.

1 participant