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

octtrpc: Fix span status defer, add tests #2330

Merged
merged 1 commit into from
Dec 11, 2024
Merged

Conversation

kevpar
Copy link
Member

@kevpar kevpar commented Dec 2, 2024

It turns out for years that the autogenerated TTRPC spans have not been marked correctly if the call failed. This is because defers evaluate their arguments immediately, rather than at the deferred execution time. Fix this by changing err from an argument to the defer, to a variable evaluated inside the defer.

Also adds tests for octtrpc client and server interceptors.

It turns out for years that the autogenerated TTRPC spans have not been
marked correctly if the call failed. This is because defers evaluate
their arguments immediately, rather than at the deferred execution time.
Fix this by changing err from an argument to the defer, to a variable
evaluated inside the defer.

Also adds tests for octtrpc client and server interceptors.

Signed-off-by: Kevin Parsons <[email protected]>
@kevpar kevpar requested a review from a team as a code owner December 2, 2024 16:24
@msscotb msscotb mentioned this pull request Dec 6, 2024
@kevpar kevpar merged commit 1a8c2e3 into microsoft:main Dec 11, 2024
51 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants