From 2607457591ef6dcd777339330afeb8c49b682203 Mon Sep 17 00:00:00 2001
From: Harmanpreet-Microsoft
Date: Mon, 3 Nov 2025 21:16:06 +0530
Subject: [PATCH 1/2] ci: improve deployment workflow (#1954)
Co-authored-by: Harmanpreet Kaur
---
.github/workflows/ci.yml | 28 +++++++++----------
.../tests/test_chat_with_your_data.py | 2 +-
2 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index aca675efe..25ced8474 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -73,6 +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
@@ -88,8 +89,8 @@ jobs:
- name: Set Deployment Region
run: |
- echo "Selected Region: $VALID_REGION"
- echo "AZURE_LOCATION=$VALID_REGION" >> $GITHUB_ENV
+ echo "Selected Region: $VALID_REGION"
+ echo "AZURE_LOCATION=$VALID_REGION" >> $GITHUB_ENV
- name: Generate Resource Group Name
id: generate_rg_name
@@ -175,13 +176,13 @@ jobs:
# 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 | head -2 | tee extracted_urls.txt || echo "No URLs found in 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"
# Check if we have admin URL in logs
- grep -E "Done: Deploying service adminweb" -A 2 deploy_output.log | grep -oE "https://[a-zA-Z0-9.-]*\.azurewebsites\.net/" > log_admin_url.txt || echo "" > log_admin_url.txt
+ grep -E "Done: Deploying service adminweb" -A 2 deploy_output.log | grep -oE "https://[a-zA-Z0-9.-]*\.azurewebsites\.net/" | head -1 > log_admin_url.txt || echo "" > log_admin_url.txt
# Check if we have web URL in logs
- grep -E "Done: Deploying service web" -A 2 deploy_output.log | grep -oE "https://[a-zA-Z0-9.-]*\.azurewebsites\.net/" > log_web_url.txt || echo "" > log_web_url.txt
+ grep -E "Done: Deploying service web" -A 2 deploy_output.log | grep -oE "https://[a-zA-Z0-9.-]*\.azurewebsites\.net/" | head -1 > log_web_url.txt || echo "" > log_web_url.txt
echo "URLs from logs:"
echo "Admin URL from logs: $(cat log_admin_url.txt)"
@@ -217,8 +218,8 @@ jobs:
run: |
# Method 1: Check files created by Makefile
echo "=== Method 1: Files from Makefile ==="
- if [ -f "web_url.txt" ]; then
- WEB_URL=$(cat web_url.txt | tr -d '\n\r' | xargs)
+ if [ -f "frontend_url.txt" ]; then
+ WEB_URL=$(cat frontend_url.txt | tr -d '\n\r' | xargs)
echo "Web URL from makefile: '$WEB_URL'"
fi
@@ -248,7 +249,7 @@ jobs:
# Set outputs
if [ -n "$WEB_URL" ] && [ "$WEB_URL" != "null" ] && [ "$WEB_URL" != "" ]; then
echo "web_url=$WEB_URL" >> $GITHUB_OUTPUT
- echo "WEB_WEBSITE_URL=$WEB_URL" >> $GITHUB_ENV
+ echo "FRONTEND_WEBSITE_URL=$WEB_URL" >> $GITHUB_ENV
echo "✅ Web URL: $WEB_URL"
else
echo "web_url=" >> $GITHUB_OUTPUT
@@ -272,17 +273,15 @@ jobs:
- name: Display URLs
run: |
- echo "Web URL: ${{ env.WEB_WEBSITE_URL }}"
+ echo "Web URL: ${{ env.FRONTEND_WEBSITE_URL }}"
echo "Admin URL: ${{ env.ADMIN_WEBSITE_URL }}"
- echo "web_url=$WEB_URL" >> $GITHUB_OUTPUT
- echo "admin_url=$ADMIN_URL" >> $GITHUB_OUTPUT
- name: Disable Authentication with Script
run: |
chmod +x scripts/disable_auth.sh
./scripts/disable_auth.sh
env:
- FRONTEND_WEBSITE_URL: ${{ env.WEB_WEBSITE_URL }}
+ FRONTEND_WEBSITE_URL: ${{ env.FRONTEND_WEBSITE_URL }}
ADMIN_WEBSITE_URL: ${{ env.ADMIN_WEBSITE_URL }}
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
@@ -380,8 +379,8 @@ jobs:
echo "DEPLOYMENT_SUCCESS=true" >> $GITHUB_OUTPUT
- - name: Wait for 5 minutes for propagation
- run: sleep 300
+ - name: Wait for 25 minutes for propagation
+ run: sleep 1500
e2e-test:
@@ -434,6 +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
diff --git a/tests/e2e-test/tests/test_chat_with_your_data.py b/tests/e2e-test/tests/test_chat_with_your_data.py
index c8f860f69..bb8245822 100644
--- a/tests/e2e-test/tests/test_chat_with_your_data.py
+++ b/tests/e2e-test/tests/test_chat_with_your_data.py
@@ -23,7 +23,7 @@ def validate_admin_page_loaded(page, admin_page, home_page):
def validate_files_are_uploaded(page, admin_page, home_page):
admin_page.click_delete_data_tab()
- page.wait_for_timeout(5000)
+ page.wait_for_timeout(20000)
checkbox_count = page.locator(admin_page.DELETE_CHECK_BOXES).count()
assert checkbox_count >= 1, "No files available to delete"
From 39029c5d34ee4633544f7f0d52ffdacb01b4e202 Mon Sep 17 00:00:00 2001
From: Priyanka-Microsoft
Date: Tue, 11 Nov 2025 16:16:46 +0530
Subject: [PATCH 2/2] Upgrade Poetry to Latest Version
---
.devcontainer/setupEnv.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.devcontainer/setupEnv.sh b/.devcontainer/setupEnv.sh
index 7aa1b20fa..9492623cf 100755
--- a/.devcontainer/setupEnv.sh
+++ b/.devcontainer/setupEnv.sh
@@ -2,10 +2,10 @@
pip install --upgrade pip
-pip install poetry
+pip install --upgrade poetry
# https://pypi.org/project/poetry-plugin-export/
-pip install poetry-plugin-export
+pip install --upgrade poetry-plugin-export
poetry env use python3.11