Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] timeout argument gives error for python client.search(.., timeout=400) #817

Closed
silkspace opened this issue Sep 3, 2024 · 8 comments
Labels
bug Something isn't working

Comments

@silkspace
Copy link

silkspace commented Sep 3, 2024

Describe the bug

timeout argument to client.search(.., timeout=400) throws error when specified as either int or float. For timeout=None it defaults to 10 seconds.

Error msg: ConnectionError(Timeout value connect was 400, but it must be an int, float or None.) caused by: ValueError(Timeout value connect was 400, but it must be an int, float or None.)

we initialize the client like so:

client = OpenSearch(
            self.open_search_url,
            auth=(),
            use_ssl=True,
            verify_certs=True,
        )

Related component

Search:Performance

To Reproduce

load client and search an index with timeout argument.

Expected behavior

Expect to be able to set a float, int (or even string) timeout argument

Additional Details

Host/Environment (please complete the following information):

  • Docker
  • opensearch-py=2.2.0
@silkspace silkspace added bug Something isn't working untriaged Need triage labels Sep 3, 2024
@dblock dblock transferred this issue from opensearch-project/OpenSearch Sep 4, 2024
@dblock
Copy link
Member

dblock commented Sep 4, 2024

Moved this to opensearch-py. Looks like a bug, appreciate a fix/test @silkspace if you want to give it a shot?

@dblock
Copy link
Member

dblock commented Sep 4, 2024

Also note #810 that may have fixed/introduced this, cc: @borisevich-a-v.

@dblock dblock removed the untriaged Need triage label Sep 4, 2024
@silkspace
Copy link
Author

I think i will rebuild my docker with the latest version of opensearch-py and see if that fixes it, @dblock

@silkspace
Copy link
Author

Noticing that perhaps @borisevich-a-v's fix hasn't made it into the latest release?

@dblock
Copy link
Member

dblock commented Sep 4, 2024

It hasn't been released yet, help make sure it did fix the problem/add tests for the specific example you're using? I can cut a release soon.

@silkspace
Copy link
Author

I tested docker build using latest OS main:
pip: - git+https://github.com/opensearch-project/opensearch-py.git@main # contains the timeout fix
and the fix apparently doesn't address the problem, which is perhaps related to @query_params argument mentioned here

@dblock
Copy link
Member

dblock commented Sep 5, 2024

Thanks for testing @silkspace, help us fix it?

@silkspace
Copy link
Author

I think #816 is closer to the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

2 participants