Azure-Samples / contoso-real-estate

Intelligent enterprise-grade reference architecture for JavaScript, featuring OpenAI integration, Azure Developer CLI template and Playwright tests.
MIT License
889 stars 528 forks source link

API v4 migration - updates (DO NOT MERGE) #404

Closed dfberry closed 10 months ago

dfberry commented 11 months ago

Fixes #396, #386, #350

Changes

1) infra: secrets for cosmosdb, postgresdb, and appinsights are in keyvault 2) scripts: key vault secrets read into env for db restore 3) packages: api -> api-legacy (v3 programming model) 4) packages: api-v4 -> api (v4 programming model) 5) packages/api/src: @azure/identity -> v4.0.0 6) packages/api/src/index.ts: function names: remove duplicate and rename for function-verb 7) packages/api/src/config/index: use appInsights

Verify changes requires the following: 1) do not deploy stripe package - this is unrelated to changes in this PR but does fail the deployment so comment out the stripe service in azure.yml before deploying 2) SWA ssl error - still unclear what that is - but I worked it around it by changing the URL to http then continuing past the warning, then it redirects to the correct SWA + data returned from Fns - it looked it @manekinekko might be looking into this

https://green-field-052295603.4.azurestaticapps.net/home

image

@glaucia86 - fyi

@manekinekko @anfibiacreativa Ready for review.

glaucia86 commented 11 months ago

Thanks, @dfberry!

p.s.: just for your information, @dfberry and I made code review together this PR last Friday (11/10), once is related with the v3 to v4 migration PR

manekinekko commented 11 months ago

I've got a few issues when:

  1. after logged in successfully, I was redirected to /home with a blank screen
  2. when I clicked on a favorite button, I got a 500 error on the API call
  3. when I clicked on the reserve button I got the pop alerte image
dfberry commented 11 months ago

Working with @jongio and @glaucia86 for infra corrections.

diberry commented 10 months ago

Closing - the infra updates need to be separated from the API v4.