Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
dda710a
fix: fixed CodQL issues for Container Migration.
VishalS-Microsoft Apr 29, 2026
8a0ae2b
Add unit tests for backend-api
Shreyas-Microsoft Apr 29, 2026
362ac1f
add asyncio package
Shreyas-Microsoft Apr 29, 2026
98ee6f2
Add processor tests
Shreyas-Microsoft Apr 29, 2026
431830e
update failing tests
Shreyas-Microsoft Apr 29, 2026
3bbe8e8
add more coverage to processor
Shreyas-Microsoft Apr 29, 2026
82d8bc6
fix telemetry test
Shreyas-Microsoft Apr 29, 2026
cccde5f
fix copilot comments and pylint
Shreyas-Microsoft Apr 30, 2026
5174d50
Merge branch 'dev' into psl-codequlity-cmv2
VishalS-Microsoft May 4, 2026
20ed057
resloved copoilot comments
VishalS-Microsoft May 5, 2026
ac67769
Format changes
NirajC-Microsoft May 5, 2026
1594df3
Format changes 2
NirajC-Microsoft May 5, 2026
e1907d9
Format changes 2
NirajC-Microsoft May 5, 2026
1cd7ee1
Format changes 3
NirajC-Microsoft May 5, 2026
7474d9f
docs: add Bicep CLI prerequisite to local deployment guide
Rafi-Microsoft May 6, 2026
ba5e413
Refactor code structure for improved readability and maintainability
Dhanushree-Microsoft May 6, 2026
a9c7a80
Potential fix for pull request finding
Dhanushree-Microsoft May 6, 2026
97c4dce
Potential fix for pull request finding
Dhanushree-Microsoft May 6, 2026
8477b3e
Merge branch 'dev' into psl-codequlity-cmv2
VishalS-Microsoft May 6, 2026
f78da57
Update email format 7
NirajC-Microsoft May 7, 2026
f4405cd
Update email format 5
NirajC-Microsoft May 7, 2026
c4ac793
Update email format 8
NirajC-Microsoft May 7, 2026
f9b4b68
Merge pull request #210 from microsoft/psl-codequlity-cmv2
Roopan-Microsoft May 7, 2026
6ae8b02
Merge pull request #222 from microsoft/con-mig-depdh
Roopan-Microsoft May 7, 2026
3552f12
Merge pull request #221 from microsoft/psl-addBicepVer
Roopan-Microsoft May 7, 2026
62dc496
Merge branch 'dev' into psl-unit-testing
Shreyas-Microsoft May 8, 2026
829c51b
ci: simplify coverage comment to badge + total + test summary
Shreyas-Microsoft May 8, 2026
3ecc13d
ci: restore coverage report dropdown in PR comment
Shreyas-Microsoft May 8, 2026
2607649
Add tags to prevent SFI W18 Policy violation
NirajC-Microsoft May 8, 2026
775c5e8
ci: strip per-file details from coverage XML for clean PR comment
Shreyas-Microsoft May 8, 2026
ebd74d3
Merge pull request #228 from NirajC-Microsoft/dev
Roopan-Microsoft May 8, 2026
6136880
Merge branch 'main' into psl-main-mergedown-dev
Shreyas-Microsoft May 8, 2026
0fb1737
ci: use text coverage summary for TOTAL-only report dropdown
Shreyas-Microsoft May 8, 2026
2ac4a94
Merge pull request #231 from microsoft/psl-main-mergedown-dev
Roopan-Microsoft May 8, 2026
0810e83
fix: address PR review comments
Shreyas-Microsoft May 8, 2026
63642b6
ci: match reference repo coverage comment format
Shreyas-Microsoft May 8, 2026
d86bcdc
pushing test.yml
Shreyas-Microsoft May 8, 2026
6f0a5b0
test: lift coverage above 82% gate for processor and backend-api
Shreyas-Microsoft May 8, 2026
289fbcc
Update tags to avoid SFI W18 fix violation
NirajC-Microsoft May 8, 2026
ccca218
Add tag parameter
NirajC-Microsoft May 8, 2026
5e52ad9
Merge pull request #230 from microsoft/psl-SFIW18
Roopan-Microsoft May 8, 2026
094f7ac
fix: fixed all copilot comments
VishalS-Microsoft May 11, 2026
6b3dce7
Merge pull request #234 from microsoft/psl-fixcopilotcomments-cm
Roopan-Microsoft May 11, 2026
70bdb85
Merge pull request #229 from microsoft/dev
Prajwal-Microsoft May 11, 2026
5457838
test: address Copilot review feedback (PR #211)
Shreyas-Microsoft May 12, 2026
7d45874
test: address Copilot review feedback on test hygiene
Shreyas-Microsoft May 12, 2026
3cd1758
test: fix flake8 E305 in test_sk_logic_base.py
Shreyas-Microsoft May 12, 2026
f42b4f3
fix(infra): remove enableAnalyticalStorage on Cosmos DB account creation
Shreyas-Microsoft May 13, 2026
762f7b7
fix: upgrade vulnerable dependencies (urllib3, python-multipart, auth…
Dhanushree-Microsoft May 14, 2026
4ff9c0f
Merge pull request #211 from microsoft/psl-unit-testing
Roopan-Microsoft May 14, 2026
dd2da35
chore(infra): rebuild main.json with bicep 0.43.8 (restore version)
Shreyas-Microsoft May 14, 2026
0f6b68e
Merge pull request #239 from microsoft/psl-sw/fix-cosmos-analytical-s…
Roopan-Microsoft May 14, 2026
b39d10e
fix: add name/version/private to processor package.json to align with…
Dhanushree-Microsoft May 15, 2026
1960de3
fix: pin override-dependencies to exact versions in processor pyproje…
Dhanushree-Microsoft May 15, 2026
5b6f6fa
Merge pull request #241 from microsoft/con-migdhmoh
Roopan-Microsoft May 15, 2026
299a2d6
Updated Foundry Roles name
AjitPadhi-Microsoft May 18, 2026
222b22c
test: resolve PR #242 review comments
Shreyas-Microsoft May 18, 2026
89b2064
Merge pull request #243 from microsoft/psl-sw/pr242-resolve-comments
Roopan-Microsoft May 18, 2026
13eae9f
chore(tests): drop unused imports flagged on PR #242
Shreyas-Microsoft May 19, 2026
9dab2e4
ci(test.yml): trigger on uv.lock changes (PR #242 feedback)
Shreyas-Microsoft May 19, 2026
3dfa183
fix(processor): retry 'model produced invalid content' and bump Resul…
Shreyas-Microsoft May 18, 2026
a6920d4
Merge pull request #246 from microsoft/PSL-US-43670
Prajwal-Microsoft May 19, 2026
5a0efca
Merge pull request #248 from microsoft/psl-sw/43771-design-fix-from-main
Roopan-Microsoft May 19, 2026
a587917
Merge pull request #247 from microsoft/psl-sw/pr242-import-cleanup
Roopan-Microsoft May 20, 2026
5a8447d
Merge pull request #252 from microsoft/chore/sync-main-into-dev-2026-…
Roopan-Microsoft May 20, 2026
2870a21
chore: Dev merge to Main
Avijit-Microsoft May 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
108 changes: 105 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ on:
paths:
- 'src/backend-api/**/*.py'
- 'src/backend-api/pyproject.toml'
- 'src/backend-api/uv.lock'
- 'src/backend-api/pytest.ini'
- 'src/processor/**/*.py'
- 'src/processor/pyproject.toml'
- 'src/processor/uv.lock'
- '.github/workflows/test.yml'
pull_request:
types:
Expand All @@ -22,7 +26,11 @@ on:
paths:
- 'src/backend-api/**/*.py'
- 'src/backend-api/pyproject.toml'
- 'src/backend-api/uv.lock'
- 'src/backend-api/pytest.ini'
- 'src/processor/**/*.py'
- 'src/processor/pyproject.toml'
- 'src/processor/uv.lock'
- '.github/workflows/test.yml'

permissions:
Expand All @@ -36,10 +44,10 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v5
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v6
uses: actions/setup-python@v5
with:
python-version: "3.12"

Expand All @@ -48,7 +56,7 @@ jobs:
python -m pip install --upgrade pip
cd src/backend-api
pip install -e .
pip install pytest pytest-cov
pip install pytest pytest-cov pytest-asyncio

- name: Check if Backend Test Files Exist
id: check_backend_tests
Expand All @@ -71,9 +79,26 @@ jobs:
--cov=src/app \
--cov-report=term-missing \
--cov-report=xml:reports/coverage.xml \
--cov-fail-under=82 \
--junitxml=pytest.xml \
-v

- name: Prefix coverage XML filenames with repo-root path
if: env.skip_backend_tests == 'false'
run: |
python <<'PY'
import xml.etree.ElementTree as ET
path = "src/backend-api/reports/coverage.xml"
prefix = "src/backend-api/src/app/"
tree = ET.parse(path)
root = tree.getroot()
for cls in root.iter("class"):
fname = cls.attrib.get("filename", "")
if fname and not fname.startswith(prefix):
cls.attrib["filename"] = prefix + fname
tree.write(path, xml_declaration=True, encoding="utf-8")
Comment thread
Shreyas-Microsoft marked this conversation as resolved.
PY

- name: Pytest Coverage Comment
if: |
always() &&
Expand All @@ -90,3 +115,80 @@ jobs:
if: env.skip_backend_tests == 'true'
run: |
echo "Skipping backend tests because no test files were found."

processor_tests:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install Processor Dependencies
run: |
python -m pip install --upgrade pip
cd src/processor
pip install -e .
pip install pytest pytest-cov pytest-asyncio

- name: Check if Processor Test Files Exist
id: check_processor_tests
run: |
if [ -z "$(find src/processor/src/tests -type f -name 'test_*.py' 2>/dev/null)" ]; then
echo "No processor test files found, skipping processor tests."
echo "skip_processor_tests=true" >> $GITHUB_ENV
else
echo "Processor test files found, running tests."
echo "skip_processor_tests=false" >> $GITHUB_ENV
fi

- name: Run Processor Tests with Coverage
if: env.skip_processor_tests == 'false'
run: |
cd src/processor
pytest src/tests \
--cov=src \
--cov-report=term-missing \
--cov-report=xml:reports/coverage.xml \
--cov-fail-under=82 \
--junitxml=pytest.xml \
-v

- name: Prefix coverage XML filenames with repo-root path
if: env.skip_processor_tests == 'false'
run: |
python <<'PY'
import xml.etree.ElementTree as ET
path = "src/processor/reports/coverage.xml"
prefix = "src/processor/src/"
tree = ET.parse(path)
root = tree.getroot()
for cls in root.iter("class"):
fname = cls.attrib.get("filename", "")
if fname and not fname.startswith(prefix):
cls.attrib["filename"] = prefix + fname
tree.write(path, xml_declaration=True, encoding="utf-8")
Comment thread
Shreyas-Microsoft marked this conversation as resolved.
PY

- name: Pytest Coverage Comment (Processor)
if: |
always() &&
github.event_name == 'pull_request' &&
github.event.pull_request.head.repo.fork == false &&
env.skip_processor_tests == 'false'
uses: MishaKav/pytest-coverage-comment@26f986d2599c288bb62f623d29c2da98609e9cd4 # v1.6.0
with:
pytest-xml-coverage-path: src/processor/reports/coverage.xml
junitxml-path: src/processor/pytest.xml
title: Processor Coverage Report
unique-id-for-comment: processor
report-only-changed-files: true

- name: Skip Processor Tests
if: env.skip_processor_tests == 'true'
run: |
echo "Skipping processor tests because no test files were found."
30 changes: 15 additions & 15 deletions .github/workflows/validate-bicep-params.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,16 @@ jobs:
- name: Validate infra/ parameters
id: validate_infra
continue-on-error: true
env:
ACCELERATOR_NAME: ${{ env.accelerator_name }}
run: |
set +e
python scripts/validate_bicep_params.py --dir infra --strict --no-color --json-output infra_results.json 2>&1 | tee infra_output.txt
RUN_URL="https://github.com/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}"
python scripts/validate_bicep_params.py --dir infra --strict --no-color \
--json-output infra_results.json \
--html-output email_body.html \
--accelerator-name "${ACCELERATOR_NAME}" \
--run-url "${RUN_URL}" 2>&1 | tee infra_output.txt
EXIT_CODE=${PIPESTATUS[0]}
set -e
echo "## Infra Param Validation" >> "$GITHUB_STEP_SUMMARY"
Expand All @@ -61,24 +68,21 @@ jobs:
name: bicep-validation-results
path: |
infra_results.json
email_body.html
retention-days: 30

- name: Send schedule notification on failure
if: github.event_name == 'schedule' && steps.result.outputs.status == 'failure'
env:
LOGICAPP_URL: ${{ secrets.EMAILNOTIFICATION_LOGICAPP_URL_TA }}
GITHUB_REPOSITORY: ${{ github.repository }}
GITHUB_RUN_ID: ${{ github.run_id }}
ACCELERATOR_NAME: ${{ env.accelerator_name }}
run: |
RUN_URL="https://github.com/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}"
INFRA_OUTPUT=$(sed 's/&/\&amp;/g; s/</\&lt;/g; s/>/\&gt;/g' infra_output.txt)
EMAIL_BODY=$(cat email_body.html)

jq -n \
--arg name "${ACCELERATOR_NAME}" \
--arg infra "$INFRA_OUTPUT" \
--arg url "$RUN_URL" \
'{subject: ("Bicep Parameter Validation Report - " + $name + " - Issues Detected"), body: ("<p>Dear Team,</p><p>The scheduled <strong>Bicep Parameter Validation</strong> for <strong>" + $name + "</strong> has detected parameter mapping errors.</p><p><strong>infra/ Results:</strong></p><pre>" + $infra + "</pre><p><strong>Run URL:</strong> <a href=\"" + $url + "\">" + $url + "</a></p><p>Please fix the parameter mapping issues at your earliest convenience.</p><p>Best regards,<br>Your Automation Team</p>")}' \
--arg body "$EMAIL_BODY" \
'{subject: ("Bicep Parameter Validation Report - " + $name + " - Issues Detected"), body: $body}' \
| curl -X POST "${LOGICAPP_URL}" \
-H "Content-Type: application/json" \
-d @- || echo "Failed to send notification"
Expand All @@ -87,18 +91,14 @@ jobs:
if: github.event_name == 'schedule' && steps.result.outputs.status == 'success'
env:
LOGICAPP_URL: ${{ secrets.EMAILNOTIFICATION_LOGICAPP_URL_TA }}
GITHUB_REPOSITORY: ${{ github.repository }}
GITHUB_RUN_ID: ${{ github.run_id }}
ACCELERATOR_NAME: ${{ env.accelerator_name }}
run: |
RUN_URL="https://github.com/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}"
INFRA_OUTPUT=$(sed 's/&/\&amp;/g; s/</\&lt;/g; s/>/\&gt;/g' infra_output.txt)
EMAIL_BODY=$(cat email_body.html)

jq -n \
--arg name "${ACCELERATOR_NAME}" \
--arg infra "$INFRA_OUTPUT" \
--arg url "$RUN_URL" \
'{subject: ("Bicep Parameter Validation Report - " + $name + " - Passed"), body: ("<p>Dear Team,</p><p>The scheduled <strong>Bicep Parameter Validation</strong> for <strong>" + $name + "</strong> has completed successfully. All parameter mappings are valid.</p><p><strong>infra/ Results:</strong></p><pre>" + $infra + "</pre><p><strong>Run URL:</strong> <a href=\"" + $url + "\">" + $url + "</a></p><p>Best regards,<br>Your Automation Team</p>")}' \
--arg body "$EMAIL_BODY" \
'{subject: ("Bicep Parameter Validation Report - " + $name + " - Passed"), body: $body}' \
| curl -X POST "${LOGICAPP_URL}" \
-H "Content-Type: application/json" \
-d @- || echo "Failed to send notification"
Expand Down
1 change: 1 addition & 0 deletions docs/DeploymentGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ Select one of the following options to deploy the Container Migration Solution A
**Required Tools:**
- [PowerShell 7.0+](https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell)
- [Azure Developer CLI (azd) 1.18.0+](https://aka.ms/install-azd)
- [Bicep CLI 0.33.0+](https://learn.microsoft.com/azure/azure-resource-manager/bicep/install)
- [Python 3.9+](https://www.python.org/downloads/)
- [Docker Desktop](https://www.docker.com/products/docker-desktop/)
- [Git](https://git-scm.com/downloads)
Expand Down
8 changes: 7 additions & 1 deletion infra/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -872,7 +872,7 @@ module aiFoundryAiServices 'br/public:avm/res/cognitive-services/account:0.13.2'
principalType: 'ServicePrincipal'
}
{
roleDefinitionIdOrName: '53ca6127-db72-4b80-b1b0-d745d6d5456d' // Azure AI User
roleDefinitionIdOrName: '53ca6127-db72-4b80-b1b0-d745d6d5456d' // Foundry User
principalId: appIdentity.outputs.principalId
principalType: 'ServicePrincipal'
}
Expand Down Expand Up @@ -1123,6 +1123,12 @@ module containerAppsEnvironment 'br/public:avm/res/app/managed-environment:0.11.
params: {
name: 'cae-${solutionSuffix}'
location: location
tags: {
...resourceGroup().tags
...existingTags
...allTags
...tags
}
managedIdentities: { systemAssigned: true }
appLogsConfiguration: enableMonitoring
? {
Expand Down
23 changes: 13 additions & 10 deletions infra/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.43.1.21952",
"templateHash": "1278209883407272359"
"version": "0.43.8.12551",
"templateHash": "13087590133917597872"
}
},
"parameters": {
Expand Down Expand Up @@ -4715,8 +4715,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.43.1.21952",
"templateHash": "4488065934246762087"
"version": "0.43.8.12551",
"templateHash": "4604761290796021104"
}
},
"definitions": {
Expand Down Expand Up @@ -26135,8 +26135,8 @@
},
"dependsOn": [
"appIdentity",
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').storageQueue)]",
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').storageBlob)]",
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').storageQueue)]",
"virtualNetwork"
]
},
Expand Down Expand Up @@ -30103,8 +30103,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.43.1.21952",
"templateHash": "17526785557845507677"
"version": "0.43.8.12551",
"templateHash": "13516349791985095953"
}
},
"definitions": {
Expand Down Expand Up @@ -33853,8 +33853,8 @@
},
"dependsOn": [
"aiFoundryAiServices",
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').openAI)]",
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').cognitiveServices)]",
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').openAI)]",
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').aiServices)]",
"virtualNetwork"
]
Expand Down Expand Up @@ -33892,8 +33892,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.43.1.21952",
"templateHash": "8251376928798842081"
"version": "0.43.8.12551",
"templateHash": "17583277036649944863"
}
},
"parameters": {
Expand Down Expand Up @@ -38362,6 +38362,9 @@
"location": {
"value": "[parameters('location')]"
},
"tags": {
"value": "[shallowMerge(createArray(resourceGroup().tags, variables('existingTags'), variables('allTags'), parameters('tags')))]"
},
"managedIdentities": {
"value": {
"systemAssigned": true
Expand Down
3 changes: 3 additions & 0 deletions infra/main.parameters.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@
},
"imageTag": {
"value": "${AZURE_ENV_IMAGE_TAG}"
},
"tags": {
"value": "${AZURE_ENV_TAGS}"
}
}
}
3 changes: 3 additions & 0 deletions infra/main.waf.parameters.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@
},
"vmSize": {
"value": "${AZURE_ENV_VM_SIZE}"
},
"tags": {
"value": "${AZURE_ENV_TAGS}"
}
}
}
10 changes: 8 additions & 2 deletions infra/main_custom.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,7 @@ module existingAiFoundryAiServicesDeployments 'modules/ai-services-deployments.b
{
principalId: appIdentity.outputs.principalId
principalType: 'ServicePrincipal'
roleDefinitionIdOrName: '53ca6127-db72-4b80-b1b0-d745d6d5456d' // Azure AI User
roleDefinitionIdOrName: '53ca6127-db72-4b80-b1b0-d745d6d5456d' // Foundry User
}
]
}
Expand Down Expand Up @@ -814,7 +814,7 @@ module aiFoundryAiServices 'br/public:avm/res/cognitive-services/account:0.13.2'
principalType: 'ServicePrincipal'
}
{
roleDefinitionIdOrName: '53ca6127-db72-4b80-b1b0-d745d6d5456d' // Azure AI User
roleDefinitionIdOrName: '53ca6127-db72-4b80-b1b0-d745d6d5456d' // Foundry User
principalId: appIdentity.outputs.principalId
principalType: 'ServicePrincipal'
}
Expand Down Expand Up @@ -1076,6 +1076,12 @@ module containerAppsEnvironment 'br/public:avm/res/app/managed-environment:0.11.
params: {
name: 'cae-${solutionSuffix}'
location: location
tags: {
...resourceGroup().tags
...existingTags
...allTags
...tags
}
managedIdentities: { systemAssigned: true }
appLogsConfiguration: enableMonitoring
? {
Expand Down
1 change: 0 additions & 1 deletion infra/modules/cosmosDb.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ module cosmosAccount 'br/public:avm/res/document-db/database-account:0.15.1' = {
name: take('avm.res.document-db.account.${name}', 64)
params: {
name: name
enableAnalyticalStorage: true
location: location
minimumTlsVersion: 'Tls12'
defaultConsistencyLevel: 'Session'
Expand Down
Loading
Loading