Skip to content

fix(pinecone): accept pinecone 9.x in the dependency check - #4411

Open
Anai-Guo wants to merge 1 commit into
traceloop:mainfrom
Anai-Guo:fix/pinecone-accept-9x
Open

fix(pinecone): accept pinecone 9.x in the dependency check#4411
Anai-Guo wants to merge 1 commit into
traceloop:mainfrom
Anai-Guo:fix/pinecone-accept-9x

Conversation

@Anai-Guo

@Anai-Guo Anai-Guo commented Aug 10, 2026

Copy link
Copy Markdown

Problem

opentelemetry-instrumentation-pinecone gates activation on:

_instruments = ("pinecone >= 5.1.0, <9",)

The current pinecone release on PyPI is 9.1.0. With any pinecone >= 9
installed, BaseInstrumentor.instrument() raises a DependencyConflict, which
is caught and only logged — so the instrumentor is silently disabled and
users get zero Pinecone spans, with no error surfaced to the application.

DependencyConflict: requested: "pinecone >= 5.1.0, <9" but found: "pinecone 9.1.0"

Fix

Extend the accepted range to <10, mirroring the recent cohere/writer
version-cap bumps. One line, no behavioral change to the instrumentation logic.

_instruments = ("pinecone >= 5.1.0, <10",)

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. GRPCIndex remains None at import when the grpc
    extra isn't installed, which the instrumentor already guards with
    getattr(pinecone, wrap_object, None).

  • Response/attribute access still valid: QueryResponse is a DictLikeStruct
    (supports .get() / __getitem__), still exposes the usage field, and
    Index._config.host is still set in __init__. Both _set_input_attributes
    and _set_response_attributes are @dont_throw, so any field-shape drift
    degrades gracefully rather than breaking the caller.

  • Dependency-check dual run:

    "pinecone >= 5.1.0, <9"  -> DependencyConflict (found pinecone 9.1.0)  # instrumentor disabled
    "pinecone >= 5.1.0, <10" -> None                                       # instrumentor active
    

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added support for Pinecone versions 5.1.0 through 9.x.

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The Pinecone instrumentation dependency constraint now supports versions >=5.1.0 and <10, replacing the previous upper bound of <9.

Changes

Pinecone dependency support

Layer / File(s) Summary
Update Pinecone dependency constraint
packages/opentelemetry-instrumentation-pinecone/.../__init__.py
The upper version bound changes from <9 to <10.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely states that Pinecone 9.x is accepted, which matches the main change.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 62e24c2 and deefa39.

📒 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",)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ 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/tests

Repository: 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.

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.

2 participants