Repository navigation
python: select compatible coverage defaults and report install failures - #28
Closed
anmarchenko wants to merge 1 commit into
Closed
anmarchenko wants to merge 1 commit into
anmarchenko wants to merge 1 commit into
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
More details
Static validation supports the Python 3.9 coverage default, explicit-override precedence, and dependency-specific failure handling. Real-package compatibility across Python 3.9–3.14 remains unverified in this review.
🤖 Bits Code Review · Commit 33a90d6 · @DataDog review to ask questions
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 Python 3.9 installation when coverage is omitted and reports the dependency that actually failed. Default coverage becomes 7.10.7 on Python 3.9; standalone installations retain 7.13.5 on newer interpreters. A new
DD_DEFAULT_COVERAGE_VERSION_PYTHONlets the GitHub Action supply its own release pin for newer Python without treating it as an explicit user override.An explicit
DD_SET_COVERAGE_VERSION_PYTHONalways wins. Requesting7.16.1on Python 3.9 exits nonzero withCould not install coverage==7.16.1 for Python 3.9.16, retains pip's diagnostics, and emits no Python instrumentation environment variables or shared success flags.The patch also:
python -m pip, separates tracer and coverage installation errors, and preserves full package paths containing spaces.Motivation
An uncoached HTTPX onboarding trial using
datadog/test-visibility-github-action@v3failed before its test planner could start. The action passedddtrace==4.15.2andcoverage==7.16.1to this installer's combined pip invocation. Pip correctly rejected coverage, but the installer then reportedCould not install ddtrace for Python.Failed Python 3.9 job.
The investigation confirmed:
>=3.9,<3.15>=3.10>=3.9Coverage's 7.11.0 changelog explicitly records dropping Python 3.9. The compatibility pin is therefore 7.10.7, rather than the trial's known 7.10.6 workaround or an unconditional downgrade for every interpreter.
Downloaded v15 bytes matched this repository's base
1f1cbed10074948885396f9938f95add39a63b84and the action checksume64a4a45e0b171f4294b9f949f7fc99946192f952a2d463c61fad3cb8b956a58.Additional Notes
Coordinated action PR: DataDog/test-visibility-github-action#73
The action proposal preserves ddtrace 4.15.2 and coverage 7.16.1 for Python 3.10–3.14. Its omitted coverage input forwards an empty explicit override and supplies the modern pin through the new default variable. This installer owns the frozen Python 3.9 compatibility boundary; normal action library bumps must not replace it.
Release sequence:
be1de997fab7862640146b6836c96cbf13f4e9fa577cb501e80c37c5a5c60768.The proposed v16 URL returned HTTP 404 on 7 October 2026. The local checksum is provisional until matching bytes are deployed and verified. If source changes, recompute it. Do not overwrite v15: immutable action releases depend on those existing bytes and their checksum. This PR does not deploy or publish the artifact.
Possible Drawbacks / Trade-offs
The fixed Python 3.9 pin intentionally stops receiving newer coverage releases because those releases no longer support the interpreter. Future changes to supported Python versions require reviewing the defaults and running the interpreter matrix. Explicit incompatible overrides fail rather than silently selecting another version or disabling instrumentation.
Shared enable flags now appear after language-specific outputs. A multi-language failure still exits nonzero and may leave earlier successful language outputs, but does not advertise overall enablement. The existing Go decision matrix passes with this ordering change.
Windows was excluded from this investigation. After opening this PR, the hosted Ubuntu Python checks passed on all six versions, 3.9–3.14, and the Go matrices passed on Ubuntu and macOS. Datadog event delivery and the original hosted HTTPX action run remain unverified. HTTPX's Twine metadata and trio warning failures, and hidden
.coverage.*upload handling, are separate issues outside this change.Describe how to test/QA your changes
Completed locally on macOS arm64, with fresh application and instrumentation virtual environments:
Each runtime fixture asserts that the active Datadog
TestOptPluginis registered. A dummy API key and closed localhost tracing endpoint were used; this validates active instrumentation without claiming backend delivery. The 100% result applies only to this small branch fixture, not HTTPX's application suite.Additional results:
GITHUB_ENVempty. Download and optional/github/workspacecreation were stubbed; this was not a hosted action run.Reproduce on the desired interpreter:
The new hosted installer workflow covers Python 3.9–3.14 directly from source and has passed on all six interpreters. The action matrix must run against the published artifact after v16 deployment.