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

Blocking call detected by BlockHound in DaprGrpcClient #787

Closed
yshulzh opened this issue Sep 23, 2022 · 2 comments · Fixed by #832
Closed

Blocking call detected by BlockHound in DaprGrpcClient #787

yshulzh opened this issue Sep 23, 2022 · 2 comments · Fixed by #832
Assignees
Labels
good first issue Good for newcomers kind/bug Something isn't working P1
Milestone

Comments

@yshulzh
Copy link

yshulzh commented Sep 23, 2022

Expected Behavior

Implementation of DaprGrpcClient does not make blocking calls.

Actual Behavior

The DaprGrpcClient class has blocking calls in it. For example:

 @Override
  public Mono<byte[]> getState(String actorType, String actorId, String keyName) {
    return Mono.fromCallable(() -> {
      DaprProtos.GetActorStateRequest req =
          DaprProtos.GetActorStateRequest.newBuilder()
              .setActorType(actorType)
              .setActorId(actorId)
              .setKey(keyName)
              .build();

      ListenableFuture<DaprProtos.GetActorStateResponse> futureResponse = client.getActorState(req);
      return futureResponse.get();
    }).map(r -> r.getData().toByteArray());
  }

Note: there are two DaprGrpcClient classes in the project, blocking calls were fixed in one of them, The one I am talking about is in the io.dapr.actors.runtime package.

Steps to Reproduce the Problem

Release Note

RELEASE NOTE: FIXED implementation of DaprGrpcClient making blocking calls.

@yshulzh yshulzh added the kind/bug Something isn't working label Sep 23, 2022
@artursouza artursouza added the good first issue Good for newcomers label Nov 2, 2022
@artursouza artursouza added this to the v1.8 milestone Nov 7, 2022
@artursouza artursouza added the P1 label Nov 7, 2022
@artursouza artursouza modified the milestones: v1.8, v1.9 Feb 1, 2023
@MatejNedic
Copy link
Contributor

Can I take this one? @artursouza

@yaron2
Copy link
Member

yaron2 commented Feb 2, 2023

Can I take this one? @artursouza

Feel free, thanks 🙏

@MatejNedic MatejNedic mentioned this issue Feb 5, 2023
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers kind/bug Something isn't working P1
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants