Open anvillan opened 5 months ago
@ellismg @weikanglim can you triage this?
I'll take a look - I suspect this is in an issue with when we initialize the bicep provider - but it does seem bad that we are sending an incorrect shape in our API request.
Thanks for the detailed repo steps here, @anvillan!
After running
azd init
on a brand new Aspire Application, executingRefreshEnvironmentAsync()
on it will causeazd vs-sever
to send a Prompt request -asking for missing 'Subscription' and 'Location'- though its content is not correct, as it does not adhere to VS IDE Prompt request JSON definition.From debugging the code, the request sent from
azd vs-server
has the form of:{ "type":"select", "options":{ "message":"Select an Azure Subscription to use:", "help":"", "choices":[ {"value":" 1. <Sub_Name> (<Sub_ID>)"}, {"value":" 2. ...} .... ] } }
But VS IDE defines another schema. Look at https://devdiv.visualstudio.com/DevDiv/_git/WebTools?path=/docs/Aspire/AzdHttpPrompting.md&version=GBmain&_a=contents.
{ "id": "myId", "kind": "select", "displayName": "MyLabel", "description": "My help description", "defaultValue": "Value1", "required": true, "choices": [ { "value": "Value1", "description": "Value1 description" }, { "value": "Value2" }, { "value": "Value3" } ]
For starters, there is no
type
field, butkind
.Repro steps:
Original Bug: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/2057823