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
395 stars 190 forks source link

[Issue]azd pipeline config could not find a default agent queue in project #4248

Open scrocquesel-ml150 opened 2 weeks ago

scrocquesel-ml150 commented 2 weeks ago

Output from azd version azd version 1.9.5 (commit cd2b7af9995d358aab33c782614f801ac1997dde)

Describe the bug Running azd pipeline config --provider azdo fails with

ERROR: could not find a default agent queue in project xxx

The name of the agent queue is hard coded

https://github.com/Azure/azure-dev/blob/a17935e47211ed01780281974c6d63b467de5b14/cli/azd/pkg/azdo/pipeline.go#L48

To Reproduce N/A

Expected behavior We are able to give the name of the queue to use and the config passes.

Environment N/A

Additional context My agent queue is named Azure Pipelines

rajeshkamal5050 commented 2 weeks ago

@vhvb1989 can we make agent/pool name Default configurable?

vhvb1989 commented 2 weeks ago

Yes, I will take a look. We should be able to check if more than one and list them to ask user to pick which to use

rajeshkamal5050 commented 2 weeks ago

@vhvb1989 can't we infer this from being defined in the azdo pipeline yaml? - https://learn.microsoft.com/en-us/azure/devops/pipelines/yaml-schema/pool?view=azure-pipelines#pool-string

vhvb1989 commented 2 weeks ago

@vhvb1989 can't we infer this from being defined in the azdo pipeline yaml? - https://learn.microsoft.com/en-us/azure/devops/pipelines/yaml-schema/pool?view=azure-pipelines#pool-string

We could, but sometimes projects won't have a pipeline definition, or they could have one which only defines a pool and vmImage (i.e. Ubuntu). So trying to get the pool name from the definition will not work for all scenarios.

The agent pool name can be defined in the pipeline definition to override the default agent pool used and assigned to the pipeline when the pipeline was created...