fix(pinecone): accept pinecone 9.x in the dependency check - #4411
fix(pinecone): accept pinecone 9.x in the dependency check#4411Anai-Guo wants to merge 1 commit into
Conversation
|
|
📝 WalkthroughWalkthroughThe Pinecone instrumentation dependency constraint now supports versions ChangesPinecone dependency support
Estimated code review effort: 1 (Trivial) | ~2 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@packages/opentelemetry-instrumentation-pinecone/opentelemetry/instrumentation/pinecone/__init__.py`:
- Line 37: Update the Pinecone dependency constraints in pyproject.toml for both
the installation extra and test dependency from <9 to <10, matching the
_instruments range of pinecone>=5.1.0,<10. Preserve the existing lower bound and
dependency declarations.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 97143e5a-645d-47f9-87e3-1e7aa3ea3890
📒 Files selected for processing (1)
packages/opentelemetry-instrumentation-pinecone/opentelemetry/instrumentation/pinecone/__init__.py
| logger = logging.getLogger(__name__) | ||
|
|
||
| _instruments = ("pinecone >= 5.1.0, <9",) | ||
| _instruments = ("pinecone >= 5.1.0, <10",) |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
rg -n -C 4 'pinecone|Pinecone|<9|<10|9\.1\.0' \
packages/opentelemetry-instrumentation-pinecone/pyproject.toml \
packages/opentelemetry-instrumentation-pinecone/opentelemetry/instrumentation/pinecone/__init__.py \
packages/opentelemetry-instrumentation-pinecone/testsRepository: traceloop/openllmetry
Length of output: 50377
Align Pinecone dependency ranges. pyproject.toml still restricts the installation extra and test dependency to <9. Change both constraints to pinecone>=5.1.0,<10.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In
`@packages/opentelemetry-instrumentation-pinecone/opentelemetry/instrumentation/pinecone/__init__.py`
at line 37, Update the Pinecone dependency constraints in pyproject.toml for
both the installation extra and test dependency from <9 to <10, matching the
_instruments range of pinecone>=5.1.0,<10. Preserve the existing lower bound and
dependency declarations.
Problem
opentelemetry-instrumentation-pineconegates activation on:The current
pineconerelease on PyPI is 9.1.0. With anypinecone >= 9installed,
BaseInstrumentor.instrument()raises aDependencyConflict, whichis caught and only logged — so the instrumentor is silently disabled and
users get zero Pinecone spans, with no error surfaced to the application.
Fix
Extend the accepted range to
<10, mirroring the recentcohere/writerversion-cap bumps. One line, no behavioral change to the instrumentation logic.
Verification (pinecone 9.1.0)
I confirmed the instrumentation still works against pinecone 9.x before bumping
the cap:
Wrapped methods still exist and are callable:
pinecone.Index.query,.upsert,.delete.GRPCIndexremainsNoneat import when thegrpcextra isn't installed, which the instrumentor already guards with
getattr(pinecone, wrap_object, None).Response/attribute access still valid:
QueryResponseis aDictLikeStruct(supports
.get()/__getitem__), still exposes theusagefield, andIndex._config.hostis still set in__init__. Both_set_input_attributesand
_set_response_attributesare@dont_throw, so any field-shape driftdegrades gracefully rather than breaking the caller.
Dependency-check dual run:
🤖 Generated with Claude Code
Summary by CodeRabbit