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

Fix: wrap method in async client #1834

Merged
merged 3 commits into from
Nov 8, 2023
Merged

Conversation

ohmayr
Copy link
Contributor

@ohmayr ohmayr commented Oct 30, 2023

@ohmayr ohmayr requested a review from a team as a code owner October 30, 2023 15:51
@product-auto-label product-auto-label bot added the size: l Pull request size is large. label Oct 30, 2023
@ohmayr ohmayr changed the title Fix wrap method in async client Fix: wrap method in async client Oct 30, 2023
@@ -45,10 +45,10 @@ def test_retry_bubble(echo):

@pytest.mark.asyncio
async def test_retry_bubble_async(async_echo):
with pytest.raises(exceptions.DeadlineExceeded):
with pytest.raises(exceptions.RetryError):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this mean that the exception the user sees in case of an error changes? If so, we should flag this as a breaking change, since users may be catching the previously raised exception.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's more like this test case was defined incorrectly. Both exceptions.DeadlineExceeded and exceptoins.RetryError are raised but we're checking for latter because that confirms that async retry is working as expected.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that exceptions.RetryError was not raised before.

@ohmayr ohmayr force-pushed the fix-wrap-method-in-async-client branch from 0ff0980 to 9b3903f Compare November 8, 2023 17:55
@product-auto-label product-auto-label bot added size: m Pull request size is medium. and removed size: l Pull request size is large. labels Nov 8, 2023
@ohmayr ohmayr force-pushed the fix-wrap-method-in-async-client branch 2 times, most recently from df677d5 to dee09be Compare November 8, 2023 22:09
@ohmayr ohmayr force-pushed the fix-wrap-method-in-async-client branch from dee09be to 2170b78 Compare November 8, 2023 22:14
@ohmayr ohmayr merged commit 8e1b5e0 into main Nov 8, 2023
53 checks passed
@ohmayr ohmayr deleted the fix-wrap-method-in-async-client branch November 8, 2023 22:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Async clients do not wrap RPC errors for all functions
3 participants