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 connection_timeout #2770

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

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?

Introduce connection_timeout settings, which will be used by our HTTP client.

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.

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

Other information

  • I'm proposing the connection_timemout as the settings name, but feel free to propose a different name.
  • Do we want to expose a flag that skips the HTTP call when doing arduino-cli board list?
  • Do we want to change the default timeout and set it to a more sane default? Like 30 seconds?

@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 2 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
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
2 participants