Skip to content

fix: pin opentelemetry-api to 1.29.0 and surface patchflow import errors - #1661

Open
Manav2209 wants to merge 1 commit into
patched-codes:mainfrom
Manav2209:fix/1659-opentelemetry-pin-and-import-error
Open

Manav2209 wants to merge 1 commit into
patched-codes:mainfrom
Manav2209:fix/1659-opentelemetry-pin-and-import-error

Conversation

@Manav2209

Copy link
Copy Markdown

Fixes #1659

Fresh installs of patchwork are broken: pydantic-ai 0.0.37 imports opentelemetry._events, which was removed in opentelemetry-api>=1.30.0. The failure was also masked as Patchflow X not found in deque(['patchwork.patchflows']).

Changes:

  • Pin opentelemetry-api to 1.29.0 (last version shipping opentelemetry._events) and regenerate poetry.lock.
  • find_patchflow in patchwork/app.py now re-raises real import failures (dependencies missing/broken) instead of swallowing them, while still falling through gracefully for genuinely absent patchflows.
  • CLI reports Error loading patchflow X: <error> and exits 1 when a flow cannot be imported (mirrors existing error handling).

Tests in tests/common/test_app.py cover: missing flow returns None, broken dependency in a flow file, broken transitive dependency, and CLI surfacing of the error. Verified that with opentelemetry-api==1.44.0 the CLI now prints the real ModuleNotFoundError instead of the misleading "not found" message.

pydantic-ai 0.0.37 imports opentelemetry._events, which was removed
in opentelemetry-api>=1.30.0, breaking fresh installs. Pin
opentelemetry-api to 1.29.0 and stop masking real module import
failures as 'Patchflow X not found'.
@CLAassistant

CLAassistant commented Sep 18, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

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.

Fresh install broken: pydantic-ai 0.0.37 imports removed opentelemetry._events (all patchflows fail as 'not found')

2 participants