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

settings: add network.connection_timeout and network.cloud_api.skip_board_detection_calls #2770

Merged

Conversation

alessio-perugini
Copy link
Contributor

@alessio-perugini alessio-perugini commented Nov 28, 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?

Introduces:

  • the connection_timeout setting, which our HTTP client will use as a timeout duration
  • the cloud_api.skip_board_detection_calls boolean setting that (if true) will skip the API call required to identify the board (if no installed platforms match the board).

What is the current behavior?

The current behavior uses the default timeout which is 0. It means that it will wait indefinitely.

What is the new behavior?

The new behavior will respect user settings for the connection timeout. The default will be the same, but in case the user provides the network.connection_timeout: 5 it means that the HTTP client will exit with an error if the connection is taking longer than 5 seconds.
There is also a new configuration value to disable querying the Cloud API to identify a board.

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

Other information

@alessio-perugini alessio-perugini linked an issue Nov 28, 2024 that may be closed by this pull request
3 tasks
@alessio-perugini alessio-perugini self-assigned this Nov 28, 2024
Copy link

codecov bot commented Nov 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.55%. Comparing base (6dbff9f) to head (ff3735f).
Report is 5 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2770      +/-   ##
==========================================
+ Coverage   67.52%   67.55%   +0.02%     
==========================================
  Files         237      237              
  Lines       22362    22373      +11     
==========================================
+ Hits        15101    15115      +14     
+ Misses       6068     6066       -2     
+ Partials     1193     1192       -1     
Flag Coverage Δ
unit 67.55% <100.00%> (+0.02%) ⬆️

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.

@alessio-perugini alessio-perugini force-pushed the 2769-skip-or-time-out-network-requests-during-board-list branch from 4b44476 to 665d54d Compare November 28, 2024 16:15
@alessio-perugini alessio-perugini force-pushed the 2769-skip-or-time-out-network-requests-during-board-list branch from 665d54d to 2278bbc Compare November 28, 2024 16:15
@alessio-perugini alessio-perugini added type: enhancement Proposed improvement topic: code Related to content of the project itself labels Nov 28, 2024
@alessio-perugini alessio-perugini marked this pull request as ready for review November 28, 2024 16:21
Copy link
Contributor

github-actions bot commented Dec 10, 2024

The latest Buf updates on your PR. Results from workflow Check Protocol Buffers / check (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedDec 11, 2024, 11:14 AM

@cmaglie cmaglie force-pushed the 2769-skip-or-time-out-network-requests-during-board-list branch from 2d4aee1 to 6df6b17 Compare December 10, 2024 17:23
@cmaglie cmaglie force-pushed the 2769-skip-or-time-out-network-requests-during-board-list branch from 6df6b17 to ab8c357 Compare December 10, 2024 17:28
@cmaglie cmaglie force-pushed the 2769-skip-or-time-out-network-requests-during-board-list branch from 6d1db1e to ff3735f Compare December 11, 2024 11:13
@cmaglie cmaglie changed the title settings: add connection_timeout settings: add network.connection_timeout and network.cloud_api.skip_board_detection_calls Dec 18, 2024
@cmaglie cmaglie merged commit 5968346 into master Dec 18, 2024
201 checks passed
@cmaglie cmaglie deleted the 2769-skip-or-time-out-network-requests-during-board-list branch December 18, 2024 14:38
@cmaglie cmaglie added this to the Arduino CLI v1.1.2 milestone Dec 18, 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 type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Skip or time out network requests during board list
3 participants