Azure-Samples / LUIS-DevOps-Template

Template repo encapsulating best engineering practices and DevOps using GitHub Actions for the development of a LUIS application.
MIT License
21 stars 17 forks source link

Get LUIS authoring endpoint step fails #71

Closed AndyCW closed 4 years ago

AndyCW commented 4 years ago

This step fails silently. Maybe the object returned has changed?

Current step: az cognitiveservices account show --name --resource-group --query "endpoint"

Needs to be:

az cognitiveservices account show --name --resource-group --query "properties.endpoint"

AndyCW commented 4 years ago

Further research shows that this is almost certainly because the pre-installed software on the GitHub Actions Build server is updated frequently, and there was a recent update for the Azure CLI from version 2.7 to 2.8. This is the pre-installed software that was on the build servers when this solution was developed: https://github.com/actions/virtual-environments/blob/ubuntu18/20200604.1/images/linux/Ubuntu1804-README.md

This is the current pre-installed software: https://github.com/actions/virtual-environments/blob/ubuntu18/20200625.0/images/linux/Ubuntu1804-README.md

These pipelines must be updated so that the az cli version used is tied to a specific known version. The ideal solution for this is to replace those steps that use the az cli directly from bash, to instead use the Azure Powershell action https://github.com/Azure/powershell which can be used with a specific version.

When using Azure Powershell, you can get the endpoint, for example, using: Get-AzCognitiveServicesAccount -ResourceGroupName LUISGetWeatherStudy-RG -name LUISDevOpsResource-Authoring-GetWeather | Select-Object Endpoint | Format-List