Repository navigation
Conversation
ocelotl
force-pushed
the
issue_150_relax_support_library_pins
branch
from
November 30, 2026 17:19
4db2d80 to
5aeb33e
Compare
…g-extensions in the published metadata The distribution declared these five support libraries with == pins so the injected tree was spelled out in one file. The pins also reach PyPI, so pip install dash0-opentelemetry next to wrapt 2.5.2, packaging 26.4, asgiref 3.13.0 or typing_extensions 4.15.0 failed to resolve, and in a Django app with Deprecated it replaced wrapt 2.5.2 and asgiref 3.13.0 with 1.17.3 and 3.12.1 without a warning. Declare them without a version, so the ranges the OpenTelemetry packages declare decide, and move the exact pins to a new "pinned" extra. Builds of an injected tree install dash0-opentelemetry[pinned] and keep shipping exactly the validated versions: the e2e images and refresh_injector_manifest.py now do. all-dependencies.txt does not change, because a bare requirement adds no constraint and extra-gated requirements are skipped. check_pinned_dependencies.py now rejects any version on a support library in dependencies, requires each to be pinned in the extra, and checks the lock file's closure against the pins in either place. A build-job step resolves the built wheel next to each version from the issue. The OpenTelemetry pins stay: upstream already pins the SDK, semantic conventions and every contrib instrumentation to each other exactly, so a range here would only let the resolver pick a release train nobody validated. Fixes #150
ocelotl
force-pushed
the
issue_150_relax_support_library_pins
branch
from
November 30, 2026 17:32
5aeb33e to
0d0c0bf
Compare
This branch has not been deployed
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.
Closes #150
What was broken
packages/dash0-opentelemetry/pyproject.tomldeclaredasgiref == 3.12.1,packaging==26.3,psutil == 7.2.2,typing-extensions == 4.16.0andwrapt == 1.17.3. The pins go into the wheel'sRequires-Dist, so they bind every application that runspip install dash0-opentelemetry, and every one of these libraries is common in applications:main(0.4.1 metadata)uv pip compileofdash0-opentelemetrywithwrapt==2.5.2,packaging==26.4,asgiref==3.13.0ortyping_extensions==4.15.0pip install dash0-opentelemetrypip checkclean, no warningpip install -roffastapi,wrapt==2.5.2,dash0-opentelemetryResolutionImpossibleThe silent downgrade is the inverse of #124: the injector accepts wrapt 2.x now, but the PyPI install path forces it back to 1.17.3.
Why the pins were there, and how this keeps that
The comment on the dependency block and the README's dependency policy (#7,
789f43b, extended to the whole closure inee4d6fa/#4) give the reason: each release is validated against one exact tree, and that tree is spelled out in this file with nothing left to transitive resolution. The consumer that needs it is the injected tree. The dash0-operator image and this repository's e2e images build that tree withpip install --target, so the published metadata was the only thing fixing what that tree contains.The two needs are separate, so this PR declares them separately:
dependencieslists the five support libraries without a version. The packages that need them already declare the ranges they support (wrapt<3.0.0,>=1.0.0,>=1.11.2,>=1.12.1,asgiref~=3.0,packaging>=18.0,>=20.0,>=21.0,psutil<8,>=5.9.0,typing-extensions>=4.5.0,~=4.1, the same linesall-dependencies.txtalready carries). Copying those ranges into our metadata would only go stale the next time upstream widens one.pinnedextra carries the exact pins.pip install --target <dir> 'dash0-opentelemetry[pinned]'gives the validated tree, unchanged: asgiref 3.12.1, packaging 26.3, psutil 7.2.2, typing-extensions 4.16.0, wrapt 1.17.3.scripts/refresh_injector_manifest.py,tests/e2e-instrumentations/Dockerfile.injectedandtests/e2e-kubernetes/instrumentation/Dockerfileinstall the extra.all-dependencies.txtdoes not change: a bare requirement adds no constraint, andgenerate_all_dependencies.pyskips extra-gated requirements.uv.lockstill locks the five to the same versions, so the dev environment and the unit tests run against the validated tree.The guarantee now holds only for builds that ask for the extra. The dash0-operator needs a follow-up:
images/instrumentation/Dockerfileinstalls/tmp/dash0-python-distribution/packages/dash0-opentelemetryin both Python stages, and that path should become.../dash0-opentelemetry[pinned]when the operator moves to the release that carries this. Until then its build would pick the newest versions within upstream's ranges. That is still a working tree, but not the validated one. The DEB/RPM builds in dash0-packages should be checked the same way. pip has no default extras, so I found no way to make this automatic for existing consumers.Why the OpenTelemetry pins stay
They are not in this PR on purpose. Upstream already pins them to each other:
opentelemetry-sdk1.45.2 requiresopentelemetry-api==1.45.2andopentelemetry-semantic-conventions==0.66b2, and every contrib instrumentation requiresopentelemetry-instrumentation==0.66b2and the matching semantic conventions. An application with another OpenTelemetry release train conflicts with the instrumentations whatever this file says. A range here would only let the resolver choose a train nobody validated, and the distro's own code (the configurator, the vendoreddash0-opentelemetry-configuration0.66b2.post1, the vendored asyncclick instrumentation) is built against this one. Relaxing them is a separate design decision with its own tradeoffs.The check that catches a regression
scripts/check_pinned_dependencies.py(CIlintjob): any version on a support library independenciesis now a violation, and so is a support library missing from thepinnedextra, a range in that extra, or a lock file closure that differs from the pins in either place. Onlyopentelemetry-*names (plus workspace members and the existingEXEMPT_FROM_EXACT_PINtable) may be pinned independencies.scripts/tests/test_check_pinned_dependencies.pycovers each rule.test_an_exact_pin_on_a_support_library_in_dependencies_is_rejectedis the Five exact pins on ubiquitous libraries make pip install dash0-opentelemetry fail or silently downgrade the application #150 regression and fails against the old script, which accepted that pin.build-job step resolves the built wheel next to each of the issue's four versions withuv pip compile. Run against a wheel built frommainit fails on the first pin ("all versions of dash0-opentelemetry depend on wrapt==1.17.3").The distribution moves to 0.4.2, because 0.4.1 is in
scripts/index-manifest.json. #159 makes the same bump, so whichever merges second rebases.Verification
Every check below ran on this branch with uv 0.12.9 and Python 3.13.
pip checkclean; fastapi +wrapt==2.5.2installsuv pip install --targetofdash0-opentelemetry[pinned]pip install --targetwith theDockerfile.injectedargumentsfile://uv run --no-project --python 3.13 scripts/check_pinned_dependencies.pypython scripts/refresh_injector_manifest.py --checkall-dependencies.txtunchangeduv lock --check,scripts/check_version_bumped.pypytest scripts/testspytest packages/dash0-opentelemetry/tests(3.13)make chlog-validateand the Docker e2e suites were not run locally (no Go or Docker in my environment); CI runs them.