From 93599456e30f9ae57f1327cbd1bff14b51d4e251 Mon Sep 17 00:00:00 2001 From: Hirad Pourtahmasbi Date: Thu, 31 Mar 2022 13:21:37 -0400 Subject: [PATCH 1/3] Add state to index description response --- pinecone/manage.py | 3 ++- specs/index_service.json | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pinecone/manage.py b/pinecone/manage.py index 26901bce..383a322c 100644 --- a/pinecone/manage.py +++ b/pinecone/manage.py @@ -177,10 +177,11 @@ def describe_index(name: str): response = api_instance.describe_index(name) db = response['database'] ready = response['status']['ready'] + state = response['status']['state'] return IndexDescription(name=db['name'], index_type=db['index_type'], metric=db['metric'], replicas=db['replicas'], dimension=db['dimension'], shards=db['shards'], pods=db.get('pods', db['shards']*db['replicas']), pod_type=db.get('pod_type', 'p1'), - index_config=db['index_config'], status={'ready': ready}) + index_config=db['index_config'], status={'ready': ready, 'state': state}) def scale_index(name: str, replicas: int): diff --git a/specs/index_service.json b/specs/index_service.json index 6cedff51..8423ea35 100644 --- a/specs/index_service.json +++ b/specs/index_service.json @@ -322,6 +322,9 @@ "properties": { "ready": { "type": "boolean" + }, + "state": { + "type": "string" } } } From 0d00d48073487c2f876a80f7c9132759cfc81cfe Mon Sep 17 00:00:00 2001 From: Hirad Pourtahmasbi Date: Thu, 31 Mar 2022 13:32:48 -0400 Subject: [PATCH 2/3] Bump version to 2.0.9 --- pinecone/__version__ | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pinecone/__version__ b/pinecone/__version__ index 815e68dd..09843e3b 100644 --- a/pinecone/__version__ +++ b/pinecone/__version__ @@ -1 +1 @@ -2.0.8 +2.0.9 From 7b27a2a56b3dd9a0d103eba6e3a5e4d617d67a82 Mon Sep 17 00:00:00 2001 From: Hirad Pourtahmasbi Date: Thu, 31 Mar 2022 14:11:44 -0400 Subject: [PATCH 3/3] Update proto specs and docs --- pinecone/core/client/model/index_meta_database_status.py | 4 ++++ specs/pinecone_api.json | 3 +++ 2 files changed, 7 insertions(+) diff --git a/pinecone/core/client/model/index_meta_database_status.py b/pinecone/core/client/model/index_meta_database_status.py index 129ceb83..8c090cc6 100644 --- a/pinecone/core/client/model/index_meta_database_status.py +++ b/pinecone/core/client/model/index_meta_database_status.py @@ -87,6 +87,7 @@ def openapi_types(): """ return { 'ready': (bool,), # noqa: E501 + 'state': (str,), # noqa: E501 } @cached_property @@ -96,6 +97,7 @@ def discriminator(): attribute_map = { 'ready': 'ready', # noqa: E501 + 'state': 'state', # noqa: E501 } read_only_vars = { @@ -140,6 +142,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 through its discriminator because we passed in _visited_composed_classes = (Animal,) ready (bool): [optional] # noqa: E501 + state (str): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -222,6 +225,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 through its discriminator because we passed in _visited_composed_classes = (Animal,) ready (bool): [optional] # noqa: E501 + state (str): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/specs/pinecone_api.json b/specs/pinecone_api.json index c4635eec..a0e5e131 100644 --- a/specs/pinecone_api.json +++ b/specs/pinecone_api.json @@ -990,6 +990,9 @@ "properties": { "ready": { "type": "boolean" + }, + "state": { + "type": "string" } } }