Open khowling opened 3 months ago
More information:
As azd template list
returns a long list! many linux users will pipe to grep to look for terms like python
or appservice
etc. Because you are returning a url formatted output, this appears to effect the output of grep. Thus I was putting in a none existing template url.
To reproduce: azd template list | grep python
this returns:
Microservices App - Dapr Bindings Cron Python ACA PostgreSQL Awesome AZD python-cron-postgresAzure-Samples/bindings-dapr-python-cron-postgres
Azure Functions - LangChain with Azure OpenAI and ChatGPT (Python v2 Function) Awesome AZD python-ai-langchainAzure-Samples/function-python-ai-langchain
Azure Functions - Chat using ChatGPT (Python v2 Function) Awesome AZD python-ai-openai-chatgptAzure-Samples/function-python-ai-openai-chatgpt
Then running this Hangs, because the repo is not found
azd init --template python-cron-postgresAzure-Samples/bindings-dapr-python-cron-postgres
Suggested fixes for usability
host
language/framework
, other services (aoai, redis, mongo etc), and maybe a small paragraph of template description to describe what the template is, and when you should use ittemplate list
command, to filter by host, language, dependencies, features. For example list all templates that use mongo, or aoaiLooks like the clickable url links and its name/description is causing some issue on linux when grepping.
Seems to be working fine on mac.
azd template list | grep python-mongo-aca Containerized React Web App with Python API and MongoDB Awesome AZD Azure-Samples/todo-python-mongo-aca
on linux,
azd template list | grep python-mongo-aca Containerized React Web App with Python API and MongoDB Awesome AZD python-mongo-acaAzure-Samples/todo-python-mongo-aca
@weikanglim @vhvb1989 have you seen this?
@khowling , there might be a few alternatives for what you are doing.
1) azd built-in filter: When you run azd init
and choose select a template
, azd has a built-in filter that helps you to pick a template. Just type for searching, like:
You wouldn't need to run azd templates
first for picking a template.
2) When you run azd templates
, you can change the output to Json file, azd templates -o json
. It might be easier to pipe and grep the output that way, as you can target the field you need, like azd template list -o json | grep -Po 'repositoryPath": "(.*python.*)"'
Output from
azd version
azd version 1.7.0 (commit 49d6adc2efb178083f61822e6b4715258560803d)Describe the bug Running
azd init --template webapp-mysql-dbjohn0isaac/flask-webapp-mysql-db
, shows this output, and never returns a prompt or error (same for multiple different templates)This is the same as issue : #460 , but that has been closed
Also, running
azd
to get the help screen, it says the command syntax isazd init --template [template name]
. Runningazd template list
theName
is different from theRepository Path
. I'm assuming you are not expecting theName
on the init command line?To Reproduce as above
Expected behavior expect to either work, or return a error message
Environment WIndows 11, running in WSL2 using Ubuntu.