-
Notifications
You must be signed in to change notification settings - Fork 15
Add retryable client #252
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
base: main
Are you sure you want to change the base?
Add retryable client #252
Conversation
Signed-off-by: Kyle Brown <kyle.steven.brown@gmail.com>
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.
LGTM -- i was a little cautious around the string matching part, but it fails safe so I'm unbothered.
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.
See comments, otherwise LGTM
authzed/api/v1/__init__.py
Outdated
@@ -164,8 +164,14 @@ def __init__( | |||
self.init_stubs(channel) | |||
|
|||
|
|||
# Import after defining Client to avoid circular imports | |||
from authzed.api.v1.retryable_client import RetryableClient, ConflictStrategy |
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.
I'd rather move the client declarations into a client.py
that's then imported into this file
fix error Co-authored-by: Tanner Stirrat <tstirrat@gmail.com>
Signed-off-by: Kyle Brown <kyle.steven.brown@gmail.com>
This commit introduces a retryable client to authzed-py, inspired by the retry logic in authzed-go. It enhances bulk importing by automatically falling back to WriteRelationships if the bulk import operation fails.