fix: declare worker dependencies + migrate ddtrace v2→v4#148
Draft
zzstoatzz wants to merge 1 commit intoroostorg:mainfrom
Draft
fix: declare worker dependencies + migrate ddtrace v2→v4#148zzstoatzz wants to merge 1 commit intoroostorg:mainfrom
zzstoatzz wants to merge 1 commit intoroostorg:mainfrom
Conversation
89810fe to
57a2daa
Compare
osprey_worker/pyproject.toml only declared flask-cors and osprey_rpc, making standalone installation broken — all transitive deps lived only in the root workspace dependency groups. this adds the full dependency list (grouped by subsystem) so `pip install osprey-worker` works outside the monorepo. ddtrace v2→v4 migration across osprey_worker/src/: - ddtrace.span.Span → ddtrace.trace.Span - ddtrace.Span, ddtrace.Tracer → ddtrace.trace.Span, ddtrace.trace.Tracer - ddtrace.filters.TraceFilter → ddtrace.trace.TraceFilter - ddtrace.contrib.grpc.constants.GRPC_STATUS_CODE_KEY → inlined string - ddtrace.Pin → ddtrace._trace.pin.Pin - span.sampled → span.context.sampling_priority check - span.set_tag() value args: int/bool/type → str (v4 tightened types) - dict[str|bytes, str] tag annotations → dict[str, str] root pyproject.toml: bumps ddtrace pin 2.21.11 → 4.5.0 along with its transitive deps (envier 0.5.2 → 0.6.1, bytecode 0.16.2 → 0.17.0) and widens override-dependencies to >=4.0.0. all workspace config, sources, and other pins are unchanged. passes: ruff check, ruff format, mypy (on changed files)
57a2daa to
693d128
Compare
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.
Motivation
We're building a plugin that depends on
osprey-workerand ran into two issues:pip install osprey-workerfails — the package only declaresflask-corsandosprey_rpcas dependencies. Everything else lives in the root workspace[dependency-groups], so standalone installation outside the monorepo is broken. On Python 3.14, the install pulls 10 packages instead of ~50 and immediately fails onfrom osprey.engine.udf.base import UDFBasewithModuleNotFoundError: No module named 'typing_inspect'.ddtrace v2 doesn't build on Python 3.14 —
ddtrace==2.21.11(and the<3.0.0cap inoverride-dependencies) blocks resolution on 3.14 entirely. ddtrace v4 adds 3.14 support but changes several APIs.Changes
Declare worker dependencies: added the full runtime dependency list to
osprey_worker/pyproject.toml(grouped by subsystem) so the package is installable outside the monorepo.Migrate ddtrace v2 → v4: updated all imports in
osprey_worker/src/— module moves (ddtrace.span→ddtrace.trace,Pinrelocation), removed APIs (span.sampled), and tightened types (set_tagvalue narrowed tostr | None).Bump root pins: updated
ddtrace(2.21.11 → 4.5.0),envier(0.5.2 → 0.6.1),bytecode(0.16.2 → 0.17.0), and widenedoverride-dependenciesto>=4.0.0. These are the minimum transitive dep bumps needed to keep the lockfile consistent — all other pins, workspace config, and[tool.uv.sources]are untouched.Verification
uv syncresolves and installs cleanly on Python 3.11 (no regression from existing setup)pip install osprey-workersucceeds on Python 3.14 with all core engine imports workingruff check,ruff format --check, andmypypass on all changed files