Azure / azure-dev

A developer CLI that reduces the time it takes for you to get started on Azure. The Azure Developer CLI (azd) provides a set of developer-friendly commands that map to key stages in your workflow - code, build, deploy, monitor, repeat.
https://aka.ms/azd
MIT License
412 stars 201 forks source link

Fail to run `azd pipeline config --provider azdo` for `todo-nodejs-mongo-aks` #4348

Open Menghua1 opened 1 month ago

Menghua1 commented 1 month ago

Describe the issue: Running the azd pipeline config --provider azdo command fails with the following error message: image

Repro Steps:

  1. Login in with command: azd auth login.
  2. Run command: azd init -t todo-nodejs-mongo-aks -b staging.
  3. Run command: azd pipeline config --provider azdo.

Environment:

Expected behavior: azd pipeline config --provider azdo commands can be run successfully.

@jongio for notification.

Menghua1 commented 1 month ago

@jongio Yes, this issue can also be reproduced in main. We tested the following four scenarios and they can all be reproduced:

rajeshkamal5050 commented 1 month ago

@wbreza remember seeing similar issue on the ai starters due to User vs ServicePrincipal? cc @vhvb1989

Menghua1 commented 1 month ago

@rajeshkamal5050 In the latest round of azd manual testing, this issue still exists.

Menghua1 commented 4 weeks ago

@rajeshkamal5050 and @jongio In the latest round of azd manual testing, this issue still exists.

vhvb1989 commented 3 weeks ago

Looks like AZURE_PRINCIPAL_TYPE is not set during azd pipeline config and it is empty during CI run, making the runner to take the value of the literal ${AZURE_PRINCIPAL_TYPE} instead of replacing it with a value from the env.

This is an issue in the template configuration. The azure.yaml should define the AZURE_PRINCIPAL_TYPE in the pipeline->variables as a required ENV VAR to set during azd pipeline config

Menghua1 commented 2 weeks ago

@rajeshkamal5050 In the latest round of azd manual testing, this issue still exists.