Skip to content

Stop passing project_id to the Pinecone client constructor#66601

Merged
potiuk merged 1 commit intoapache:mainfrom
potiuk:fix-pinecone-project-id-kwarg
May 8, 2026
Merged

Stop passing project_id to the Pinecone client constructor#66601
potiuk merged 1 commit intoapache:mainfrom
potiuk:fix-pinecone-project-id-kwarg

Conversation

@potiuk
Copy link
Copy Markdown
Member

@potiuk potiuk commented May 8, 2026

The provider's compat job
(Compat 3.0.6:P3.10:)
fails on main with:

TypeError: Pinecone() got unexpected keyword arguments: ['project_id']

pinecone>=7.0.0 (the floor declared in
providers/pinecone/pyproject.toml) removed project_id from the
Pinecone() constructor and now does strict kwarg validation, so
even project_id=None raises. The provider's PineconeHook was still
unconditionally passing the kwarg, which broke

  • providers/pinecone/tests/unit/pinecone/hooks/test_pinecone.py::TestPineconeHook::test_upsert
  • providers/pinecone/tests/unit/pinecone/hooks/test_pinecone.py::TestPineconeHook::test_debug_curl_setting

This PR drops the kwarg from the Pinecone(...) call, removes the
unused local extras lookup, and removes the project_id connection
form field + provider.yaml extra so new connections don't expose a
field that has no effect on the SDK any more. Existing connections
keep the saved value untouched (it's now silently ignored).

Test plan

  • uv run --project providers/pinecone pytest providers/pinecone/tests/unit/pinecone/hooks/test_pinecone.py -xvs — 17 / 17 pass.
  • CI Compat 3.0.6:P3.10 job goes green on this PR.

Was generative AI tooling used to co-author this PR?
  • Yes — Claude Code (Opus 4.7)

Generated-by: Claude Code (Opus 4.7) following the guidelines

The Pinecone Python SDK we depend on (`pinecone>=7.0.0`) removed
`project_id` from the `Pinecone()` constructor — passing it, even as
`None`, now raises `TypeError: Pinecone() got unexpected keyword
arguments: ['project_id']` from the SDK's strict-kwargs validation.
That broke `PineconeHook.pinecone_client` and the two unit tests that
exercise it (`test_upsert`, `test_debug_curl_setting`) on the
`Compat 3.0.6:P3.10` provider matrix.

Drop the `project_id` argument from the `Pinecone(...)` call, plus the
local extras lookup that fed it. Also remove the corresponding
`project_id` connection-form widget and `provider.yaml` extra so newly
created Pinecone connections don't show a field that has no effect.

Existing connections that already have `project_id` saved in their
extras JSON keep the value on disk; it is silently ignored, which
matches what the SDK does anyway.
@potiuk potiuk merged commit d89af71 into apache:main May 8, 2026
91 checks passed
@potiuk potiuk deleted the fix-pinecone-project-id-kwarg branch May 8, 2026 20:11
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should this add some note of deprecation into changelog.rst?

arpitrathore pushed a commit to arpitrathore/airflow that referenced this pull request May 9, 2026
…66601)

The Pinecone Python SDK we depend on (`pinecone>=7.0.0`) removed
`project_id` from the `Pinecone()` constructor — passing it, even as
`None`, now raises `TypeError: Pinecone() got unexpected keyword
arguments: ['project_id']` from the SDK's strict-kwargs validation.
That broke `PineconeHook.pinecone_client` and the two unit tests that
exercise it (`test_upsert`, `test_debug_curl_setting`) on the
`Compat 3.0.6:P3.10` provider matrix.

Drop the `project_id` argument from the `Pinecone(...)` call, plus the
local extras lookup that fed it. Also remove the corresponding
`project_id` connection-form widget and `provider.yaml` extra so newly
created Pinecone connections don't show a field that has no effect.

Existing connections that already have `project_id` saved in their
extras JSON keep the value on disk; it is silently ignored, which
matches what the SDK does anyway.
jason810496 pushed a commit to jason810496/airflow that referenced this pull request May 11, 2026
…66601)

The Pinecone Python SDK we depend on (`pinecone>=7.0.0`) removed
`project_id` from the `Pinecone()` constructor — passing it, even as
`None`, now raises `TypeError: Pinecone() got unexpected keyword
arguments: ['project_id']` from the SDK's strict-kwargs validation.
That broke `PineconeHook.pinecone_client` and the two unit tests that
exercise it (`test_upsert`, `test_debug_curl_setting`) on the
`Compat 3.0.6:P3.10` provider matrix.

Drop the `project_id` argument from the `Pinecone(...)` call, plus the
local extras lookup that fed it. Also remove the corresponding
`project_id` connection-form widget and `provider.yaml` extra so newly
created Pinecone connections don't show a field that has no effect.

Existing connections that already have `project_id` saved in their
extras JSON keep the value on disk; it is silently ignored, which
matches what the SDK does anyway.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants