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: rm superfluous header on actor example #444

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

sicoyle
Copy link
Contributor

@sicoyle sicoyle commented Sep 8, 2023

Similar to:
#218

There is a superfluous header call show in the actors example:

al.placement type=log ver=edge
DEBU[0004] Executing reminder for actor testActorType||ActorImplID123456||testReminderName  app_id=actor-serving instance=Samanthas-MacBook-Pro-2.local scope=dapr.runtime.actor type=log ver=edge
== APP == 2023/09/08 14:15:37 failed to unmarshal reminder param, err: illegal base64 data at input byte 4 
== APP == 2023/09/08 14:15:37 http: superfluous response.WriteHeader call from github.com/dapr/go-sdk/service/http.(*Server).registerBaseHandler.func6 (topic.go:199)

With the removal of the line in this PR, the superflous header is removed:

DEBU[0002] Executing reminder for actor testActorType||ActorImplID123456||testReminderName  app_id=actor-serving instance=Samanthas-MacBook-Pro-2.local scope=dapr.runtime.actor type=log ver=edge
== APP == 2023/09/08 14:16:24 failed to unmarshal reminder param, err: illegal base64 data at input byte 4 

Signed-off-by: Samantha Coyle <[email protected]>
@sicoyle sicoyle requested a review from a team as a code owner September 8, 2023 19:22
@codecov
Copy link

codecov bot commented Sep 8, 2023

Codecov Report

Patch coverage: 66.66% and project coverage change: -0.91% ⚠️

Comparison is base (4afb831) 70.00% compared to head (0c6cce8) 69.09%.
Report is 10 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #444      +/-   ##
==========================================
- Coverage   70.00%   69.09%   -0.91%     
==========================================
  Files          33       34       +1     
  Lines        2667     2741      +74     
==========================================
+ Hits         1867     1894      +27     
- Misses        698      737      +39     
- Partials      102      110       +8     
Files Changed Coverage Δ
client/client.go 70.24% <33.33%> (+0.50%) ⬆️
service/http/topic.go 87.79% <83.33%> (-1.58%) ⬇️

... and 3 files with indirect coverage changes

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

@yaron2
Copy link
Member

yaron2 commented Sep 8, 2023

We still need the write header line that was removed, because it accounts for a situation where there's no error. What needs to be done is to add a return statement in all other WriteHeader code blocks before the StatusOk one. There are other places in the code with the same issue, so it'd be great to add those return statements there too.

@yaron2
Copy link
Member

yaron2 commented Sep 15, 2023

ping @sicoyle

Signed-off-by: Samantha Coyle <[email protected]>
@sicoyle
Copy link
Contributor Author

sicoyle commented Sep 15, 2023

pong @yaron2 😄

@daixiang0
Copy link
Member

Could we add a test for it?

@GowthamHN
Copy link
Contributor

Hi @daixiang0 @sicoyle , can this be merged asap please?

Copy link
Member

@mikeee mikeee left a comment

Choose a reason for hiding this comment

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

lgtm

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.

5 participants