fix: lower the accidental opentelemetry-api floor in the otel extra - #147
Conversation
A routine Dependabot bump (#7) moved the otel extra's floor from 1.20.0 to 1.43.0 along with the dev pin, though OTelEventListener only calls get_meter/create_histogram/create_counter, which are stable well below that. The stale floor forces adopters on an older opentelemetry-distro/SDK release to choose between upgrading their whole OTel stack and dropping the extra. Restore the original 1.20.0 floor, verified against tests/test_otel.py, and pin ci.yml's extras-min job to the same version so CI proves it on 3.11. The dev dependency group keeps its current pin. The remaining extras' floors were each set once at introduction and never moved by a routine bump, so none of them are equally accidental. Document the rule going forward in CONTRIBUTING.md: an extra's floor is a compatibility statement, and a routine bump must land on the dev pin only.
|
Warning Review limit reached
Next review available in: 15 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
WalkthroughThe ChangesOpenTelemetry compatibility floor
Estimated code review effort: 1 (Trivial) | ~5 minutes Suggested labels: 🚥 Pre-merge checks | ✅ 8 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (8 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Summary
pyproject.tomldeclaredotel = ["opentelemetry-api>=1.43.0"]. That floorwas never a requirement of the code: it arrived as a side effect of a routine
dependency bump (3d664ad, #7) that moved the dev pin, the extra's lower bound
and the
extras-minCI pin together. Git history shows the extra's floor wasoriginally
>=1.20.0at introduction — the bump silently raised acompatibility statement while only intending to bump what we develop against.
OTelEventListeneronly callsmetrics.get_meter,Meter.create_histogramand
Meter.create_counter, API that has been stable for years. Verifiedlocally:
tests/test_otel.pypasses unchanged againstopentelemetry-api==1.20.0.The cost to adopters was real:
opentelemetry-distro/SDK releases pin thewhole OTel stack to one API version, so the stale floor forced anyone on an
older distro to choose between upgrading their entire OTel stack and dropping
interlock-cb[otel]— for a listener that would have worked fine.Changes
otelextra floor back toopentelemetry-api>=1.20.0and pin.github/workflows/ci.yml'sextras-minjob to the same version, so CIproves it on 3.11.
dependency-groups.devpin at the current version — developmentcontinues against the latest.
CONTRIBUTING.md: an extra's floor is a compatibilitystatement, not a dev pin, and a routine bump must never carry both together.
CHANGELOG.mdentry under[Unreleased]→Changed.Extras floor audit
Checked git history for every other extra (
httpx,httpx2,fastapi,redis,litestar,tenacity,requests,aiohttp): each floor was setonce at introduction (in the PR that added the integration) and has never
been touched by a routine bump commit. None of them are equally accidental.
Checklist
code changed;
tests/test_otel.pyverified against the new flooruv run ruff format --checkanduv run ruff checkpassuv run mypy,uv run pyrightanduv run pyrefly checkpass — n/a,no Python source changed
docs/) for user-facing changes — n/a, nodocs/pagereferences the version number
CHANGELOG.md[Unreleased]updatedRelated issues
Closes #138
Changed
otelextra compatibility floor toopentelemetry-api>=1.20.0.opentelemetry-api==1.20.0inextras-minwhile retaining the current development pin.CONTRIBUTING.md.