microsoft / vscode-azuretools

Common packages for building Azure extensions for VS Code
MIT License
106 stars 66 forks source link

appservice: Make createParsedSite async to retrieve defaultHostName if it doesn't exist #1730

Closed nturinski closed 3 months ago

nturinski commented 3 months ago

Fixes https://github.com/microsoft/vscode-azurefunctions/issues/4121

Hopefully.

The LIST call sometimes won't retrieve defaultHostName. This seems to be happening somewhat randomly to people, but in our testing, the GET site call will always retrieve all the properties for that site, so we can use that to populate the property.

If it doesn't work, it'll throw an error which is somewhat intentional because this property is pretty much a requirement.

This isn't technically a breaking change because new ParsedSite will still work, it just won't throw an error if defaultHostName is undefined. That'll come whenever they use a command that requires it 😅

nturinski commented 3 months ago

Closing in favor of: https://github.com/microsoft/vscode-azurefunctions/pull/4135