Asyncio timeout backoff implemented results in failed downloads
See original GitHub issueSystem Health details
System Health
version | core-2022.3.0 |
---|---|
installation_type | Home Assistant OS |
dev | false |
hassio | true |
docker | true |
user | root |
virtualenv | false |
python_version | 3.9.9 |
os_name | Linux |
os_version | 5.10.98 |
arch | x86_64 |
timezone | America/Toronto |
Home Assistant Community Store
GitHub API | ok |
---|---|
GitHub Content | ok |
GitHub Web | ok |
GitHub API Calls Remaining | 4903 |
Installed Version | 1.23.0 |
Stage | running |
Available Repositories | 1071 |
Downloaded Repositories | 3 |
Home Assistant Cloud
logged_in | false |
---|---|
can_reach_cert_server | ok |
can_reach_cloud_auth | ok |
can_reach_cloud | ok |
Home Assistant Supervisor
host_os | Home Assistant OS 7.4 |
---|---|
update_channel | stable |
supervisor_version | supervisor-2022.01.1 |
docker_version | 20.10.9 |
disk_total | 29.1 GB |
disk_used | 4.8 GB |
healthy | true |
supported | true |
board | generic-x86-64 |
supervisor_api | ok |
version_api | ok |
installed_addons | Tailscale (0.5.4), Terminal & SSH (9.3.0), Studio Code Server (4.1.0), ESPHome (2022.2.6), Grocy (0.16.0) |
Lovelace
dashboards | 1 |
---|---|
resources | 0 |
mode | auto-gen |
Checklist
- I’m running the newest version of HACS https://github.com/hacs/integration/releases/latest
- I have enabled debug logging for my installation.
- I have filled out the issue template to the best of my ability.
- I have read https://hacs.xyz/docs/issues
- This issue is related to the backend (integration part) of HACS.
- This issue only contains 1 issue (if you have multiple issues, open one issue for each issue).
- This issue is not a duplicate issue of currently open or issues pending release.
Describe the issue
For components containing multiple files, quick successive requests to raw.githubusercontent.com ends up with timeouts. This leads to the bypassing of the retry logic.
This bug was introduced in #2513/#2515.
Reproduction steps
- On a fresh install, install
adaptive_lighting
- Observe that 10 files download successfully, while 4 files timeout with no retries.
Debug logs
2022-03-03 21:57:38 DEBUG (MainThread) [custom_components.hacs] HacsTask<prosess_queue> Executing task
2022-03-03 21:57:38 DEBUG (MainThread) [custom_components.hacs] HacsTask<prosess_queue> Nothing in the queue
2022-03-03 21:57:38 DEBUG (MainThread) [custom_components.hacs] HacsTask<prosess_queue> took 0.000 seconds to complete
2022-03-03 21:57:39 DEBUG (MainThread) [custom_components.hacs] Running update for basnijholt/adaptive-lighting
2022-03-03 21:57:39 DEBUG (MainThread) [custom_components.hacs] <Integration basnijholt/adaptive-lighting> Getting repository information
2022-03-03 21:57:40 DEBUG (MainThread) [custom_components.hacs] <Integration basnijholt/adaptive-lighting> Running checks against 1.0.15
2022-03-03 21:57:40 DEBUG (MainThread) [custom_components.hacs] 'trigger' is undefined
2022-03-03 21:57:40 DEBUG (MainThread) [custom_components.hacs] Saving data
2022-03-03 21:57:40 DEBUG (MainThread) [custom_components.hacs] Did not store data for 'hacs.hacs'. Content did not change
2022-03-03 21:57:44 DEBUG (MainThread) [custom_components.hacs] Running install for basnijholt/adaptive-lighting
2022-03-03 21:57:44 DEBUG (MainThread) [custom_components.hacs] <Integration basnijholt/adaptive-lighting> Getting repository information
2022-03-03 21:57:45 DEBUG (MainThread) [custom_components.hacs] <Integration basnijholt/adaptive-lighting> Running checks against 1.0.15
2022-03-03 21:57:45 DEBUG (MainThread) [custom_components.hacs] 'trigger' is undefined
2022-03-03 21:57:45 INFO (MainThread) [custom_components.hacs] Running pre installation steps
2022-03-03 21:57:45 INFO (MainThread) [custom_components.hacs] Pre installation steps completed
2022-03-03 21:57:45 INFO (MainThread) [custom_components.hacs] Running installation steps
2022-03-03 21:57:45 DEBUG (MainThread) [custom_components.hacs] <Integration basnijholt/adaptive-lighting> Getting repository information
2022-03-03 21:57:45 DEBUG (MainThread) [custom_components.hacs] <Integration basnijholt/adaptive-lighting> Running checks against 1.0.15
2022-03-03 21:57:46 DEBUG (MainThread) [custom_components.hacs] 'trigger' is undefined
2022-03-03 21:57:46 DEBUG (MainThread) [custom_components.hacs] <Integration basnijholt/adaptive-lighting> Local path is set to /config/custom_components/adaptive_lighting
2022-03-03 21:57:46 DEBUG (MainThread) [custom_components.hacs] <Integration basnijholt/adaptive-lighting> Remote path is set to custom_components/adaptive_lighting
2022-03-03 21:57:46 DEBUG (MainThread) [custom_components.hacs] Checking out tasks to execute
2022-03-03 21:57:46 DEBUG (MainThread) [custom_components.hacs] Starting queue execution for 14 tasks
2022-03-03 21:57:46 DEBUG (MainThread) [custom_components.hacs] Downloading __init__.py
2022-03-03 21:57:46 DEBUG (MainThread) [custom_components.hacs] Downloading https://raw.githubusercontent.com/basnijholt/adaptive-lighting/1.0.15/custom_components/adaptive_lighting/__init__.py
2022-03-03 21:57:46 DEBUG (MainThread) [custom_components.hacs] Downloading config_flow.py
2022-03-03 21:57:46 DEBUG (MainThread) [custom_components.hacs] Downloading https://raw.githubusercontent.com/basnijholt/adaptive-lighting/1.0.15/custom_components/adaptive_lighting/config_flow.py
2022-03-03 21:57:46 DEBUG (MainThread) [custom_components.hacs] Downloading const.py
2022-03-03 21:57:46 DEBUG (MainThread) [custom_components.hacs] Downloading https://raw.githubusercontent.com/basnijholt/adaptive-lighting/1.0.15/custom_components/adaptive_lighting/const.py
2022-03-03 21:57:46 DEBUG (MainThread) [custom_components.hacs] Downloading manifest.json
2022-03-03 21:57:46 DEBUG (MainThread) [custom_components.hacs] Downloading https://raw.githubusercontent.com/basnijholt/adaptive-lighting/1.0.15/custom_components/adaptive_lighting/manifest.json
2022-03-03 21:57:46 DEBUG (MainThread) [custom_components.hacs] Downloading services.yaml
2022-03-03 21:57:46 DEBUG (MainThread) [custom_components.hacs] Downloading https://raw.githubusercontent.com/basnijholt/adaptive-lighting/1.0.15/custom_components/adaptive_lighting/services.yaml
2022-03-03 21:57:46 DEBUG (MainThread) [custom_components.hacs] Downloading strings.json
2022-03-03 21:57:46 DEBUG (MainThread) [custom_components.hacs] Downloading https://raw.githubusercontent.com/basnijholt/adaptive-lighting/1.0.15/custom_components/adaptive_lighting/strings.json
2022-03-03 21:57:46 DEBUG (MainThread) [custom_components.hacs] Downloading switch.py
2022-03-03 21:57:46 DEBUG (MainThread) [custom_components.hacs] Downloading https://raw.githubusercontent.com/basnijholt/adaptive-lighting/1.0.15/custom_components/adaptive_lighting/switch.py
2022-03-03 21:57:46 DEBUG (MainThread) [custom_components.hacs] Downloading da.json
2022-03-03 21:57:46 DEBUG (MainThread) [custom_components.hacs] Downloading https://raw.githubusercontent.com/basnijholt/adaptive-lighting/1.0.15/custom_components/adaptive_lighting/translations/da.json
2022-03-03 21:57:46 DEBUG (MainThread) [custom_components.hacs] Downloading de.json
2022-03-03 21:57:46 DEBUG (MainThread) [custom_components.hacs] Downloading https://raw.githubusercontent.com/basnijholt/adaptive-lighting/1.0.15/custom_components/adaptive_lighting/translations/de.json
2022-03-03 21:57:46 DEBUG (MainThread) [custom_components.hacs] Downloading en.json
2022-03-03 21:57:46 DEBUG (MainThread) [custom_components.hacs] Downloading https://raw.githubusercontent.com/basnijholt/adaptive-lighting/1.0.15/custom_components/adaptive_lighting/translations/en.json
2022-03-03 21:57:46 INFO (MainThread) [custom_components.hacs] Download of config_flow.py completed
2022-03-03 21:57:46 DEBUG (MainThread) [custom_components.hacs] Downloading et.json
2022-03-03 21:57:46 DEBUG (MainThread) [custom_components.hacs] Downloading https://raw.githubusercontent.com/basnijholt/adaptive-lighting/1.0.15/custom_components/adaptive_lighting/translations/et.json
2022-03-03 21:57:46 INFO (MainThread) [custom_components.hacs] Download of const.py completed
2022-03-03 21:57:46 DEBUG (MainThread) [custom_components.hacs] Downloading nb.json
2022-03-03 21:57:46 DEBUG (MainThread) [custom_components.hacs] Downloading https://raw.githubusercontent.com/basnijholt/adaptive-lighting/1.0.15/custom_components/adaptive_lighting/translations/nb.json
2022-03-03 21:57:46 INFO (MainThread) [custom_components.hacs] Download of en.json completed
2022-03-03 21:57:46 DEBUG (MainThread) [custom_components.hacs] Downloading sv.json
2022-03-03 21:57:46 DEBUG (MainThread) [custom_components.hacs] Downloading https://raw.githubusercontent.com/basnijholt/adaptive-lighting/1.0.15/custom_components/adaptive_lighting/translations/sv.json
2022-03-03 21:57:46 INFO (MainThread) [custom_components.hacs] Download of de.json completed
2022-03-03 21:57:46 DEBUG (MainThread) [custom_components.hacs] Downloading uk.json
2022-03-03 21:57:46 DEBUG (MainThread) [custom_components.hacs] Downloading https://raw.githubusercontent.com/basnijholt/adaptive-lighting/1.0.15/custom_components/adaptive_lighting/translations/uk.json
2022-03-03 21:57:46 INFO (MainThread) [custom_components.hacs] Download of __init__.py completed
2022-03-03 21:57:46 INFO (MainThread) [custom_components.hacs] Download of manifest.json completed
2022-03-03 21:57:46 INFO (MainThread) [custom_components.hacs] Download of et.json completed
2022-03-03 21:57:46 INFO (MainThread) [custom_components.hacs] Download of sv.json completed
2022-03-03 21:57:46 INFO (MainThread) [custom_components.hacs] Download of uk.json completed
2022-03-03 21:57:46 INFO (MainThread) [custom_components.hacs] Download of nb.json completed
2022-03-03 21:58:46 ERROR (MainThread) [custom_components.hacs] A timeout of 60! seconds was encountered while downloading https://raw.githubusercontent.com/basnijholt/adaptive-lighting/1.0.15/custom_components/adaptive_lighting/translations/da.json, check the network on the host running Home Assistant
2022-03-03 21:58:46 ERROR (MainThread) [custom_components.hacs] A timeout of 60! seconds was encountered while downloading https://raw.githubusercontent.com/basnijholt/adaptive-lighting/1.0.15/custom_components/adaptive_lighting/switch.py, check the network on the host running Home Assistant
2022-03-03 21:58:46 ERROR (MainThread) [custom_components.hacs] A timeout of 60! seconds was encountered while downloading https://raw.githubusercontent.com/basnijholt/adaptive-lighting/1.0.15/custom_components/adaptive_lighting/services.yaml, check the network on the host running Home Assistant
2022-03-03 21:58:46 ERROR (MainThread) [custom_components.hacs] A timeout of 60! seconds was encountered while downloading https://raw.githubusercontent.com/basnijholt/adaptive-lighting/1.0.15/custom_components/adaptive_lighting/strings.json, check the network on the host running Home Assistant
Diagnostics dump
No response
Issue Analytics
- State:
- Created 2 years ago
- Reactions:4
- Comments:14 (4 by maintainers)
Top Results From Across the Web
How to implement retry mechanism into python requests ...
This snippet of code will make all HTTP requests from the same session retry for a total of 5 times, sleeping between retries...
Read more >backoff
Backoff supports asynchronous execution in Python 3.5 and above. To use backoff in asynchronous code based on asyncio you simply need to apply...
Read more >Async I/O | Apache Flink
Async I/O API # · Timeout: The timeout defines how long an asynchronous operation take before it is finally considered failed, may include...
Read more >Handling errors in Durable Functions - Azure
Durable Function orchestrations are implemented in code and can use the programming language's built-in error-handling features.
Read more >Lock Retry with Back-Off in Python
You can retry a lock in loop and back-off the retries as a linear or exponential function of the number of failed retry...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Terrible workaround, one or some combination of these did it…
Disable IPv6