Skip to content

[Bug] dry_run flag is ignored while updating index by id #670

Description

@M1ha-Shvn

Is this a new bug?

  • I believe this is a new bug
  • I have searched the existing issues, and I could not find an existing issue for this bug

Current Behavior

If I call set_metadata index update by id with flag dry_run=True, The index is updated and the response is UpdateResponse(matched_records=None, response_info=None), the result doesn't look obvious.

Expected Behavior

If I call set_metadata index update by id:

  • if flag dry_run=True is set, I expect operation to return number of recrods to be updated in UpdateResponse object, but no operations really executed.
  • if flag dry_run=False or None is set, I expect data to be updated, and update information returned in UpdateResponse object

Steps To Reproduce

pinecone = Pinecone(... some credentials ...)
index = pinecone.index(name="my_index", grpc=True)
response = index.update(id="some_id", set_metadata={"update": True}, dry_run=True)
print(response)

# Prints UpdateResponse(matched_records=None, response_info=None)

Relevant log output

Environment

OS Version: python:3.11.10-slim based docker container
Python SDK version: 9.0.0
Language version: 3.11.10

Additional Context

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstatus:needs-triageNot yet reviewed by a maintainer

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions