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

Interpret "empty" gRPC Port object as no-port in upload #2202

Merged
merged 1 commit into from
Jun 6, 2023

Conversation

cmaglie
Copy link
Member

@cmaglie cmaglie commented Jun 6, 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)
  • configuration.schema.json updated if new parameters are added.

What kind of change does this PR introduce?

Makes the gRPC Upload command more relaxed in interpreting the "Port" object as a no port upload.

What is the current behavior?

An empty gRPC Port (with Address and Protocol set to the empty string) will make the upload fail. The same upload request will work as expected if the gRPC Port is left nil/undefined.

What is the new behavior?

An empty gRPC Port is treated the same as a nil/undefined Port.

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

No

Other information

@cmaglie cmaglie self-assigned this Jun 6, 2023
@cmaglie cmaglie added type: enhancement Proposed improvement topic: gRPC Related to the gRPC interface labels Jun 6, 2023
@codecov
Copy link

codecov bot commented Jun 6, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.02 🎉

Comparison is base (f3ee0a8) 62.78% compared to head (bfdf4c6) 62.80%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2202      +/-   ##
==========================================
+ Coverage   62.78%   62.80%   +0.02%     
==========================================
  Files         219      219              
  Lines       19469    19469              
==========================================
+ Hits        12224    12228       +4     
+ Misses       6159     6156       -3     
+ Partials     1086     1085       -1     
Flag Coverage Δ
unit 62.80% <100.00%> (+0.02%) ⬆️

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

Impacted Files Coverage Δ
commands/upload/upload.go 74.47% <100.00%> (+0.84%) ⬆️

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

Copy link
Contributor

@per1234 per1234 left a comment

Choose a reason for hiding this comment

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

I verified this fixes arduino/arduino-ide#2089

Thanks for your work on this and the previous #2173 Cristian!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: gRPC Related to the gRPC interface type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants