From 59927187e81e84bd86f4c09a6f632257d46708dd Mon Sep 17 00:00:00 2001
From: Harmanpreet-Microsoft
Date: Mon, 17 Nov 2025 16:29:09 +0530
Subject: [PATCH 01/11] Update email subjects in CI workflow notifications
---
.github/workflows/ci.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 6e0227793..0178ed978 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -73,7 +73,7 @@ jobs:
RUN_URL="https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
EMAIL_BODY=$(cat <Dear Team,
The quota check has failed, and the pipeline cannot proceed.
Build URL: ${RUN_URL}
Please take necessary action.
Best regards,
Your Automation Team
"
}
EOF
@@ -433,7 +433,7 @@ jobs:
RUN_URL="https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
EMAIL_BODY=$(cat <Dear Team,The CWYD Automation process has encountered an issue and has failed to complete successfully.
Build URL: ${RUN_URL}
Please investigate.
Best regards,
Your Automation Team
"
}
EOF
From a5d032d36bfde173150838b2912d388bc0bb73f4 Mon Sep 17 00:00:00 2001
From: Harmanpreet-Microsoft
Date: Mon, 17 Nov 2025 20:11:57 +0530
Subject: [PATCH 02/11] Comment out resource group creation in ci.yml
Comment out the resource group creation command in CI workflow.
---
.github/workflows/ci.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 0178ed978..81bc80166 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -111,7 +111,7 @@ jobs:
rg_exists=$(az group exists --name ${{ env.RESOURCE_GROUP_NAME }})
if [ "$rg_exists" = "false" ]; then
echo "Resource group does not exist. Creating..."
- az group create --name ${{ env.RESOURCE_GROUP_NAME }} --location ${{ env.AZURE_LOCATION }} --tags SecurityControl=Ignore CreatedBy="Pipeline" || { echo "Error creating resource group"; exit 1; }
+ # az group create --name ${{ env.RESOURCE_GROUP_NAME }} --location ${{ env.AZURE_LOCATION }} --tags SecurityControl=Ignore CreatedBy="Pipeline" || { echo "Error creating resource group"; exit 1; }
else
echo "Resource group already exists."
fi
From 31d4c1118dbea99bc1540488fdd72c0d1d04a0aa Mon Sep 17 00:00:00 2001
From: Harmanpreet-Microsoft
Date: Tue, 18 Nov 2025 14:51:12 +0530
Subject: [PATCH 03/11] Uncomment resource group creation and cleanup steps
---
.github/workflows/ci.yml | 102 +++++++++++++++++++--------------------
1 file changed, 51 insertions(+), 51 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 81bc80166..e1d878554 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -111,7 +111,7 @@ jobs:
rg_exists=$(az group exists --name ${{ env.RESOURCE_GROUP_NAME }})
if [ "$rg_exists" = "false" ]; then
echo "Resource group does not exist. Creating..."
- # az group create --name ${{ env.RESOURCE_GROUP_NAME }} --location ${{ env.AZURE_LOCATION }} --tags SecurityControl=Ignore CreatedBy="Pipeline" || { echo "Error creating resource group"; exit 1; }
+ az group create --name ${{ env.RESOURCE_GROUP_NAME }} --location ${{ env.AZURE_LOCATION }} --tags SecurityControl=Ignore CreatedBy="Pipeline" || { echo "Error creating resource group"; exit 1; }
else
echo "Resource group already exists."
fi
@@ -392,53 +392,53 @@ jobs:
admin_url: ${{ needs.deploy.outputs.admin_url }}
- cleanup:
- if: always()
- needs: [deploy, e2e-test]
- runs-on: ubuntu-latest
-
- env:
- AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
- AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
- AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
- AZURE_ENV_NAME: ${{ needs.deploy.outputs.solution_suffix }} # Get from deploy job
- AZURE_LOCATION: ${{ vars.AZURE_LOCATION }}
- imageTag: ${{ needs.deploy.outputs.imageTag }}
- AZURE_RESOURCE_GROUP: ${{ needs.deploy.outputs.resource_group }}
-
- steps:
- - name: Checkout code
- uses: actions/checkout@v5
-
- - name: Destroy resources
- uses: devcontainers/ci@v0.3
- with:
- push: never
- imageName: ghcr.io/azure-samples/chat-with-your-data-solution-accelerator
- imageTag: ${{ env.imageTag }}
- runCmd: make destroy
- env: |
- AZURE_CLIENT_ID
- AZURE_CLIENT_SECRET
- AZURE_TENANT_ID
- AZURE_SUBSCRIPTION_ID
- AZURE_ENV_NAME
- AZURE_LOCATION
- AZURE_RESOURCE_GROUP
-
- - name: Send Notification on Failure
- if: failure()
- run: |
- RUN_URL="https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
- EMAIL_BODY=$(cat <Dear Team,The CWYD Automation process has encountered an issue and has failed to complete successfully.
Build URL: ${RUN_URL}
Please investigate.
Best regards,
Your Automation Team
"
- }
- EOF
- )
-
- curl -X POST "${{ secrets.LOGIC_APP_URL }}" \
- -H "Content-Type: application/json" \
- -d "$EMAIL_BODY" || echo "Failed to send notification"
+ # cleanup:
+ # if: always()
+ # needs: [deploy, e2e-test]
+ # runs-on: ubuntu-latest
+
+ # env:
+ # AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
+ # AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
+ # AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
+ # AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
+ # AZURE_ENV_NAME: ${{ needs.deploy.outputs.solution_suffix }} # Get from deploy job
+ # AZURE_LOCATION: ${{ vars.AZURE_LOCATION }}
+ # imageTag: ${{ needs.deploy.outputs.imageTag }}
+ # AZURE_RESOURCE_GROUP: ${{ needs.deploy.outputs.resource_group }}
+
+ # steps:
+ # - name: Checkout code
+ # uses: actions/checkout@v5
+
+ # - name: Destroy resources
+ # uses: devcontainers/ci@v0.3
+ # with:
+ # push: never
+ # imageName: ghcr.io/azure-samples/chat-with-your-data-solution-accelerator
+ # imageTag: ${{ env.imageTag }}
+ # runCmd: make destroy
+ # env: |
+ # AZURE_CLIENT_ID
+ # AZURE_CLIENT_SECRET
+ # AZURE_TENANT_ID
+ # AZURE_SUBSCRIPTION_ID
+ # AZURE_ENV_NAME
+ # AZURE_LOCATION
+ # AZURE_RESOURCE_GROUP
+
+ # - name: Send Notification on Failure
+ # if: failure()
+ # run: |
+ # RUN_URL="https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
+ # EMAIL_BODY=$(cat <Dear Team,The CWYD Automation process has encountered an issue and has failed to complete successfully.
Build URL: ${RUN_URL}
Please investigate.
Best regards,
Your Automation Team
"
+ # }
+ # EOF
+ # )
+
+ # curl -X POST "${{ secrets.LOGIC_APP_URL }}" \
+ # -H "Content-Type: application/json" \
+ # -d "$EMAIL_BODY" || echo "Failed to send notification"
From 40438cce8e1490252ae7b56ab0ae68d49ea9cc4f Mon Sep 17 00:00:00 2001
From: Harmanpreet Kaur
Date: Fri, 21 Nov 2025 09:26:18 +0530
Subject: [PATCH 04/11] feat: add deployment URL verification and update app
command line
---
.github/workflows/ci.yml | 46 +++++++++++++++++++++++++++++++++++++
infra/main.bicep | 2 +-
infra/modules/app/web.bicep | 2 +-
pyproject.toml | 1 +
4 files changed, 49 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index e1d878554..c9f838ddf 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -288,6 +288,52 @@ jobs:
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
+ - name: Verify Deployment URLs
+ run: |
+ echo "=== Verifying Deployed Applications ==="
+ echo ""
+
+ # Wait a bit for services to be ready
+ echo "⏳ Waiting 2 minutes for services to stabilize..."
+ sleep 120
+
+ # Check Frontend URL
+ if [ -n "${{ env.FRONTEND_WEBSITE_URL }}" ]; then
+ echo "🔍 Checking Frontend URL: ${{ env.FRONTEND_WEBSITE_URL }}"
+
+ HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" -L "${{ env.FRONTEND_WEBSITE_URL }}" || echo "000")
+
+ if [ "$HTTP_CODE" = "200" ]; then
+ echo "✅ Frontend is UP and responding (HTTP $HTTP_CODE)"
+ else
+ echo "❌ Frontend is DOWN or not responding properly (HTTP $HTTP_CODE)"
+ echo "⚠️ This may indicate a deployment issue - check App Service logs"
+ fi
+ else
+ echo "⚠️ Frontend URL not available"
+ fi
+
+ echo ""
+
+ # Check Admin URL
+ if [ -n "${{ env.ADMIN_WEBSITE_URL }}" ]; then
+ echo "🔍 Checking Admin URL: ${{ env.ADMIN_WEBSITE_URL }}"
+
+ HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" -L "${{ env.ADMIN_WEBSITE_URL }}" || echo "000")
+
+ if [ "$HTTP_CODE" = "200" ]; then
+ echo "✅ Admin is UP and responding (HTTP $HTTP_CODE)"
+ else
+ echo "❌ Admin is DOWN or not responding properly (HTTP $HTTP_CODE)"
+ echo "⚠️ This may indicate a deployment issue - check App Service logs"
+ fi
+ else
+ echo "⚠️ Admin URL not available"
+ fi
+
+ echo ""
+ echo "=== Deployment URL Verification Complete ==="
+
- name: Export PostgreSQL Host Endpoint from Makefile
run: |
# Only extract the PostgreSQL host endpoint from Makefile output
diff --git a/infra/main.bicep b/infra/main.bicep
index e2a5779a7..dddc2a387 100644
--- a/infra/main.bicep
+++ b/infra/main.bicep
@@ -1255,7 +1255,7 @@ module web 'modules/app/web.bicep' = {
dockerFullImageName: hostingModel == 'container' ? '${registryName}.azurecr.io/rag-webapp:${appversion}' : null
useDocker: hostingModel == 'container' ? true : false
allowedOrigins: []
- appCommandLine: ''
+ appCommandLine: hostingModel == 'code' ? 'gunicorn --bind=0.0.0.0 --timeout 600 app:app' : ''
userAssignedIdentityResourceId: managedIdentityModule.outputs.resourceId
diagnosticSettings: enableMonitoring ? [{ workspaceResourceId: monitoring!.outputs.logAnalyticsWorkspaceId }] : []
vnetRouteAllEnabled: enablePrivateNetworking ? true : false
diff --git a/infra/modules/app/web.bicep b/infra/modules/app/web.bicep
index 9aaa4a30d..da90787fb 100644
--- a/infra/modules/app/web.bicep
+++ b/infra/modules/app/web.bicep
@@ -12,7 +12,7 @@ param allTags object = {}
param allowedOrigins array = []
@description('Command to run when starting the web app.')
-param appCommandLine string = ''
+param appCommandLine string = 'gunicorn --bind=0.0.0.0 --timeout 600 app:app'
@description('The resource ID of the app service plan to use for the web app.')
param serverFarmResourceId string
diff --git a/pyproject.toml b/pyproject.toml
index 438114a0d..d6aff1070 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -17,6 +17,7 @@ azure-ai-formrecognizer = "3.3.3"
azure-storage-blob = "12.26.0"
azure-identity = "1.25.0"
flask = {extras = ["async"], version = "^3.1.2"}
+gunicorn = "^23.0.0"
openai = "1.109.1"
langchain = "0.2.17"
langchain-community = "0.2.19"
From 69965d3028d24697c49f2bd5be1fc093961babb8 Mon Sep 17 00:00:00 2001
From: Harmanpreet Kaur
Date: Fri, 21 Nov 2025 09:31:08 +0530
Subject: [PATCH 05/11] feat: add gunicorn package and update poetry.lock
---
poetry.lock | 40 ++++++++++++++++++++++++++++++++++++++--
1 file changed, 38 insertions(+), 2 deletions(-)
diff --git a/poetry.lock b/poetry.lock
index 6ee6713a7..f4f6cd840 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -1,4 +1,4 @@
-# This file is automatically @generated by Poetry 2.2.1 and should not be changed by hand.
+# This file is automatically @generated by Poetry 2.1.3 and should not be changed by hand.
[[package]]
name = "aiohappyeyeballs"
@@ -2367,6 +2367,28 @@ files = [
docs = ["Sphinx", "furo"]
test = ["objgraph", "psutil", "setuptools"]
+[[package]]
+name = "gunicorn"
+version = "23.0.0"
+description = "WSGI HTTP Server for UNIX"
+optional = false
+python-versions = ">=3.7"
+groups = ["main"]
+files = [
+ {file = "gunicorn-23.0.0-py3-none-any.whl", hash = "sha256:ec400d38950de4dfd418cff8328b2c8faed0edb0d517d3394e457c317908ca4d"},
+ {file = "gunicorn-23.0.0.tar.gz", hash = "sha256:f014447a0101dc57e294f6c18ca6b40227a4c90e9bdb586042628030cba004ec"},
+]
+
+[package.dependencies]
+packaging = "*"
+
+[package.extras]
+eventlet = ["eventlet (>=0.24.1,!=0.36.0)"]
+gevent = ["gevent (>=1.4.0)"]
+setproctitle = ["setproctitle"]
+testing = ["coverage", "eventlet", "gevent", "pytest", "pytest-cov"]
+tornado = ["tornado (>=0.2)"]
+
[[package]]
name = "h11"
version = "0.16.0"
@@ -5626,8 +5648,10 @@ files = [
{file = "psycopg2_binary-2.9.11-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:c47676e5b485393f069b4d7a811267d3168ce46f988fa602658b8bb901e9e64d"},
{file = "psycopg2_binary-2.9.11-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:a28d8c01a7b27a1e3265b11250ba7557e5f72b5ee9e5f3a2fa8d2949c29bf5d2"},
{file = "psycopg2_binary-2.9.11-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:5f3f2732cf504a1aa9e9609d02f79bea1067d99edf844ab92c247bbca143303b"},
+ {file = "psycopg2_binary-2.9.11-cp310-cp310-manylinux_2_38_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:865f9945ed1b3950d968ec4690ce68c55019d79e4497366d36e090327ce7db14"},
{file = "psycopg2_binary-2.9.11-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:91537a8df2bde69b1c1db01d6d944c831ca793952e4f57892600e96cee95f2cd"},
{file = "psycopg2_binary-2.9.11-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:4dca1f356a67ecb68c81a7bc7809f1569ad9e152ce7fd02c2f2036862ca9f66b"},
+ {file = "psycopg2_binary-2.9.11-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:0da4de5c1ac69d94ed4364b6cbe7190c1a70d325f112ba783d83f8440285f152"},
{file = "psycopg2_binary-2.9.11-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:37d8412565a7267f7d79e29ab66876e55cb5e8e7b3bbf94f8206f6795f8f7e7e"},
{file = "psycopg2_binary-2.9.11-cp310-cp310-win_amd64.whl", hash = "sha256:c665f01ec8ab273a61c62beeb8cce3014c214429ced8a308ca1fc410ecac3a39"},
{file = "psycopg2_binary-2.9.11-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:0e8480afd62362d0a6a27dd09e4ca2def6fa50ed3a4e7c09165266106b2ffa10"},
@@ -5635,8 +5659,10 @@ files = [
{file = "psycopg2_binary-2.9.11-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:2e164359396576a3cc701ba8af4751ae68a07235d7a380c631184a611220d9a4"},
{file = "psycopg2_binary-2.9.11-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:d57c9c387660b8893093459738b6abddbb30a7eab058b77b0d0d1c7d521ddfd7"},
{file = "psycopg2_binary-2.9.11-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:2c226ef95eb2250974bf6fa7a842082b31f68385c4f3268370e3f3870e7859ee"},
+ {file = "psycopg2_binary-2.9.11-cp311-cp311-manylinux_2_38_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:a311f1edc9967723d3511ea7d2708e2c3592e3405677bf53d5c7246753591fbb"},
{file = "psycopg2_binary-2.9.11-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:ebb415404821b6d1c47353ebe9c8645967a5235e6d88f914147e7fd411419e6f"},
{file = "psycopg2_binary-2.9.11-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:f07c9c4a5093258a03b28fab9b4f151aa376989e7f35f855088234e656ee6a94"},
+ {file = "psycopg2_binary-2.9.11-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:00ce1830d971f43b667abe4a56e42c1e2d594b32da4802e44a73bacacb25535f"},
{file = "psycopg2_binary-2.9.11-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:cffe9d7697ae7456649617e8bb8d7a45afb71cd13f7ab22af3e5c61f04840908"},
{file = "psycopg2_binary-2.9.11-cp311-cp311-win_amd64.whl", hash = "sha256:304fd7b7f97eef30e91b8f7e720b3db75fee010b520e434ea35ed1ff22501d03"},
{file = "psycopg2_binary-2.9.11-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:be9b840ac0525a283a96b556616f5b4820e0526addb8dcf6525a0fa162730be4"},
@@ -5644,8 +5670,10 @@ files = [
{file = "psycopg2_binary-2.9.11-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:ab8905b5dcb05bf3fb22e0cf90e10f469563486ffb6a96569e51f897c750a76a"},
{file = "psycopg2_binary-2.9.11-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:bf940cd7e7fec19181fdbc29d76911741153d51cab52e5c21165f3262125685e"},
{file = "psycopg2_binary-2.9.11-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:fa0f693d3c68ae925966f0b14b8edda71696608039f4ed61b1fe9ffa468d16db"},
+ {file = "psycopg2_binary-2.9.11-cp312-cp312-manylinux_2_38_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:a1cf393f1cdaf6a9b57c0a719a1068ba1069f022a59b8b1fe44b006745b59757"},
{file = "psycopg2_binary-2.9.11-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:ef7a6beb4beaa62f88592ccc65df20328029d721db309cb3250b0aae0fa146c3"},
{file = "psycopg2_binary-2.9.11-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:31b32c457a6025e74d233957cc9736742ac5a6cb196c6b68499f6bb51390bd6a"},
+ {file = "psycopg2_binary-2.9.11-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:edcb3aeb11cb4bf13a2af3c53a15b3d612edeb6409047ea0b5d6a21a9d744b34"},
{file = "psycopg2_binary-2.9.11-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:62b6d93d7c0b61a1dd6197d208ab613eb7dcfdcca0a49c42ceb082257991de9d"},
{file = "psycopg2_binary-2.9.11-cp312-cp312-win_amd64.whl", hash = "sha256:b33fabeb1fde21180479b2d4667e994de7bbf0eec22832ba5d9b5e4cf65b6c6d"},
{file = "psycopg2_binary-2.9.11-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:b8fb3db325435d34235b044b199e56cdf9ff41223a4b9752e8576465170bb38c"},
@@ -5653,8 +5681,10 @@ files = [
{file = "psycopg2_binary-2.9.11-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:8c55b385daa2f92cb64b12ec4536c66954ac53654c7f15a203578da4e78105c0"},
{file = "psycopg2_binary-2.9.11-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:c0377174bf1dd416993d16edc15357f6eb17ac998244cca19bc67cdc0e2e5766"},
{file = "psycopg2_binary-2.9.11-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:5c6ff3335ce08c75afaed19e08699e8aacf95d4a260b495a4a8545244fe2ceb3"},
+ {file = "psycopg2_binary-2.9.11-cp313-cp313-manylinux_2_38_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:84011ba3109e06ac412f95399b704d3d6950e386b7994475b231cf61eec2fc1f"},
{file = "psycopg2_binary-2.9.11-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:ba34475ceb08cccbdd98f6b46916917ae6eeb92b5ae111df10b544c3a4621dc4"},
{file = "psycopg2_binary-2.9.11-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:b31e90fdd0f968c2de3b26ab014314fe814225b6c324f770952f7d38abf17e3c"},
+ {file = "psycopg2_binary-2.9.11-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:d526864e0f67f74937a8fce859bd56c979f5e2ec57ca7c627f5f1071ef7fee60"},
{file = "psycopg2_binary-2.9.11-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:04195548662fa544626c8ea0f06561eb6203f1984ba5b4562764fbeb4c3d14b1"},
{file = "psycopg2_binary-2.9.11-cp313-cp313-win_amd64.whl", hash = "sha256:efff12b432179443f54e230fdf60de1f6cc726b6c832db8701227d089310e8aa"},
{file = "psycopg2_binary-2.9.11-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:92e3b669236327083a2e33ccfa0d320dd01b9803b3e14dd986a4fc54aa00f4e1"},
@@ -5662,8 +5692,10 @@ files = [
{file = "psycopg2_binary-2.9.11-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:9b52a3f9bb540a3e4ec0f6ba6d31339727b2950c9772850d6545b7eae0b9d7c5"},
{file = "psycopg2_binary-2.9.11-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:db4fd476874ccfdbb630a54426964959e58da4c61c9feba73e6094d51303d7d8"},
{file = "psycopg2_binary-2.9.11-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:47f212c1d3be608a12937cc131bd85502954398aaa1320cb4c14421a0ffccf4c"},
+ {file = "psycopg2_binary-2.9.11-cp314-cp314-manylinux_2_38_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:e35b7abae2b0adab776add56111df1735ccc71406e56203515e228a8dc07089f"},
{file = "psycopg2_binary-2.9.11-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:fcf21be3ce5f5659daefd2b3b3b6e4727b028221ddc94e6c1523425579664747"},
{file = "psycopg2_binary-2.9.11-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:9bd81e64e8de111237737b29d68039b9c813bdf520156af36d26819c9a979e5f"},
+ {file = "psycopg2_binary-2.9.11-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:32770a4d666fbdafab017086655bcddab791d7cb260a16679cc5a7338b64343b"},
{file = "psycopg2_binary-2.9.11-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:c3cb3a676873d7506825221045bd70e0427c905b9c8ee8d6acd70cfcbd6e576d"},
{file = "psycopg2_binary-2.9.11-cp314-cp314-win_amd64.whl", hash = "sha256:4012c9c954dfaccd28f94e84ab9f94e12df76b4afb22331b1f0d3154893a6316"},
{file = "psycopg2_binary-2.9.11-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:20e7fb94e20b03dcc783f76c0865f9da39559dcc0c28dd1a3fce0d01902a6b9c"},
@@ -5671,8 +5703,10 @@ files = [
{file = "psycopg2_binary-2.9.11-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:9d3a9edcfbe77a3ed4bc72836d466dfce4174beb79eda79ea155cc77237ed9e8"},
{file = "psycopg2_binary-2.9.11-cp39-cp39-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:44fc5c2b8fa871ce7f0023f619f1349a0aa03a0857f2c96fbc01c657dcbbdb49"},
{file = "psycopg2_binary-2.9.11-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:9c55460033867b4622cda1b6872edf445809535144152e5d14941ef591980edf"},
+ {file = "psycopg2_binary-2.9.11-cp39-cp39-manylinux_2_38_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:2d11098a83cca92deaeaed3d58cfd150d49b3b06ee0d0852be466bf87596899e"},
{file = "psycopg2_binary-2.9.11-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:691c807d94aecfbc76a14e1408847d59ff5b5906a04a23e12a89007672b9e819"},
{file = "psycopg2_binary-2.9.11-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:8b81627b691f29c4c30a8f322546ad039c40c328373b11dff7490a3e1b517855"},
+ {file = "psycopg2_binary-2.9.11-cp39-cp39-musllinux_1_2_riscv64.whl", hash = "sha256:b637d6d941209e8d96a072d7977238eea128046effbf37d1d8b2c0764750017d"},
{file = "psycopg2_binary-2.9.11-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:41360b01c140c2a03d346cec3280cf8a71aa07d94f3b1509fa0161c366af66b4"},
{file = "psycopg2_binary-2.9.11-cp39-cp39-win_amd64.whl", hash = "sha256:875039274f8a2361e5207857899706da840768e2a775bf8c65e82f60b197df02"},
]
@@ -7021,6 +7055,8 @@ files = [
{file = "ruamel.yaml.clib-0.2.14-cp39-cp39-win32.whl", hash = "sha256:6d5472f63a31b042aadf5ed28dd3ef0523da49ac17f0463e10fda9c4a2773352"},
{file = "ruamel.yaml.clib-0.2.14-cp39-cp39-win_amd64.whl", hash = "sha256:8dd3c2cc49caa7a8d64b67146462aed6723a0495e44bf0aa0a2e94beaa8432f6"},
{file = "ruamel.yaml.clib-0.2.14.tar.gz", hash = "sha256:803f5044b13602d58ea378576dd75aa759f52116a0232608e8fdada4da33752e"},
+ {file = "ruamel_yaml_clib-0.2.14-cp314-cp314-win32.whl", hash = "sha256:9b4104bf43ca0cd4e6f738cb86326a3b2f6eef00f417bd1e7efb7bdffe74c539"},
+ {file = "ruamel_yaml_clib-0.2.14-cp314-cp314-win_amd64.whl", hash = "sha256:13997d7d354a9890ea1ec5937a219817464e5cc344805b37671562a401ca3008"},
]
markers = {main = "platform_python_implementation == \"CPython\" and python_version <= \"3.12\"", prompt-flow = "platform_python_implementation == \"CPython\" and python_version < \"3.14\""}
@@ -8382,4 +8418,4 @@ type = ["pytest-mypy"]
[metadata]
lock-version = "2.1"
python-versions = "^3.10"
-content-hash = "0343a69a0fa62479b87f22299e72f3ad6034297304b110b95f66bd677b6b965a"
+content-hash = "ab4bd3bb0080f19d9ed32bd377ee9fcac68f72081e001cf1a29942ff2d526cc1"
From cd8b234179c5534e699bd683f387eb8afd879a81 Mon Sep 17 00:00:00 2001
From: Harmanpreet Kaur
Date: Fri, 21 Nov 2025 10:35:27 +0530
Subject: [PATCH 06/11] feat: uncomment cleanup job in CI workflow for resource
management
---
.github/workflows/ci.yml | 100 +++++++++++++++++++--------------------
1 file changed, 50 insertions(+), 50 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index c9f838ddf..97f1702b1 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -438,53 +438,53 @@ jobs:
admin_url: ${{ needs.deploy.outputs.admin_url }}
- # cleanup:
- # if: always()
- # needs: [deploy, e2e-test]
- # runs-on: ubuntu-latest
-
- # env:
- # AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
- # AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
- # AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- # AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
- # AZURE_ENV_NAME: ${{ needs.deploy.outputs.solution_suffix }} # Get from deploy job
- # AZURE_LOCATION: ${{ vars.AZURE_LOCATION }}
- # imageTag: ${{ needs.deploy.outputs.imageTag }}
- # AZURE_RESOURCE_GROUP: ${{ needs.deploy.outputs.resource_group }}
-
- # steps:
- # - name: Checkout code
- # uses: actions/checkout@v5
-
- # - name: Destroy resources
- # uses: devcontainers/ci@v0.3
- # with:
- # push: never
- # imageName: ghcr.io/azure-samples/chat-with-your-data-solution-accelerator
- # imageTag: ${{ env.imageTag }}
- # runCmd: make destroy
- # env: |
- # AZURE_CLIENT_ID
- # AZURE_CLIENT_SECRET
- # AZURE_TENANT_ID
- # AZURE_SUBSCRIPTION_ID
- # AZURE_ENV_NAME
- # AZURE_LOCATION
- # AZURE_RESOURCE_GROUP
-
- # - name: Send Notification on Failure
- # if: failure()
- # run: |
- # RUN_URL="https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
- # EMAIL_BODY=$(cat <Dear Team,The CWYD Automation process has encountered an issue and has failed to complete successfully.
Build URL: ${RUN_URL}
Please investigate.
Best regards,
Your Automation Team
"
- # }
- # EOF
- # )
-
- # curl -X POST "${{ secrets.LOGIC_APP_URL }}" \
- # -H "Content-Type: application/json" \
- # -d "$EMAIL_BODY" || echo "Failed to send notification"
+ cleanup:
+ if: always()
+ needs: [deploy, e2e-test]
+ runs-on: ubuntu-latest
+
+ env:
+ AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
+ AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
+ AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
+ AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
+ AZURE_ENV_NAME: ${{ needs.deploy.outputs.solution_suffix }} # Get from deploy job
+ AZURE_LOCATION: ${{ vars.AZURE_LOCATION }}
+ imageTag: ${{ needs.deploy.outputs.imageTag }}
+ AZURE_RESOURCE_GROUP: ${{ needs.deploy.outputs.resource_group }}
+
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v5
+
+ - name: Destroy resources
+ uses: devcontainers/ci@v0.3
+ with:
+ push: never
+ imageName: ghcr.io/azure-samples/chat-with-your-data-solution-accelerator
+ imageTag: ${{ env.imageTag }}
+ runCmd: make destroy
+ env: |
+ AZURE_CLIENT_ID
+ AZURE_CLIENT_SECRET
+ AZURE_TENANT_ID
+ AZURE_SUBSCRIPTION_ID
+ AZURE_ENV_NAME
+ AZURE_LOCATION
+ AZURE_RESOURCE_GROUP
+
+ - name: Send Notification on Failure
+ if: failure()
+ run: |
+ RUN_URL="https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
+ EMAIL_BODY=$(cat <Dear Team,The CWYD Automation process has encountered an issue and has failed to complete successfully.
Build URL: ${RUN_URL}
Please investigate.
Best regards,
Your Automation Team
"
+ }
+ EOF
+ )
+
+ curl -X POST "${{ secrets.LOGIC_APP_URL }}" \
+ -H "Content-Type: application/json" \
+ -d "$EMAIL_BODY" || echo "Failed to send notification"
From 6a5e149285cd36c93d4f730a661b7e403d9915b7 Mon Sep 17 00:00:00 2001
From: Harmanpreet Kaur
Date: Mon, 24 Nov 2025 14:15:55 +0530
Subject: [PATCH 07/11] feat: update app command line to disable gunicorn by
default and add security control tag
---
infra/main.bicep | 3 ++-
infra/modules/app/web.bicep | 4 +++-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/infra/main.bicep b/infra/main.bicep
index dddc2a387..2a4e66e4f 100644
--- a/infra/main.bicep
+++ b/infra/main.bicep
@@ -393,6 +393,7 @@ resource resourceGroupTags 'Microsoft.Resources/tags@2025-04-01' = {
...allTags
TemplateName: 'CWYD'
CreatedBy: createdBy
+ SecurityControl: 'Ignore'
}
}
}
@@ -1255,7 +1256,7 @@ module web 'modules/app/web.bicep' = {
dockerFullImageName: hostingModel == 'container' ? '${registryName}.azurecr.io/rag-webapp:${appversion}' : null
useDocker: hostingModel == 'container' ? true : false
allowedOrigins: []
- appCommandLine: hostingModel == 'code' ? 'gunicorn --bind=0.0.0.0 --timeout 600 app:app' : ''
+ appCommandLine: ''
userAssignedIdentityResourceId: managedIdentityModule.outputs.resourceId
diagnosticSettings: enableMonitoring ? [{ workspaceResourceId: monitoring!.outputs.logAnalyticsWorkspaceId }] : []
vnetRouteAllEnabled: enablePrivateNetworking ? true : false
diff --git a/infra/modules/app/web.bicep b/infra/modules/app/web.bicep
index da90787fb..231cafd09 100644
--- a/infra/modules/app/web.bicep
+++ b/infra/modules/app/web.bicep
@@ -12,7 +12,9 @@ param allTags object = {}
param allowedOrigins array = []
@description('Command to run when starting the web app.')
-param appCommandLine string = 'gunicorn --bind=0.0.0.0 --timeout 600 app:app'
+param appCommandLine string = ''
+
+// param appCommandLine string = 'gunicorn --bind=0.0.0.0 --timeout 600 app:app'
@description('The resource ID of the app service plan to use for the web app.')
param serverFarmResourceId string
From c6f6a3c2b589c8ffdecad6e24e5af8443d8ee920 Mon Sep 17 00:00:00 2001
From: Harmanpreet Kaur
Date: Mon, 1 Dec 2025 09:41:26 +0530
Subject: [PATCH 08/11] feat: set AZURE_APP_SERVICE_HOSTING_MODEL to code in CI
and Makefile
---
.github/workflows/ci.yml | 1 +
Makefile | 1 +
2 files changed, 2 insertions(+)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 97f1702b1..e869d2ae4 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -195,6 +195,7 @@ jobs:
AZURE_ENV_NAME
AZURE_LOCATION
AZURE_RESOURCE_GROUP
+ AZURE_APP_SERVICE_HOSTING_MODEL=code
AUTH_ENABLED=false
AZURE_USE_AUTHENTICATION=false
AZURE_ENABLE_AUTH=false
diff --git a/Makefile b/Makefile
index da9566de8..1d43e7250 100644
--- a/Makefile
+++ b/Makefile
@@ -71,6 +71,7 @@ deploy: azd-login ## Deploy everything to Azure
@azd env new ${AZURE_ENV_NAME} --location ${AZURE_LOCATION}
@azd env set AZURE_RESOURCE_GROUP ${AZURE_RESOURCE_GROUP}
+ @azd env set AZURE_APP_SERVICE_HOSTING_MODEL code
# Provision and deploy
@azd provision --no-prompt
From 03279e2b202cb0390bad597b9049465483ad5e0a Mon Sep 17 00:00:00 2001
From: Harmanpreet Kaur
Date: Mon, 1 Dec 2025 15:10:05 +0530
Subject: [PATCH 09/11] feat: enhance deployment process with error handling
and logging for web, function, and admin services
---
.github/workflows/ci.yml | 45 +++++++++++++++++++++++++++++++++++++++-
Makefile | 13 +++++++++---
2 files changed, 54 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index e869d2ae4..30f177af0 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -170,10 +170,33 @@ jobs:
az login --service-principal -u $AZURE_CLIENT_ID -p $AZURE_CLIENT_SECRET --tenant $AZURE_TENANT_ID
az account set --subscription $AZURE_SUBSCRIPTION_ID
- # Capture deployment output to a log file
+ # Verify we're in the right directory
+ echo "=== Current Directory ==="
+ pwd
+ ls -la
+
+ # Run CI tests
+ echo "=== Running CI Tests ==="
make ci 2>&1 | tee ci_output.log
+
+ # Deploy with verbose output
+ echo "=== Starting Deployment ==="
make deploy 2>&1 | tee deploy_output.log
+ # Check if deployment was successful
+ if grep -q "❌" deploy_output.log; then
+ echo "ERROR: Deployment had failures!"
+ cat deploy_output.log
+ exit 1
+ fi
+
+ # Display deployment logs for debugging
+ echo "=== Web Deployment Log ==="
+ cat web_deploy.log || echo "No web deployment log"
+
+ echo "=== Admin Deployment Log ==="
+ cat admin_deploy.log || echo "No admin deployment log"
+
# Try to extract URLs from deployment logs as backup
echo "=== Extracting URLs from deployment logs ==="
grep -oE "https://[a-zA-Z0-9.-]*\.azurewebsites\.net/" deploy_output.log | sort | uniq | head -2 | tee extracted_urls.txt || echo "No URLs found in logs"
@@ -306,6 +329,16 @@ jobs:
if [ "$HTTP_CODE" = "200" ]; then
echo "✅ Frontend is UP and responding (HTTP $HTTP_CODE)"
+
+ # Check if it's the actual app or default page
+ RESPONSE=$(curl -s -L "${{ env.FRONTEND_WEBSITE_URL }}")
+ if echo "$RESPONSE" | grep -q "Hey, Python developers"; then
+ echo "❌ WARNING: Frontend is showing DEFAULT Azure page - deployment failed!"
+ echo "This indicates the application code was NOT deployed correctly"
+ exit 1
+ else
+ echo "✅ Frontend appears to be the actual application"
+ fi
else
echo "❌ Frontend is DOWN or not responding properly (HTTP $HTTP_CODE)"
echo "⚠️ This may indicate a deployment issue - check App Service logs"
@@ -324,6 +357,16 @@ jobs:
if [ "$HTTP_CODE" = "200" ]; then
echo "✅ Admin is UP and responding (HTTP $HTTP_CODE)"
+
+ # Check if it's the actual app or default page
+ RESPONSE=$(curl -s -L "${{ env.ADMIN_WEBSITE_URL }}")
+ if echo "$RESPONSE" | grep -q "Hey, Python developers"; then
+ echo "❌ WARNING: Admin is showing DEFAULT Azure page - deployment failed!"
+ echo "This indicates the application code was NOT deployed correctly"
+ exit 1
+ else
+ echo "✅ Admin appears to be the actual application"
+ fi
else
echo "❌ Admin is DOWN or not responding properly (HTTP $HTTP_CODE)"
echo "⚠️ This may indicate a deployment issue - check App Service logs"
diff --git a/Makefile b/Makefile
index 1d43e7250..452537fef 100644
--- a/Makefile
+++ b/Makefile
@@ -75,9 +75,16 @@ deploy: azd-login ## Deploy everything to Azure
# Provision and deploy
@azd provision --no-prompt
- @azd deploy web --no-prompt || true
- @azd deploy function --no-prompt || true
- @azd deploy adminweb --no-prompt
+
+ # Deploy with proper error handling and logging
+ @echo "=== Deploying web service ==="
+ @azd deploy web --no-prompt 2>&1 | tee web_deploy.log || (echo "❌ Web deployment failed" && cat web_deploy.log && exit 1)
+
+ @echo "=== Deploying function service ==="
+ @azd deploy function --no-prompt 2>&1 | tee function_deploy.log || echo "⚠️ Function deployment failed (non-critical)"
+
+ @echo "=== Deploying adminweb service ==="
+ @azd deploy adminweb --no-prompt 2>&1 | tee admin_deploy.log || (echo "❌ Admin deployment failed" && cat admin_deploy.log && exit 1)
@azd env get-values > .env.temp
@cat .env.temp
From da304439621c2badb64dd18e8b21786b7f43683b Mon Sep 17 00:00:00 2001
From: Harmanpreet Kaur
Date: Fri, 5 Dec 2025 11:24:33 +0530
Subject: [PATCH 10/11] refactor: update email subjects and clean up CI
scripts; remove unused parameters and dependencies
---
.github/workflows/ci.yml | 22 ++------------------
infra/main.bicep | 1 -
infra/modules/app/web.bicep | 2 --
poetry.lock | 40 ++-----------------------------------
pyproject.toml | 1 -
5 files changed, 4 insertions(+), 62 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 30f177af0..81860fce0 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -73,7 +73,7 @@ jobs:
RUN_URL="https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
EMAIL_BODY=$(cat <Dear Team,The quota check has failed, and the pipeline cannot proceed.
Build URL: ${RUN_URL}
Please take necessary action.
Best regards,
Your Automation Team
"
}
EOF
@@ -170,11 +170,6 @@ jobs:
az login --service-principal -u $AZURE_CLIENT_ID -p $AZURE_CLIENT_SECRET --tenant $AZURE_TENANT_ID
az account set --subscription $AZURE_SUBSCRIPTION_ID
- # Verify we're in the right directory
- echo "=== Current Directory ==="
- pwd
- ls -la
-
# Run CI tests
echo "=== Running CI Tests ==="
make ci 2>&1 | tee ci_output.log
@@ -183,19 +178,6 @@ jobs:
echo "=== Starting Deployment ==="
make deploy 2>&1 | tee deploy_output.log
- # Check if deployment was successful
- if grep -q "❌" deploy_output.log; then
- echo "ERROR: Deployment had failures!"
- cat deploy_output.log
- exit 1
- fi
-
- # Display deployment logs for debugging
- echo "=== Web Deployment Log ==="
- cat web_deploy.log || echo "No web deployment log"
-
- echo "=== Admin Deployment Log ==="
- cat admin_deploy.log || echo "No admin deployment log"
# Try to extract URLs from deployment logs as backup
echo "=== Extracting URLs from deployment logs ==="
@@ -523,7 +505,7 @@ jobs:
RUN_URL="https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
EMAIL_BODY=$(cat <Dear Team,The CWYD Automation process has encountered an issue and has failed to complete successfully.
Build URL: ${RUN_URL}
Please investigate.
Best regards,
Your Automation Team
"
}
EOF
diff --git a/infra/main.bicep b/infra/main.bicep
index 23c3d794c..9f974c0fb 100644
--- a/infra/main.bicep
+++ b/infra/main.bicep
@@ -393,7 +393,6 @@ resource resourceGroupTags 'Microsoft.Resources/tags@2025-04-01' = {
...allTags
TemplateName: 'CWYD'
CreatedBy: createdBy
- SecurityControl: 'Ignore'
}
}
}
diff --git a/infra/modules/app/web.bicep b/infra/modules/app/web.bicep
index 231cafd09..9aaa4a30d 100644
--- a/infra/modules/app/web.bicep
+++ b/infra/modules/app/web.bicep
@@ -14,8 +14,6 @@ param allowedOrigins array = []
@description('Command to run when starting the web app.')
param appCommandLine string = ''
-// param appCommandLine string = 'gunicorn --bind=0.0.0.0 --timeout 600 app:app'
-
@description('The resource ID of the app service plan to use for the web app.')
param serverFarmResourceId string
diff --git a/poetry.lock b/poetry.lock
index f4f6cd840..6ee6713a7 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -1,4 +1,4 @@
-# This file is automatically @generated by Poetry 2.1.3 and should not be changed by hand.
+# This file is automatically @generated by Poetry 2.2.1 and should not be changed by hand.
[[package]]
name = "aiohappyeyeballs"
@@ -2367,28 +2367,6 @@ files = [
docs = ["Sphinx", "furo"]
test = ["objgraph", "psutil", "setuptools"]
-[[package]]
-name = "gunicorn"
-version = "23.0.0"
-description = "WSGI HTTP Server for UNIX"
-optional = false
-python-versions = ">=3.7"
-groups = ["main"]
-files = [
- {file = "gunicorn-23.0.0-py3-none-any.whl", hash = "sha256:ec400d38950de4dfd418cff8328b2c8faed0edb0d517d3394e457c317908ca4d"},
- {file = "gunicorn-23.0.0.tar.gz", hash = "sha256:f014447a0101dc57e294f6c18ca6b40227a4c90e9bdb586042628030cba004ec"},
-]
-
-[package.dependencies]
-packaging = "*"
-
-[package.extras]
-eventlet = ["eventlet (>=0.24.1,!=0.36.0)"]
-gevent = ["gevent (>=1.4.0)"]
-setproctitle = ["setproctitle"]
-testing = ["coverage", "eventlet", "gevent", "pytest", "pytest-cov"]
-tornado = ["tornado (>=0.2)"]
-
[[package]]
name = "h11"
version = "0.16.0"
@@ -5648,10 +5626,8 @@ files = [
{file = "psycopg2_binary-2.9.11-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:c47676e5b485393f069b4d7a811267d3168ce46f988fa602658b8bb901e9e64d"},
{file = "psycopg2_binary-2.9.11-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:a28d8c01a7b27a1e3265b11250ba7557e5f72b5ee9e5f3a2fa8d2949c29bf5d2"},
{file = "psycopg2_binary-2.9.11-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:5f3f2732cf504a1aa9e9609d02f79bea1067d99edf844ab92c247bbca143303b"},
- {file = "psycopg2_binary-2.9.11-cp310-cp310-manylinux_2_38_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:865f9945ed1b3950d968ec4690ce68c55019d79e4497366d36e090327ce7db14"},
{file = "psycopg2_binary-2.9.11-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:91537a8df2bde69b1c1db01d6d944c831ca793952e4f57892600e96cee95f2cd"},
{file = "psycopg2_binary-2.9.11-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:4dca1f356a67ecb68c81a7bc7809f1569ad9e152ce7fd02c2f2036862ca9f66b"},
- {file = "psycopg2_binary-2.9.11-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:0da4de5c1ac69d94ed4364b6cbe7190c1a70d325f112ba783d83f8440285f152"},
{file = "psycopg2_binary-2.9.11-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:37d8412565a7267f7d79e29ab66876e55cb5e8e7b3bbf94f8206f6795f8f7e7e"},
{file = "psycopg2_binary-2.9.11-cp310-cp310-win_amd64.whl", hash = "sha256:c665f01ec8ab273a61c62beeb8cce3014c214429ced8a308ca1fc410ecac3a39"},
{file = "psycopg2_binary-2.9.11-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:0e8480afd62362d0a6a27dd09e4ca2def6fa50ed3a4e7c09165266106b2ffa10"},
@@ -5659,10 +5635,8 @@ files = [
{file = "psycopg2_binary-2.9.11-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:2e164359396576a3cc701ba8af4751ae68a07235d7a380c631184a611220d9a4"},
{file = "psycopg2_binary-2.9.11-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:d57c9c387660b8893093459738b6abddbb30a7eab058b77b0d0d1c7d521ddfd7"},
{file = "psycopg2_binary-2.9.11-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:2c226ef95eb2250974bf6fa7a842082b31f68385c4f3268370e3f3870e7859ee"},
- {file = "psycopg2_binary-2.9.11-cp311-cp311-manylinux_2_38_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:a311f1edc9967723d3511ea7d2708e2c3592e3405677bf53d5c7246753591fbb"},
{file = "psycopg2_binary-2.9.11-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:ebb415404821b6d1c47353ebe9c8645967a5235e6d88f914147e7fd411419e6f"},
{file = "psycopg2_binary-2.9.11-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:f07c9c4a5093258a03b28fab9b4f151aa376989e7f35f855088234e656ee6a94"},
- {file = "psycopg2_binary-2.9.11-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:00ce1830d971f43b667abe4a56e42c1e2d594b32da4802e44a73bacacb25535f"},
{file = "psycopg2_binary-2.9.11-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:cffe9d7697ae7456649617e8bb8d7a45afb71cd13f7ab22af3e5c61f04840908"},
{file = "psycopg2_binary-2.9.11-cp311-cp311-win_amd64.whl", hash = "sha256:304fd7b7f97eef30e91b8f7e720b3db75fee010b520e434ea35ed1ff22501d03"},
{file = "psycopg2_binary-2.9.11-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:be9b840ac0525a283a96b556616f5b4820e0526addb8dcf6525a0fa162730be4"},
@@ -5670,10 +5644,8 @@ files = [
{file = "psycopg2_binary-2.9.11-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:ab8905b5dcb05bf3fb22e0cf90e10f469563486ffb6a96569e51f897c750a76a"},
{file = "psycopg2_binary-2.9.11-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:bf940cd7e7fec19181fdbc29d76911741153d51cab52e5c21165f3262125685e"},
{file = "psycopg2_binary-2.9.11-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:fa0f693d3c68ae925966f0b14b8edda71696608039f4ed61b1fe9ffa468d16db"},
- {file = "psycopg2_binary-2.9.11-cp312-cp312-manylinux_2_38_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:a1cf393f1cdaf6a9b57c0a719a1068ba1069f022a59b8b1fe44b006745b59757"},
{file = "psycopg2_binary-2.9.11-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:ef7a6beb4beaa62f88592ccc65df20328029d721db309cb3250b0aae0fa146c3"},
{file = "psycopg2_binary-2.9.11-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:31b32c457a6025e74d233957cc9736742ac5a6cb196c6b68499f6bb51390bd6a"},
- {file = "psycopg2_binary-2.9.11-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:edcb3aeb11cb4bf13a2af3c53a15b3d612edeb6409047ea0b5d6a21a9d744b34"},
{file = "psycopg2_binary-2.9.11-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:62b6d93d7c0b61a1dd6197d208ab613eb7dcfdcca0a49c42ceb082257991de9d"},
{file = "psycopg2_binary-2.9.11-cp312-cp312-win_amd64.whl", hash = "sha256:b33fabeb1fde21180479b2d4667e994de7bbf0eec22832ba5d9b5e4cf65b6c6d"},
{file = "psycopg2_binary-2.9.11-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:b8fb3db325435d34235b044b199e56cdf9ff41223a4b9752e8576465170bb38c"},
@@ -5681,10 +5653,8 @@ files = [
{file = "psycopg2_binary-2.9.11-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:8c55b385daa2f92cb64b12ec4536c66954ac53654c7f15a203578da4e78105c0"},
{file = "psycopg2_binary-2.9.11-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:c0377174bf1dd416993d16edc15357f6eb17ac998244cca19bc67cdc0e2e5766"},
{file = "psycopg2_binary-2.9.11-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:5c6ff3335ce08c75afaed19e08699e8aacf95d4a260b495a4a8545244fe2ceb3"},
- {file = "psycopg2_binary-2.9.11-cp313-cp313-manylinux_2_38_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:84011ba3109e06ac412f95399b704d3d6950e386b7994475b231cf61eec2fc1f"},
{file = "psycopg2_binary-2.9.11-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:ba34475ceb08cccbdd98f6b46916917ae6eeb92b5ae111df10b544c3a4621dc4"},
{file = "psycopg2_binary-2.9.11-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:b31e90fdd0f968c2de3b26ab014314fe814225b6c324f770952f7d38abf17e3c"},
- {file = "psycopg2_binary-2.9.11-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:d526864e0f67f74937a8fce859bd56c979f5e2ec57ca7c627f5f1071ef7fee60"},
{file = "psycopg2_binary-2.9.11-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:04195548662fa544626c8ea0f06561eb6203f1984ba5b4562764fbeb4c3d14b1"},
{file = "psycopg2_binary-2.9.11-cp313-cp313-win_amd64.whl", hash = "sha256:efff12b432179443f54e230fdf60de1f6cc726b6c832db8701227d089310e8aa"},
{file = "psycopg2_binary-2.9.11-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:92e3b669236327083a2e33ccfa0d320dd01b9803b3e14dd986a4fc54aa00f4e1"},
@@ -5692,10 +5662,8 @@ files = [
{file = "psycopg2_binary-2.9.11-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:9b52a3f9bb540a3e4ec0f6ba6d31339727b2950c9772850d6545b7eae0b9d7c5"},
{file = "psycopg2_binary-2.9.11-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:db4fd476874ccfdbb630a54426964959e58da4c61c9feba73e6094d51303d7d8"},
{file = "psycopg2_binary-2.9.11-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:47f212c1d3be608a12937cc131bd85502954398aaa1320cb4c14421a0ffccf4c"},
- {file = "psycopg2_binary-2.9.11-cp314-cp314-manylinux_2_38_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:e35b7abae2b0adab776add56111df1735ccc71406e56203515e228a8dc07089f"},
{file = "psycopg2_binary-2.9.11-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:fcf21be3ce5f5659daefd2b3b3b6e4727b028221ddc94e6c1523425579664747"},
{file = "psycopg2_binary-2.9.11-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:9bd81e64e8de111237737b29d68039b9c813bdf520156af36d26819c9a979e5f"},
- {file = "psycopg2_binary-2.9.11-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:32770a4d666fbdafab017086655bcddab791d7cb260a16679cc5a7338b64343b"},
{file = "psycopg2_binary-2.9.11-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:c3cb3a676873d7506825221045bd70e0427c905b9c8ee8d6acd70cfcbd6e576d"},
{file = "psycopg2_binary-2.9.11-cp314-cp314-win_amd64.whl", hash = "sha256:4012c9c954dfaccd28f94e84ab9f94e12df76b4afb22331b1f0d3154893a6316"},
{file = "psycopg2_binary-2.9.11-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:20e7fb94e20b03dcc783f76c0865f9da39559dcc0c28dd1a3fce0d01902a6b9c"},
@@ -5703,10 +5671,8 @@ files = [
{file = "psycopg2_binary-2.9.11-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:9d3a9edcfbe77a3ed4bc72836d466dfce4174beb79eda79ea155cc77237ed9e8"},
{file = "psycopg2_binary-2.9.11-cp39-cp39-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:44fc5c2b8fa871ce7f0023f619f1349a0aa03a0857f2c96fbc01c657dcbbdb49"},
{file = "psycopg2_binary-2.9.11-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:9c55460033867b4622cda1b6872edf445809535144152e5d14941ef591980edf"},
- {file = "psycopg2_binary-2.9.11-cp39-cp39-manylinux_2_38_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:2d11098a83cca92deaeaed3d58cfd150d49b3b06ee0d0852be466bf87596899e"},
{file = "psycopg2_binary-2.9.11-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:691c807d94aecfbc76a14e1408847d59ff5b5906a04a23e12a89007672b9e819"},
{file = "psycopg2_binary-2.9.11-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:8b81627b691f29c4c30a8f322546ad039c40c328373b11dff7490a3e1b517855"},
- {file = "psycopg2_binary-2.9.11-cp39-cp39-musllinux_1_2_riscv64.whl", hash = "sha256:b637d6d941209e8d96a072d7977238eea128046effbf37d1d8b2c0764750017d"},
{file = "psycopg2_binary-2.9.11-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:41360b01c140c2a03d346cec3280cf8a71aa07d94f3b1509fa0161c366af66b4"},
{file = "psycopg2_binary-2.9.11-cp39-cp39-win_amd64.whl", hash = "sha256:875039274f8a2361e5207857899706da840768e2a775bf8c65e82f60b197df02"},
]
@@ -7055,8 +7021,6 @@ files = [
{file = "ruamel.yaml.clib-0.2.14-cp39-cp39-win32.whl", hash = "sha256:6d5472f63a31b042aadf5ed28dd3ef0523da49ac17f0463e10fda9c4a2773352"},
{file = "ruamel.yaml.clib-0.2.14-cp39-cp39-win_amd64.whl", hash = "sha256:8dd3c2cc49caa7a8d64b67146462aed6723a0495e44bf0aa0a2e94beaa8432f6"},
{file = "ruamel.yaml.clib-0.2.14.tar.gz", hash = "sha256:803f5044b13602d58ea378576dd75aa759f52116a0232608e8fdada4da33752e"},
- {file = "ruamel_yaml_clib-0.2.14-cp314-cp314-win32.whl", hash = "sha256:9b4104bf43ca0cd4e6f738cb86326a3b2f6eef00f417bd1e7efb7bdffe74c539"},
- {file = "ruamel_yaml_clib-0.2.14-cp314-cp314-win_amd64.whl", hash = "sha256:13997d7d354a9890ea1ec5937a219817464e5cc344805b37671562a401ca3008"},
]
markers = {main = "platform_python_implementation == \"CPython\" and python_version <= \"3.12\"", prompt-flow = "platform_python_implementation == \"CPython\" and python_version < \"3.14\""}
@@ -8418,4 +8382,4 @@ type = ["pytest-mypy"]
[metadata]
lock-version = "2.1"
python-versions = "^3.10"
-content-hash = "ab4bd3bb0080f19d9ed32bd377ee9fcac68f72081e001cf1a29942ff2d526cc1"
+content-hash = "0343a69a0fa62479b87f22299e72f3ad6034297304b110b95f66bd677b6b965a"
diff --git a/pyproject.toml b/pyproject.toml
index d6aff1070..438114a0d 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -17,7 +17,6 @@ azure-ai-formrecognizer = "3.3.3"
azure-storage-blob = "12.26.0"
azure-identity = "1.25.0"
flask = {extras = ["async"], version = "^3.1.2"}
-gunicorn = "^23.0.0"
openai = "1.109.1"
langchain = "0.2.17"
langchain-community = "0.2.19"
From 52b8dae5b68fce6264162dc0a8f35972085f7cd7 Mon Sep 17 00:00:00 2001
From: Harmanpreet Kaur
Date: Fri, 5 Dec 2025 14:02:46 +0530
Subject: [PATCH 11/11] feat: enhance deployment process with simplified error
handling for web, function, and admin services
---
Makefile | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/Makefile b/Makefile
index 452537fef..be741c08c 100644
--- a/Makefile
+++ b/Makefile
@@ -76,15 +76,11 @@ deploy: azd-login ## Deploy everything to Azure
# Provision and deploy
@azd provision --no-prompt
- # Deploy with proper error handling and logging
- @echo "=== Deploying web service ==="
- @azd deploy web --no-prompt 2>&1 | tee web_deploy.log || (echo "❌ Web deployment failed" && cat web_deploy.log && exit 1)
+ @azd deploy web --no-prompt || true
+ @azd deploy function --no-prompt || true
+ @azd deploy adminweb --no-prompt
- @echo "=== Deploying function service ==="
- @azd deploy function --no-prompt 2>&1 | tee function_deploy.log || echo "⚠️ Function deployment failed (non-critical)"
- @echo "=== Deploying adminweb service ==="
- @azd deploy adminweb --no-prompt 2>&1 | tee admin_deploy.log || (echo "❌ Admin deployment failed" && cat admin_deploy.log && exit 1)
@azd env get-values > .env.temp
@cat .env.temp