This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new d89af71ebd2 Stop passing `project_id` to the Pinecone client
constructor (#66601)
d89af71ebd2 is described below
commit d89af71ebd2b2bf1ff5c107e50ad01a8f8adfc8b
Author: Jarek Potiuk <[email protected]>
AuthorDate: Fri May 8 22:11:12 2026 +0200
Stop passing `project_id` to the Pinecone client constructor (#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.
---
providers/pinecone/provider.yaml | 6 ------
.../src/airflow/providers/pinecone/get_provider_info.py | 1 -
.../src/airflow/providers/pinecone/hooks/pinecone.py | 13 +++++++------
3 files changed, 7 insertions(+), 13 deletions(-)
diff --git a/providers/pinecone/provider.yaml b/providers/pinecone/provider.yaml
index feabafa191f..860446f9754 100644
--- a/providers/pinecone/provider.yaml
+++ b/providers/pinecone/provider.yaml
@@ -94,12 +94,6 @@ connection-types:
- boolean
- 'null'
default: false
- project_id:
- label: Project ID
- schema:
- type:
- - string
- - 'null'
operators:
- integration-name: Pinecone
diff --git
a/providers/pinecone/src/airflow/providers/pinecone/get_provider_info.py
b/providers/pinecone/src/airflow/providers/pinecone/get_provider_info.py
index 9307960cf86..e755b250d01 100644
--- a/providers/pinecone/src/airflow/providers/pinecone/get_provider_info.py
+++ b/providers/pinecone/src/airflow/providers/pinecone/get_provider_info.py
@@ -57,7 +57,6 @@ def get_provider_info():
"label": "PINECONE_DEBUG_CURL",
"schema": {"type": ["boolean", "null"], "default":
False},
},
- "project_id": {"label": "Project ID", "schema": {"type":
["string", "null"]}},
},
}
],
diff --git
a/providers/pinecone/src/airflow/providers/pinecone/hooks/pinecone.py
b/providers/pinecone/src/airflow/providers/pinecone/hooks/pinecone.py
index f339bd651b8..9e2f35babd3 100644
--- a/providers/pinecone/src/airflow/providers/pinecone/hooks/pinecone.py
+++ b/providers/pinecone/src/airflow/providers/pinecone/hooks/pinecone.py
@@ -69,10 +69,6 @@ class PineconeHook(BaseHook):
return {
"region": StringField(lazy_gettext("Pinecone Region"),
widget=BS3TextFieldWidget(), default=None),
"debug_curl": BooleanField(lazy_gettext("PINECONE_DEBUG_CURL"),
default=False),
- "project_id": StringField(
- lazy_gettext("Project ID"),
- widget=BS3TextFieldWidget(),
- ),
}
@classmethod
@@ -124,14 +120,19 @@ class PineconeHook(BaseHook):
"""Pinecone object to interact with Pinecone."""
pinecone_host = self.conn.host
extras = self.conn.extra_dejson
- pinecone_project_id = extras.get("project_id")
enable_curl_debug = extras.get("debug_curl")
if enable_curl_debug:
os.environ["PINECONE_DEBUG_CURL"] = "true"
+ # Note: `project_id` was a constructor kwarg of the legacy Pinecone
+ # client; it has been removed in the v6+ SDK that this provider
+ # depends on (`pinecone>=7.0.0`). Passing it — even as `None` —
+ # raises `TypeError` from the new client's strict kwargs check.
+ # The connection-extras "project_id" field is therefore ignored;
+ # it's still accepted on existing connections so the provider does
+ # not break for users who saved one, but it has no effect.
return Pinecone(
api_key=self.api_key,
host=pinecone_host,
- project_id=pinecone_project_id,
source_tag="apache_airflow",
)