Skip to content

Commit 681562f

Browse files
AjitPadhi-Microsoftdependabot[bot]Roopan-MicrosoftPavan-MicrosoftPrasanjeet-Microsoft
authored
chore: Dev to depenabotchanges update (#2175)
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Roopan P M <v-roopanpm@microsoft.com> Co-authored-by: Roopan-Microsoft <168007406+Roopan-Microsoft@users.noreply.github.com> Co-authored-by: Pavan-Microsoft <v-kupavan@microsoft.com> Co-authored-by: Prasanjeet-Microsoft <v-singhprasa@microsoft.com> Co-authored-by: Harmanpreet Kaur <v-harmanpkau@microsoft.com> Co-authored-by: Harmanpreet-Microsoft <v-harmanprka@microsoft.com> Co-authored-by: Ross Smith <ross-p-smith@users.noreply.github.com> Co-authored-by: gpickett <122489228+gpickett@users.noreply.github.com> Co-authored-by: Francia Riesco <friesco@microsoft.com> Co-authored-by: Francia Riesco <Fr4nc3@users.noreply.github.com> Co-authored-by: Prajwal D C <v-dcprajwal@microsoft.com> Co-authored-by: UtkarshMishra-Microsoft <v-utkamishra@microsoft.com> Co-authored-by: Priyanka-Microsoft <v-prisinghal@microsoft.com> Co-authored-by: Kiran-Siluveru-Microsoft <v-ksiluveru@microsoft.com> Co-authored-by: Prashant-Microsoft <v-pmalusare@microsoft.com> Co-authored-by: Rohini-Microsoft <v-rwalunj@microsoft.com> Co-authored-by: Avijit-Microsoft <v-aghorui@microsoft.com> Co-authored-by: RaviKiran-Microsoft <v-ravikirans@microsoft.com> Co-authored-by: Somesh Joshi <v-somejoshi@microsoft.com> Co-authored-by: Himanshi Agrawal <v-himagrawal@microsoft.com> Co-authored-by: pradeepjha-microsoft <v-pradeepjha@microsoft.com> Co-authored-by: Bangarraju-Microsoft <v-golib@microsoft.com> Co-authored-by: Harsh-Microsoft <v-hbangera@microsoft.com> Co-authored-by: Kanchan-Microsoft <v-knagshetti@microsoft.com> Co-authored-by: Cristopher Coronado <cristofima@hotmail.com> Co-authored-by: Cristopher Coronado Moreira <crcorona@pichincha.com> Co-authored-by: Vamshi-Microsoft <v-vamolla@microsoft.com> Co-authored-by: Thanusree-Microsoft <168087422+Thanusree-Microsoft@users.noreply.github.com> Co-authored-by: Niraj Chaudhari (Persistent Systems Inc) <v-nirajcha@microsoft.com> Co-authored-by: Rohini-Microsoft <168007985+Rohini-Microsoft@users.noreply.github.com> Co-authored-by: Ragini-Microsoft <v-raginich@microsoft.com> Co-authored-by: Rafi-Microsoft <v-rafmd@microsoft.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Atulku-Microsoft <v-atulku@microsoft.com> Co-authored-by: Kingshuk-Microsoft <v-kidatta@microsoft.com> Co-authored-by: Ayaz-Microsoft <v-ayazkhan@microsoft.com> Co-authored-by: Abdul-Microsoft <v-amujeebta@microsoft.com> Co-authored-by: Prekshith-Microsoft <v-pdj@microsoft.com> Co-authored-by: Akhileswara-Microsoft <v-golnaidu@microsoft.com> Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent c1b3a07 commit 681562f

59 files changed

Lines changed: 3720 additions & 2978 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env.sample

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ AZURE_OPENAI_RESOURCE=
2727
AZURE_OPENAI_API_KEY=
2828
AZURE_OPENAI_MODEL=gpt-4o
2929
AZURE_OPENAI_MODEL_NAME=gpt-4o
30-
AZURE_OPENAI_EMBEDDING_MODEL=text-embedding-ada-002
30+
AZURE_OPENAI_EMBEDDING_MODEL=text-embedding-3-small
3131
AZURE_OPENAI_TEMPERATURE=0
3232
AZURE_OPENAI_TOP_P=1.0
3333
AZURE_OPENAI_MAX_TOKENS=1000

.github/workflows/broken-links-checker.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: Broken Link Checker
22

33
on:
44
pull_request:
5+
paths:
6+
- '**/*.md'
7+
- '.github/workflows/broken-links-checker.yml'
58
workflow_dispatch:
69

710
permissions:

.github/workflows/build-docker-images.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@ on:
1111
- main
1212
- dev
1313
- demo
14+
paths:
15+
- 'code/**'
16+
- '!code/tests/**'
17+
- 'docker/**'
18+
- 'package.json'
19+
- 'pyproject.toml'
20+
- '.github/workflows/build-docker-images.yml'
21+
- '.github/workflows/build-docker.yml'
1422
types:
1523
- opened
1624
- ready_for_review

.github/workflows/import-sample-data-cosmosdb.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,82 @@ jobs:
112112
echo "SAMPLE_DATA_DIR=$SAMPLE_DATA_DIR" >> $GITHUB_ENV
113113
echo "✅ Sample data files downloaded to $SAMPLE_DATA_DIR"
114114
115+
- name: Login to Azure for Sample Data Download
116+
uses: azure/login@v2
117+
with:
118+
client-id: ${{ secrets.AZURE_CLIENT_ID }}
119+
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
120+
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
121+
122+
- name: Enable Public Access on Sample Data Storage (if disabled)
123+
id: sample_storage_access
124+
shell: bash
125+
env:
126+
STORAGE_ACCOUNT_NAME: ${{ vars.SAMPLE_DATA_STORAGE_ACCOUNT_NAME }}
127+
run: |
128+
echo "🔍 Checking public network access on sample data storage account '${STORAGE_ACCOUNT_NAME}'..."
129+
130+
# Discover the resource group for the sample data storage account
131+
SAMPLE_STORAGE_RG=$(az storage account list --query "[?name=='${STORAGE_ACCOUNT_NAME}'].resourceGroup | [0]" -o tsv)
132+
if [ -z "$SAMPLE_STORAGE_RG" ] || [ "$SAMPLE_STORAGE_RG" == "null" ]; then
133+
echo "❌ Could not find resource group for storage account '${STORAGE_ACCOUNT_NAME}'."
134+
exit 1
135+
fi
136+
echo "SAMPLE_STORAGE_RG=$SAMPLE_STORAGE_RG" >> $GITHUB_ENV
137+
echo "SAMPLE_STORAGE_RG=$SAMPLE_STORAGE_RG" >> $GITHUB_OUTPUT
138+
139+
CURRENT_ACCESS=$(az storage account show --name "$STORAGE_ACCOUNT_NAME" --resource-group "$SAMPLE_STORAGE_RG" --query "publicNetworkAccess" -o tsv)
140+
CURRENT_DEFAULT_ACTION=$(az storage account show --name "$STORAGE_ACCOUNT_NAME" --resource-group "$SAMPLE_STORAGE_RG" --query "networkRuleSet.defaultAction" -o tsv)
141+
142+
echo " Current publicNetworkAccess: $CURRENT_ACCESS"
143+
echo " Current defaultAction: $CURRENT_DEFAULT_ACTION"
144+
145+
NEEDS_RESTORE="false"
146+
if [ "$CURRENT_ACCESS" == "Disabled" ] || [ "$CURRENT_DEFAULT_ACTION" == "Deny" ]; then
147+
echo "🔓 Enabling public access on sample data storage account..."
148+
az storage account update --name "$STORAGE_ACCOUNT_NAME" --resource-group "$SAMPLE_STORAGE_RG" --public-network-access Enabled --output none
149+
az storage account update --name "$STORAGE_ACCOUNT_NAME" --resource-group "$SAMPLE_STORAGE_RG" --default-action Allow --output none
150+
NEEDS_RESTORE="true"
151+
152+
echo "⏳ Waiting 30 seconds for network changes to propagate..."
153+
sleep 30
154+
echo "✅ Public access enabled on sample data storage account."
155+
else
156+
echo "✅ Public access is already enabled."
157+
fi
158+
159+
echo "NEEDS_RESTORE=$NEEDS_RESTORE" >> $GITHUB_ENV
160+
echo "NEEDS_RESTORE=$NEEDS_RESTORE" >> $GITHUB_OUTPUT
161+
echo "ORIGINAL_ACCESS=$CURRENT_ACCESS" >> $GITHUB_ENV
162+
echo "ORIGINAL_DEFAULT_ACTION=$CURRENT_DEFAULT_ACTION" >> $GITHUB_ENV
163+
164+
- name: Download Sample Data from Azure Storage
165+
shell: bash
166+
env:
167+
STORAGE_ACCOUNT_NAME: ${{ vars.SAMPLE_DATA_STORAGE_ACCOUNT_NAME }}
168+
STORAGE_CONTAINER_NAME: ${{ vars.SAMPLE_DATA_STORAGE_CONTAINER_NAME }}
169+
run: |
170+
SAMPLE_DATA_DIR="${RUNNER_TEMP}/sample-data"
171+
mkdir -p "$SAMPLE_DATA_DIR"
172+
173+
echo "📥 Downloading sample data files from storage account '${STORAGE_ACCOUNT_NAME}'..."
174+
az storage blob download \
175+
--account-name "$STORAGE_ACCOUNT_NAME" \
176+
--container-name "$STORAGE_CONTAINER_NAME" \
177+
--name "azure_search_data.json" \
178+
--file "$SAMPLE_DATA_DIR/azure_search_data.json" \
179+
--auth-mode login
180+
181+
az storage blob download \
182+
--account-name "$STORAGE_ACCOUNT_NAME" \
183+
--container-name "$STORAGE_CONTAINER_NAME" \
184+
--name "azure_search_data_UseVectorization_SemanticSearch.json" \
185+
--file "$SAMPLE_DATA_DIR/azure_search_data_UseVectorization_SemanticSearch.json" \
186+
--auth-mode login
187+
188+
echo "SAMPLE_DATA_DIR=$SAMPLE_DATA_DIR" >> $GITHUB_ENV
189+
echo "✅ Sample data files downloaded to $SAMPLE_DATA_DIR"
190+
115191
- name: Validate Workflow Input Parameters
116192
shell: bash
117193
env:

.github/workflows/import-sample-data-postgresql.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,67 @@ jobs:
9797
echo "SAMPLE_DATA_DIR=$SAMPLE_DATA_DIR" >> $GITHUB_ENV
9898
echo "✅ Sample data file downloaded to $SAMPLE_DATA_DIR"
9999
100+
- name: Login to Azure for Sample Data Download
101+
uses: azure/login@v2
102+
with:
103+
client-id: ${{ secrets.AZURE_CLIENT_ID }}
104+
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
105+
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
106+
107+
- name: Enable Public Access on Sample Data Storage (if disabled)
108+
id: sample_storage_access
109+
shell: bash
110+
env:
111+
STORAGE_ACCOUNT_NAME: ${{ vars.SAMPLE_DATA_STORAGE_ACCOUNT_NAME }}
112+
run: |
113+
echo "🔍 Checking public network access on sample data storage account '${STORAGE_ACCOUNT_NAME}'..."
114+
115+
# Discover the resource group for the sample data storage account
116+
SAMPLE_STORAGE_RG=$(az storage account list --query "[?name=='${STORAGE_ACCOUNT_NAME}'].resourceGroup | [0]" -o tsv)
117+
if [ -z "$SAMPLE_STORAGE_RG" ] || [ "$SAMPLE_STORAGE_RG" == "null" ]; then
118+
echo "❌ Could not find resource group for storage account '${STORAGE_ACCOUNT_NAME}'."
119+
exit 1
120+
fi
121+
echo "SAMPLE_STORAGE_RG=$SAMPLE_STORAGE_RG" >> $GITHUB_ENV
122+
123+
CURRENT_ACCESS=$(az storage account show --name "$STORAGE_ACCOUNT_NAME" --resource-group "$SAMPLE_STORAGE_RG" --query "publicNetworkAccess" -o tsv)
124+
CURRENT_DEFAULT_ACTION=$(az storage account show --name "$STORAGE_ACCOUNT_NAME" --resource-group "$SAMPLE_STORAGE_RG" --query "networkRuleSet.defaultAction" -o tsv)
125+
126+
echo " Current publicNetworkAccess: $CURRENT_ACCESS"
127+
echo " Current defaultAction: $CURRENT_DEFAULT_ACTION"
128+
129+
if [ "$CURRENT_ACCESS" == "Disabled" ] || [ "$CURRENT_DEFAULT_ACTION" == "Deny" ]; then
130+
echo "🔓 Enabling public access on sample data storage account..."
131+
az storage account update --name "$STORAGE_ACCOUNT_NAME" --resource-group "$SAMPLE_STORAGE_RG" --public-network-access Enabled --output none
132+
az storage account update --name "$STORAGE_ACCOUNT_NAME" --resource-group "$SAMPLE_STORAGE_RG" --default-action Allow --output none
133+
134+
echo "⏳ Waiting 30 seconds for network changes to propagate..."
135+
sleep 30
136+
echo "✅ Public access enabled on sample data storage account."
137+
else
138+
echo "✅ Public access is already enabled."
139+
fi
140+
141+
- name: Download Sample Data from Azure Storage
142+
shell: bash
143+
env:
144+
STORAGE_ACCOUNT_NAME: ${{ vars.SAMPLE_DATA_STORAGE_ACCOUNT_NAME }}
145+
STORAGE_CONTAINER_NAME: ${{ vars.SAMPLE_DATA_STORAGE_CONTAINER_NAME }}
146+
run: |
147+
SAMPLE_DATA_DIR="${RUNNER_TEMP}/sample-data"
148+
mkdir -p "$SAMPLE_DATA_DIR"
149+
150+
echo "📥 Downloading sample data file from storage account '${STORAGE_ACCOUNT_NAME}'..."
151+
az storage blob download \
152+
--account-name "$STORAGE_ACCOUNT_NAME" \
153+
--container-name "$STORAGE_CONTAINER_NAME" \
154+
--name "exported_data_vector_score.csv" \
155+
--file "$SAMPLE_DATA_DIR/exported_data_vector_score.csv" \
156+
--auth-mode login
157+
158+
echo "SAMPLE_DATA_DIR=$SAMPLE_DATA_DIR" >> $GITHUB_ENV
159+
echo "✅ Sample data file downloaded to $SAMPLE_DATA_DIR"
160+
100161
- name: Validate Workflow Input Parameters
101162
shell: bash
102163
env:

.github/workflows/job-deploy.yml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -557,13 +557,25 @@ jobs:
557557
DATABASE_TYPE: ${{ inputs.DATABASE_TYPE }}
558558
secrets: inherit
559559

560+
# Run post-deployment setup (Function App client key + PostgreSQL tables)
561+
post-deployment-setup:
562+
needs: [azure-setup, deploy-linux, deploy-windows]
563+
if: |
564+
always() &&
565+
(needs.deploy-linux.result == 'success' || needs.deploy-windows.result == 'success')
566+
uses: ./.github/workflows/job-post-deployment-setup.yml
567+
with:
568+
RESOURCE_GROUP_NAME: ${{ needs.azure-setup.outputs.RESOURCE_GROUP_NAME }}
569+
secrets: inherit
570+
560571
# Call PostgreSQL setup workflow when DATABASE_TYPE is PostgreSQL
561572
import-sample-data-postgresql:
562-
needs: [azure-setup, deploy-linux, deploy-windows]
573+
needs: [azure-setup, deploy-linux, deploy-windows, post-deployment-setup]
563574
if: |
564575
always() &&
565576
inputs.DATABASE_TYPE == 'PostgreSQL' &&
566-
(needs.deploy-linux.result == 'success' || needs.deploy-windows.result == 'success')
577+
(needs.deploy-linux.result == 'success' || needs.deploy-windows.result == 'success') &&
578+
needs.post-deployment-setup.result == 'success'
567579
uses: ./.github/workflows/import-sample-data-postgresql.yml
568580
with:
569581
RESOURCE_GROUP_NAME: ${{ needs.azure-setup.outputs.RESOURCE_GROUP_NAME }}
@@ -572,11 +584,12 @@ jobs:
572584

573585
# Call CosmosDB/Azure Search setup workflow when DATABASE_TYPE is CosmosDB
574586
import-sample-data-cosmosdb:
575-
needs: [azure-setup, deploy-linux, deploy-windows]
587+
needs: [azure-setup, deploy-linux, deploy-windows, post-deployment-setup]
576588
if: |
577589
always() &&
578590
inputs.DATABASE_TYPE == 'CosmosDB' &&
579-
(needs.deploy-linux.result == 'success' || needs.deploy-windows.result == 'success')
591+
(needs.deploy-linux.result == 'success' || needs.deploy-windows.result == 'success') &&
592+
needs.post-deployment-setup.result == 'success'
580593
uses: ./.github/workflows/import-sample-data-cosmosdb.yml
581594
with:
582595
RESOURCE_GROUP_NAME: ${{ needs.azure-setup.outputs.RESOURCE_GROUP_NAME }}
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
name: Post-Deployment Setup
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
RESOURCE_GROUP_NAME:
7+
description: 'Azure Resource Group name'
8+
required: true
9+
type: string
10+
workflow_call:
11+
inputs:
12+
RESOURCE_GROUP_NAME:
13+
description: 'Azure Resource Group name'
14+
required: true
15+
type: string
16+
17+
permissions:
18+
id-token: write
19+
contents: read
20+
21+
jobs:
22+
post-deployment-setup:
23+
runs-on: ubuntu-latest
24+
environment: production
25+
steps:
26+
- name: Checkout Code
27+
uses: actions/checkout@v4
28+
29+
- name: Login to Azure
30+
uses: azure/login@v2
31+
with:
32+
client-id: ${{ secrets.AZURE_CLIENT_ID }}
33+
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
34+
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
35+
36+
- name: Setup Python
37+
uses: actions/setup-python@v5
38+
with:
39+
python-version: '3.11'
40+
41+
- name: Install Python Dependencies
42+
shell: bash
43+
run: |
44+
pip install psycopg2-binary azure-identity
45+
46+
- name: Run Post-Deployment Setup (Attempt 1)
47+
id: setup1
48+
shell: bash
49+
env:
50+
RESOURCE_GROUP: ${{ inputs.RESOURCE_GROUP_NAME }}
51+
run: |
52+
chmod +x scripts/post_deployment_setup.sh
53+
bash scripts/post_deployment_setup.sh "$RESOURCE_GROUP"
54+
continue-on-error: true
55+
56+
- name: Wait 20 seconds before retry
57+
if: ${{ steps.setup1.outcome == 'failure' }}
58+
shell: bash
59+
run: sleep 20s
60+
61+
- name: Run Post-Deployment Setup (Attempt 2)
62+
id: setup2
63+
if: ${{ steps.setup1.outcome == 'failure' }}
64+
shell: bash
65+
env:
66+
RESOURCE_GROUP: ${{ inputs.RESOURCE_GROUP_NAME }}
67+
run: |
68+
chmod +x scripts/post_deployment_setup.sh
69+
bash scripts/post_deployment_setup.sh "$RESOURCE_GROUP"
70+
continue-on-error: true
71+
72+
- name: Wait 40 seconds before final retry
73+
if: ${{ steps.setup2.outcome == 'failure' }}
74+
shell: bash
75+
run: sleep 40s
76+
77+
- name: Run Post-Deployment Setup (Attempt 3)
78+
id: setup3
79+
if: ${{ steps.setup2.outcome == 'failure' }}
80+
shell: bash
81+
env:
82+
RESOURCE_GROUP: ${{ inputs.RESOURCE_GROUP_NAME }}
83+
run: |
84+
chmod +x scripts/post_deployment_setup.sh
85+
bash scripts/post_deployment_setup.sh "$RESOURCE_GROUP"
86+
87+
- name: Generate Post-Deployment Summary
88+
if: always()
89+
shell: bash
90+
run: |
91+
echo "## 🔧 Post-Deployment Setup Summary" >> $GITHUB_STEP_SUMMARY
92+
echo "" >> $GITHUB_STEP_SUMMARY
93+
echo "| Field | Value |" >> $GITHUB_STEP_SUMMARY
94+
echo "|-------|--------|" >> $GITHUB_STEP_SUMMARY
95+
echo "| **Job Status** | ${{ job.status == 'success' && '✅ Success' || '❌ Failed' }} |" >> $GITHUB_STEP_SUMMARY
96+
echo "| **Resource Group** | \`${{ inputs.RESOURCE_GROUP_NAME }}\` |" >> $GITHUB_STEP_SUMMARY
97+
98+
- name: Logout from Azure
99+
if: always()
100+
shell: bash
101+
run: |
102+
az logout || true
103+
echo "Logged out from Azure."

.github/workflows/tests.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ on:
1212
- '.github/workflows/tests.yml'
1313
pull_request:
1414
branches: [main, dev, demo]
15+
paths:
16+
- 'code/**'
17+
- 'pyproject.toml'
18+
- 'package.json'
19+
- 'pytest.ini'
20+
- '.github/workflows/tests.yml'
1521
types:
1622
- opened
1723
- ready_for_review

0 commit comments

Comments
 (0)