Add short timeout to version check HTTP requests
See original GitHub issueRelated command
az vmss reimage --debug --help
Is your feature request related to a problem? Please describe.
In case of low transfer speed to raw.githubusercontent.com
, commands with --help
argument hangs for a long time. This seem largely suspicious and unhelpful when dealing with --help
commands.
Describe the solution you’d like IIUC this HTTP requests are related to checking version of CLI. If that’s the case, I think those requests should have some fixed deadline/timeout which when hit, may produce a warning message. Taking general slowness of Azure CLI, perhaps timeout of 500-1000 ms should not be that bad, comparing to my which was 80 seconds.
Additional context
$ az vmss reimage --debug --help
...
To search AI knowledge base for examples, use: az find "az vmss reimage"
urllib3.connectionpool: Starting new HTTPS connection (1): azure.microsoft.com:443
urllib3.connectionpool: https://azure.microsoft.com:443 "HEAD / HTTP/1.1" 301 0
cli.azure.cli.core.util: Connectivity check: 1.255078981999759 sec
urllib3.connectionpool: Starting new HTTPS connection (1): raw.githubusercontent.com:443
urllib3.connectionpool: https://raw.githubusercontent.com:443 "GET /Azure/azure-cli/main/src/azure-cli-core/setup.py HTTP/1.1" 200 1246
urllib3.connectionpool: Starting new HTTPS connection (1): raw.githubusercontent.com:443
urllib3.connectionpool: https://raw.githubusercontent.com:443 "GET /Azure/azure-cli/main/src/azure-cli-telemetry/setup.py HTTP/1.1" 200 679
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x7f9a4f64aa70>]
az_command_data_logger: exit code: 0
cli.__main__: Command ran in 82.614 seconds (init: 0.256, invoke: 82.358)
0 ✓ (1m23s) 15:37:57 invidian@dellxps15mateusz ~/repos/kinvolk/aksiknife-copy (⎇ master)$ az version
Azure-cli Azure-cli-core Azure-cli-telemetry
----------- ---------------- ---------------------
2.42.0 2.42.0 1.0.8
Issue Analytics
- State:
- Created 10 months ago
- Comments:11 (5 by maintainers)
Top Results From Across the Web
How to set a timeout on a http.request() in Node?
The other way to handle this is to use a bog-standard setTimeout call. You'll need to keep hold of the setTimeout id with:...
Read more >How can I set a short timeout with the ping command?
I checked man ping , there seem to be two options to set the timeout delay: -w deadline and -W timeout . I...
Read more >Setting a Request Timeout for a Spring REST API - Baeldung
One way we can implement a request timeout on database calls is to take advantage of Spring's @Transactional annotation. It has a timeout...
Read more >HttpClient.Timeout Property (System.Net.Http) | Microsoft Learn
Gets or sets the timespan to wait before the request times out. ... Note that only the shorter of the two timeouts will...
Read more >Advanced Usage — Requests 2.28.1 documentation
If you want to manually add cookies to your session, use the Cookie utility ... stream=stream, verify=verify, proxies=proxies, cert=cert, timeout=timeout ...
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
@yonzhan , @zhoxing-ms Passing back to you. VMSS REST API doesn’t have calls/dependencies to github. This ticket is referring to calls to github, looks like to get CLI setup scripts:
Thank you @invidian for reporting the issue, We are currently looking into the issue.