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
Load documentationUri
from Bicep registry module index data
#12207
Conversation
Test this change out locally with the following install scripts (Action run 6671150695) VSCode
Azure CLI
|
|
||
private const string LiveDataEndpoint = "https://aka.ms/BicepModulesMetadata"; | ||
private readonly TimeSpan CacheValidFor = TimeSpan.FromHours(1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't want you to bother changing this back, but why add all the whitespace? This style doesn't improve readability, while grouping by similarity IMHO does.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a convention that I'm used to (not sure where I learned it from, maybe ReSharper or StyleCop), and I find it slightly more readable with line breaks between fields. I'm have no objections to removing the line breaks, but personally I'm not a fan of grouping fields by similarity, and I'd follow https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1201.md for sorting class members.
The AVM module paths use a different convention than other public registry modules, so we cannot rely on a fixed module path format to generate
documentUri
for modules when creating completions for public registry module paths and versions. Now thatdocumentUri
is added to the public registry module index data, we should use it directly.The PR also fixes a bad
HttpClient
usage pattern (using var httpClient = new HttpClient()
) that can lead to exhaustion of available TCP ports by leveraging Typed Clients with IHttpClientFactory .Closes #12122.
Microsoft Reviewers: Open in CodeFlow