Azure / Azure/azure-powershell

Location completer sometimes not working

Open
#13,330 0 comments 0 reactions 0 assignees View on GitHub
Azure PS Team feature-request
Dominant language
C#
Stars
4.8k
Forks
4.3k
Avg merge
2d 17h
Merged PRs (30d)
51

Description

## Description

Location completer returns no suggestions.

![image](https://user-images.githubusercontent.com/11371776/97250355-bf37a280-1840-11eb-85ad-825555fdc9a9.png)

## Root cause

When user hits tab, `LocationCompleter` start sending a request to list all resource providers, and it usually takes ~3.5 seconds (on my machine) to finish

![image](https://user-images.githubusercontent.com/11371776/97250520-19386800-1841-11eb-9b4f-10916cfd6dd8.png)

But our code has set it to timeout in 3 seconds.

https://github.com/Azure/azure-powershell-common/blob/master/src/ResourceManager/Version2016_09_01/ArgumentCompleters/LocationCompleter.cs#L37

So `LocationCompleter` doesn't get the data and it cannot do any completions.

## Possible solutions

* Figure out why it's taking so long to list providers
* Increase timeout limit
* easiest solution but it could make tab-completion slower
* Continue the request in the background even after it timeouts (so user can get completion next time)
* (By Dwayne Need) if the auto-complete fails, don’t let the default auto-complete kick in and fill in some nonsense file in my local directory.

## Cost
?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.