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 Debug* gRPC function calls implementation #2672

Merged
merged 6 commits into from
Aug 8, 2024

Conversation

cmaglie
Copy link
Member

@cmaglie cmaglie commented Jul 22, 2024

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)
  • configuration.schema.json updated if new parameters are added.

What kind of change does this PR introduce?

Makes the gRPC implementation of Debug in par with the rest of the gRPC API.

What is the current behavior?

No change

What is the new behavior?

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

While technically this is a breaking change, it's fixing an API implementation, so I'm going to pass it as a bugfix.

Other information

@cmaglie cmaglie self-assigned this Jul 22, 2024
@cmaglie cmaglie added type: imperfection Perceived defect in any part of project topic: gRPC Related to the gRPC interface labels Jul 22, 2024
Copy link

codecov bot commented Jul 22, 2024

Codecov Report

Attention: Patch coverage is 25.34562% with 162 lines in your changes missing coverage. Please review.

Project coverage is 70.05%. Comparing base (a353f86) to head (13f87dd).

Files Patch % Lines
commands/service_debug.go 24.76% 156 Missing and 2 partials ⚠️
internal/cli/debug/debug.go 0.00% 3 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2672      +/-   ##
==========================================
- Coverage   70.25%   70.05%   -0.20%     
==========================================
  Files         222      221       -1     
  Lines       21362    21422      +60     
==========================================
  Hits        15007    15007              
- Misses       5176     5236      +60     
  Partials     1179     1179              
Flag Coverage Δ
unit 70.05% <25.34%> (-0.20%) ⬇️

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.

@cmaglie cmaglie changed the title Fix Debug* gRPC function calls implementation Fix Debug* gRPC function calls implementation Jul 22, 2024
@per1234 per1234 added the topic: code Related to content of the project itself label Aug 3, 2024
This a challenging problem because we must wait on both an io.Read(...)
and a channel-read but, unfortunately, go native select can wait only on
channels.
To overcome this limitation I had to resort to a conditional variable and
write some boilerplate code to make everything synchronized.
@cmaglie cmaglie marked this pull request as ready for review August 7, 2024 22:58
@cmaglie cmaglie merged commit 5f01000 into arduino:master Aug 8, 2024
98 checks passed
@cmaglie cmaglie deleted the fix_grpc_functioncalls branch August 8, 2024 08:15
@cmaglie cmaglie added this to the Arduino CLI v1.0.4 milestone Aug 8, 2024
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.

3 participants