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

[skip-changelog] Remove empty object from the output of grpc commands #2057

Merged
merged 1 commit into from
Feb 2, 2023

Conversation

MatteoPologruto
Copy link
Contributor

@MatteoPologruto MatteoPologruto commented Jan 31, 2023

Please check if the PR fulfills these requirements

See how to contribute

  • The PR has no duplicates (please search among the Pull Requests
    before creating one)
  • The PR follows
    our contributing guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • UPGRADING.md has been updated with a migration guide (for breaking changes)

What kind of change does this PR introduce?

gRPC code imperfection fix

What is the current behavior?

Some gRPC commands like UpdateLibrariesIndex stream an empty object after a successful execution.

What is the new behavior?

The empty object has been removed.

Does this PR introduce a breaking change, and is titled accordingly?

No

Close #2046

@MatteoPologruto MatteoPologruto added topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project topic: gRPC Related to the gRPC interface labels Jan 31, 2023
@MatteoPologruto MatteoPologruto self-assigned this Jan 31, 2023
@codecov
Copy link

codecov bot commented Jan 31, 2023

Codecov Report

Base: 36.64% // Head: 36.67% // Increases project coverage by +0.03% 🎉

Coverage data is based on head (8406f9a) compared to base (3ac8320).
Patch coverage: 0.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2057      +/-   ##
==========================================
+ Coverage   36.64%   36.67%   +0.03%     
==========================================
  Files         228      228              
  Lines       19405    19384      -21     
==========================================
  Hits         7110     7110              
+ Misses      11463    11442      -21     
  Partials      832      832              
Flag Coverage Δ
unit 36.67% <0.00%> (+0.03%) ⬆️

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

Impacted Files Coverage Δ
commands/daemon/daemon.go 0.00% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@cmaglie cmaglie merged commit 2b8d6d7 into arduino:master Feb 2, 2023
return convertErrorToRPCStatus(err)
}
return stream.Send(&rpc.LibraryInstallResponse{})
return convertErrorToRPCStatus(err)
Copy link
Contributor

Choose a reason for hiding this comment

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

Can a similar approach be applied to other stream.Send()? Like the return at the end of the PlatformInstall command above.
Also I think we should also add some test to avoid regression

@MatteoPologruto MatteoPologruto deleted the empty-object-removal branch August 30, 2023 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself topic: gRPC Related to the gRPC interface type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

grpc empty object when updating the library index
3 participants