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
408 stars 197 forks source link

Fail to run `azd up` with `ASA-Samples-Event-Driven-Application` #3500

Closed v-jiaodi closed 6 months ago

v-jiaodi commented 8 months ago

Describe the issue: Test ASA-Samples-Event-Driven-Application template on DevContainer. Run azd up, get error as follow: image

Run azd pipeline config get same error: image

Repro Steps:

  1. Login in with command: azd auth login.
  2. Execute command: azd init -t ASA-Samples-Event-Driven-Application.
  3. Run azd up.
  4. Run azd pipeline config.

Environment:

Expected behavior: Run azd up and azd pipeline config can pass.

@rajeshkamal5050 for notification.

rajeshkamal5050 commented 8 months ago

@weikanglim can you triage to see if core asa azd deploy or template specific issue?

cc @yiliuTo @saragluna from ASA team to also take a look.

weikanglim commented 8 months ago

At a glance, this is happening since the container app is being deployed into what seems like a separate Spring Apps managed resource group.

After provisioning, I have:

rajeshkamal5050 commented 8 months ago

Thanks @weikanglim

From the docs, https://github.com/Azure-Samples/ASA-Samples-Event-Driven-Application?tab=readme-ov-file#quickstart after setting the plan to azd env set PLAN standard seems to be deploying fine.

Deploying services (azd deploy)

(✓) Done: Deploying service simple-event-driven-app

  • No endpoints were found

SUCCESS: Your application was deployed to Azure in 1 minute 14 seconds.

But, the default Standard consumption and dedicated plan(preview) seems to be broken.

@yiliuTo can you help triaging? seems related - https://github.com/Azure-Samples/ASA-Samples-Event-Driven-Application/pull/12

yiliuTo commented 8 months ago

Thanks @rajeshkamal5050 @weikanglim @v-jiaodi , @fangjian0423 will look into this issue.

fangjian0423 commented 8 months ago

The root case of this issue is Azure Spring Apps standard consumption and dedicated plan will create 2 resource groups with same tags, but AZD expect to get only 1 resource group with those tags.

We will output resource group name in our ASA template bicep to resolve it.

rajeshkamal5050 commented 8 months ago

Thanks @fangjian0423

This also needs the same fix https://github.com/Azure-Samples/ASA-Samples-Web-Application/ ?

fangjian0423 commented 8 months ago

Thanks @fangjian0423

This also needs the same fix https://github.com/Azure-Samples/ASA-Samples-Web-Application/ ?

Correct, maybe all ASA templates need to update, we will handle it.

rajeshkamal5050 commented 7 months ago

@fangjian0423 @yiliuTo can we get the remaining PR's merged.