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
373 stars 168 forks source link

The web app fail to start ADE Integration test #3767

Closed v-jiaodi closed 2 weeks ago

v-jiaodi commented 1 month ago

Describe the issue: Test todo-nodejs-mongo template. After running azd deploy, click the web app link, get error as follow: image Azure portal log: image

Repro Steps:

  1. Login in with command: azd auth login.
  2. Configure Devcenter in azd refer to https://github.com/Azure/azure-dev/pull/2767:
    "platform": {
     "config": {
      "name": "<devcenter-name>"
    },
      "type": "devcenter"
    }
  3. Run azd init -t todo-nodejs-mongo -b staging, azd provision and azd deploy.

Environment:

Expected behavior: Run azd deploy, the web app can start successfully.

@rajeshkamal5050 for notification.

wbreza commented 1 month ago

@v-jiaodi - what is your ADE configuration?

v-jiaodi commented 1 month ago

@wbreza Sorry, I didn't express myself clearly here,I will update it as follows: Configure Devcenter in azd refer to https://github.com/Azure/azure-dev/pull/2767:

"platform": {
     "config": {
      "name": "<devcenter-name>"
    },
      "type": "devcenter"
  }
wbreza commented 1 month ago

This is failing because the ADE environment definitions were not updated when the app code migrated from CRA to VITE. https://github.com/microsoft/devcenter-catalog/pull/90

cc @vhvb1989

v-jiaodi commented 3 weeks ago

@wbreza Retest, this issue still exists.

rajeshkamal5050 commented 3 weeks ago

@v-jiaodi can you retest with an updated devcenter-catalog? Since the fix was on the devcenter side and not sure if they have rolled out - https://github.com/microsoft/devcenter-catalog/pull/90 cc @wbreza

wbreza commented 2 weeks ago

Resolved with https://github.com/microsoft/devcenter-catalog/pull/90

v-jiaodi commented 2 weeks ago

@rajeshkamal5050 @wbreza Retest with an updated devcenter-catalog, this issue still exists. In the latest round of manual testing for azd, this issue still exists.

wbreza commented 2 weeks ago

@v-jiaodi I was able to reproduce this. The templates on the default devcenter catalog were a bit out of sync. This should be resolved with https://github.com/microsoft/devcenter-catalog/pull/97

You can validate this now by adding a catalog pointing to my repo @ https://github.com/wbreza/devcenter-catalog/tree/appservice-updates

FYI - A better way to test this is to perform the following steps:

  1. Enable devcenter mode azd config set platform.type devcenter
  2. Ensure your devcenter configuration is valid and you have access to devcenter projects
  3. Run azd init
  4. Choose from a template
  5. Choose an azd compatible template

Image

[!NOTE] If you have duplicate environment definitions from different catalogs azd will show them with ({DEVCENTE_NAME}/{CATALOG_NAME}) so you are able to disambiguate them in the list.

  1. This will clone the selected repo from the template and link the environment definition
  2. Run azd up to provision & deploy the application
  3. Access the web front end to validate the e2e deployment.
v-jiaodi commented 2 weeks ago

@wbreza Retest with https://github.com/wbreza/devcenter-catalog/tree/appservice-updates, it works.