-
Notifications
You must be signed in to change notification settings - Fork 32
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
[Feat] Allow custom timeout using env vars #94
[Feat] Allow custom timeout using env vars #94
Conversation
@volodymyrZotov quick one, do you mind taking a look. This is really important for us as we're seeing lots of timeouts here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good. 👍 Thank you for the contribution! That's good improvement for the package.
Your PR made me think about brother implementation. I filled the issue for that #99 .
I left several small comments to this one PR. Please check them out. And it would be good to be merged.
Hey @volodymyrZotov thanks for the review. I've done the requested changes. Do you mind doing another review? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just reading through the code, not trying it out, I like how the changes look. This will be a useful addition. Thanks for contributing it!
I'll defer to @volodymyrZotov here, but consider me a second thumbs up ✅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works as expected. The code looks good to me! Approved!
nice thanks! any eta on the next release please? |
@HaddadJoe will be available later today or tomorrow |
@volodymyrZotov I think this PR is causing issues. If it's not set the int here sets timeout to 0. The if statement fails because File "/pypoetry/virtualenvs/Av-py3.11/lib/python3.11/site-packages/anyio/_core/_tasks.py", line 111, in fail_after
as a fix for now, using the timeout works fine but the default scenario, which will be most 1pass users as of now it will fail |
@HaddadJoe Thank you for letting know! It needs a fix. |
Hi team, since this PR was merged, our deployment of the 1Password Connect Server is failing although we have updated our deployment with the new environment variable where the SDK is running: The error message is TypeError: 'UseClientDefault' object cannot be interpreted as an integer Can you advise on how we can fix this issue please? |
@tblnd until a fix is released what worked for us is setting OP_CONNECT_CLIENT_REQ_TIMEOUT to something reasonable like 5 or 10 (it's in seconds) |
I've created a PR that should fix the issue |
Fixed in v1.5.1 |
For some use cases, for instance, when there's a VPN between the computer running the client and the 1password servers the default timeout may not be enough. In those cases the user receives a
httpx.ConnectTimeout
exception.This PR will allow the user to define a custom timeout by using an environment variable.