Skip to content

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

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

Merged

Conversation

alessio-perugini
Copy link
Contributor

@alessio-peruginialessio-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-peruginialessio-perugini linked an issue Nov 28, 2024 that may be closed by this pull request
3 tasks
@alessio-peruginialessio-perugini self-assigned this Nov 28, 2024
@codecovCodecov
Copy link

codecovbot 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 
FlagCoverage Δ
unit67.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-peruginialessio-peruginiforce-pushed the 2769-skip-or-time-out-network-requests-during-board-list branch from 4b44476 to 665d54dCompareNovember 28, 2024 16:15
@alessio-peruginialessio-peruginiforce-pushed the 2769-skip-or-time-out-network-requests-during-board-list branch from 665d54d to 2278bbcCompareNovember 28, 2024 16:15
@alessio-peruginialessio-perugini added type: enhancement Proposed improvement topic: code Related to content of the project itself labels Nov 28, 2024
@alessio-peruginialessio-perugini marked this pull request as ready for review November 28, 2024 16:21
@github-actionsGitHub Actions
Copy link
Contributor

github-actionsbot 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
@cmagliecmaglieforce-pushed the 2769-skip-or-time-out-network-requests-during-board-list branch from 2d4aee1 to 6df6b17CompareDecember 10, 2024 17:23
@cmagliecmaglieforce-pushed the 2769-skip-or-time-out-network-requests-during-board-list branch from 6df6b17 to ab8c357CompareDecember 10, 2024 17:28
@cmagliecmaglieforce-pushed the 2769-skip-or-time-out-network-requests-during-board-list branch from 6d1db1e to ff3735fCompareDecember 11, 2024 11:13
@cmagliecmaglie changed the title settings: add connection_timeoutsettings: add network.connection_timeout and network.cloud_api.skip_board_detection_callsDec 18, 2024
@cmagliecmaglie merged commit 5968346 into masterDec 18, 2024
201 checks passed
@cmagliecmaglie deleted the 2769-skip-or-time-out-network-requests-during-board-list branch December 18, 2024 14:38
@cmagliecmaglie added this to the Arduino CLI v1.1.2 milestone Dec 18, 2024
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: codeRelated to content of the project itselftype: enhancementProposed improvement
3 participants
@alessio-perugini@MatteoPologruto@cmaglie
close