Repository navigation
[WIP] python: select interpreter-compatible coverage defaults - #73
Closed
anmarchenko wants to merge 1 commit into
Closed
anmarchenko wants to merge 1 commit into
anmarchenko wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Fixes the action's omitted Python coverage input so it selects 7.10.7 on Python 3.9 and preserves this release's 7.16.1 on Python 3.10–3.14. The tracer default remains ddtrace 4.15.2.
The coverage input has no global default, allowing the installer to distinguish omission from an explicit version. The action sends its modern release pin through
DD_DEFAULT_COVERAGE_VERSION_PYTHONand keeps forwarding explicitpython-coverage-versionoverrides unchanged. Normal library-bump helpers update the modern release pin without reinstating a universal coverage default. The summary includes the installed coverage version.This is a draft coordinated release PR: it points to proposed installer v16 and must wait for the installer artifact to be published and its bytes/checksum verified before release.
Motivation
An uncoached HTTPX onboarding trial using
datadog/test-visibility-github-action@v3on Python 3.9 failed before the test planner started. The action unconditionally suppliedcoverage==7.16.1. Pip rejected that dependency, then installer v15 misleadingly reportedCould not install ddtrace for Python.Failed Python 3.9 job.
The investigation confirmed:
>=3.9,<3.15>=3.10>=3.9Coverage 7.11.0 dropped Python 3.9. Pinning that compatibility boundary preserves reproducibility and retains the modern coverage release elsewhere. A moving latest-compatible range would change independently of the action release; globally pinning 7.10.6 would unnecessarily downgrade newer interpreters and merely encode the trial's workaround.
The investigation used action base
1abae93083b69778facd7ee11f89184306c999e6. Downloaded installer v15 matched source in its separate repository and the action's checksume64a4a45e0b171f4294b9f949f7fc99946192f952a2d463c61fad3cb8b956a58.Additional Notes
Depends on installer PR: DataDog/test-visibility-install-script#28
Installer source is maintained in DataDog/test-visibility-install-script. The companion change owns the deterministic Python 3.9 pin, separates tracer/coverage failures, uses the selected interpreter's pip, and emits success flags only after installation succeeds. Standalone newer-Python installations retain their existing 7.13.5 coverage default; this action separately supplies 7.16.1.
Explicit input behavior:
python-coverage-version: 7.10.6installs exactly 7.10.6.python-coverage-version: 7.16.1fails withCould not install coverage==7.16.1 for Python 3.9.16, retains pip's diagnostics, and does not fall back or advertise successful instrumentation.Release sequence:
be1de997fab7862640146b6836c96cbf13f4e9fa577cb501e80c37c5a5c60768; update it if source bytes change.The v16 URL returned HTTP 404 on 7 October 2026. Until deployment, the hosted action matrix is expected to fail at artifact download/checksum verification. Do not merge/release this action against an unavailable artifact, and do not overwrite v15, whose bytes remain required by existing immutable action releases.
Possible Drawbacks / Trade-offs
Python 3.9 stays on coverage's final compatible release. Future dependency bumps can change interpreter support, so the new Python matrix must pass before release. Explicit incompatible versions fail instead of silently changing a user's request.
The action input is now optional without a YAML
default; maintainers must bumpDD_DEFAULT_COVERAGE_VERSION_PYTHONinstead. Both bump helpers and a regression guard are updated accordingly. Existing user version inputs remain authoritative.Hosted Linux action behavior and Datadog event delivery remain unverified. Windows was excluded as requested. This patch does not address the trial's baseline HTTPX Twine metadata/trio warning failures or the separate hidden
.coverage.*upload issue.Describe how to test/QA your changes
Completed locally on macOS arm64, using the companion installer's final bytes with this action's environment settings:
Each fresh environment asserts that the active Datadog
TestOptPluginis registered. Tracing used a dummy API key and a closed localhost endpoint. These are smoke-fixture coverage results, not a rerun of HTTPX's full application suite or proof of backend delivery.Additional validation:
GITHUB_ENVempty. This was local wiring validation, not a hosted action run.defaultsbump guard also passed; its installation checks remain blocked by the unavailable v16 artifact.Run the local bump guard:
After publishing v16, the new hosted action matrix exercises defaults on Python 3.9–3.14, the compatible 7.10.6 override, and the incompatible 7.16.1 override. It verifies selected versions, active pytest instrumentation, fixture coverage, and absence of success flags on expected failure.