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

gRPC async invoke #3693

Merged
merged 2 commits into from
Apr 24, 2024
Merged

gRPC async invoke #3693

merged 2 commits into from
Apr 24, 2024

Conversation

olegbespalov
Copy link
Contributor

@olegbespalov olegbespalov commented Apr 19, 2024

What?

This PR refactors the logic of the grpc's unary Invoke so that it can be reused in the AsyncInvoke and also implements AsyncInvoke itself.

It's better to check the changes by the commits.

Why?

At the k6-core, we agreed that the modern way of defining API is the async one.

Checklist

  • I have performed a self-review of my code.
  • I have added tests for my changes.
  • I have run linter locally (make lint) and all checks pass.
  • I have run tests locally (make tests) and all tests pass.
  • I have commented on my code, particularly in hard-to-understand areas.

Related PR(s)/Issue(s)

Closes #3550

@olegbespalov olegbespalov requested a review from a team as a code owner April 19, 2024 09:16
@olegbespalov olegbespalov requested review from mstoykov and oleiade and removed request for a team April 19, 2024 09:16
Moving things around and renaming, as a pre-requisition for the async
Invoke, it also moves a timeout inicialisation logic close to the moment
where it should be used.
@codecov-commenter
Copy link

codecov-commenter commented Apr 19, 2024

Codecov Report

Attention: Patch coverage is 88.37209% with 5 lines in your changes are missing coverage. Please review.

Project coverage is 73.34%. Comparing base (144209f) to head (7f040a8).

❗ Current head 7f040a8 differs from pull request most recent head 95fff69. Consider uploading reports for the commit 95fff69 to get more accurate results

Files Patch % Lines
js/modules/k6/grpc/client.go 85.29% 4 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3693      +/-   ##
==========================================
+ Coverage   73.32%   73.34%   +0.02%     
==========================================
  Files         278      278              
  Lines       20332    20358      +26     
==========================================
+ Hits        14908    14932      +24     
- Misses       4480     4481       +1     
- Partials      944      945       +1     
Flag Coverage Δ
macos 73.25% <88.37%> (+0.01%) ⬆️
ubuntu 73.27% <88.37%> (+0.01%) ⬆️
windows 73.19% <88.37%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mstoykov mstoykov added this to the v0.51.0 milestone Apr 19, 2024
@olegbespalov olegbespalov merged commit 666b236 into master Apr 24, 2024
25 checks passed
@olegbespalov olegbespalov deleted the feat/grpc-async-invoke branch April 24, 2024 10:34
@olegbespalov olegbespalov added enhancement documentation-needed A PR which will need a separate PR for documentation area: grpc labels Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: grpc documentation-needed A PR which will need a separate PR for documentation enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement async Invoke
4 participants