Skip to content

Commit baeaa3a

Browse files
Merge remote-tracking branch 'origin/dev' into PSL-US-26408
2 parents 7f4f296 + 71604db commit baeaa3a

33 files changed

+3081
-87
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
# Each line is a file pattern followed by one or more owners.
33

44
# These owners will be the default owners for everything in the repo.
5-
* @toherman-msft @Avijit-Microsoft @Roopan-Microsoft @Prajwal-Microsoft @Vinay-Microsoft @malrose07 @aniaroramsft
5+
* @toherman-msft @Avijit-Microsoft @Roopan-Microsoft @Prajwal-Microsoft @Vinay-Microsoft @malrose07 @aniaroramsft @nchandhi
66

.github/workflows/deploy-v2.yml

Lines changed: 853 additions & 0 deletions
Large diffs are not rendered by default.

.github/workflows/test-automation.yml

Lines changed: 52 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@ on:
1111
EMAILNOTIFICATION_LOGICAPP_URL_TA:
1212
required: false
1313
description: "Logic App URL for email notifications"
14+
outputs:
15+
TEST_SUCCESS:
16+
description: "Whether tests passed"
17+
value: ${{ jobs.test.outputs.TEST_SUCCESS }}
18+
TEST_REPORT_URL:
19+
description: "URL to test report artifact"
20+
value: ${{ jobs.test.outputs.TEST_REPORT_URL }}
1421

1522
env:
1623
url: ${{ inputs.DOCGEN_URL }}
@@ -19,6 +26,9 @@ env:
1926
jobs:
2027
test:
2128
runs-on: ubuntu-latest
29+
outputs:
30+
TEST_SUCCESS: ${{ steps.test1.outcome == 'success' || steps.test2.outcome == 'success' || steps.test3.outcome == 'success' }}
31+
TEST_REPORT_URL: ${{ steps.upload_report.outputs.artifact-url }}
2232
steps:
2333
- name: Checkout repository
2434
uses: actions/checkout@v5
@@ -85,32 +95,49 @@ jobs:
8595
name: test-report
8696
path: tests/e2e-test/report/*
8797

88-
- name: Send Notification
98+
99+
100+
- name: Generate E2E Test Summary
89101
if: always()
90102
run: |
91-
RUN_URL="https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
92-
REPORT_URL=${{ steps.upload_report.outputs.artifact-url }}
93-
IS_SUCCESS=${{ steps.test1.outcome == 'success' || steps.test2.outcome == 'success' || steps.test3.outcome == 'success' }}
94-
# Construct the email body
95-
if [ "$IS_SUCCESS" = "true" ]; then
96-
EMAIL_BODY=$(cat <<EOF
97-
{
98-
"body": "<p>Dear Team,</p><p>We would like to inform you that the ${{ env.accelerator_name }} Test Automation process has completed successfully.</p><p><strong>Run URL:</strong> <a href=\"${RUN_URL}\">${RUN_URL}</a><br></p><p><strong>Test Report:</strong> <a href=\"${REPORT_URL}\">${REPORT_URL}</a></p><p>Best regards,<br>Your Automation Team</p>",
99-
"subject": "${{ env.accelerator_name }} Test Automation - Success"
100-
}
101-
EOF
102-
)
103+
echo "## 🧪 E2E Test Job Summary" >> $GITHUB_STEP_SUMMARY
104+
echo "" >> $GITHUB_STEP_SUMMARY
105+
echo "| Field | Value |" >> $GITHUB_STEP_SUMMARY
106+
echo "|-------|--------|" >> $GITHUB_STEP_SUMMARY
107+
108+
# Determine overall test result
109+
OVERALL_SUCCESS="${{ steps.test1.outcome == 'success' || steps.test2.outcome == 'success' || steps.test3.outcome == 'success' }}"
110+
if [[ "$OVERALL_SUCCESS" == "true" ]]; then
111+
echo "| **Job Status** | ✅ Success |" >> $GITHUB_STEP_SUMMARY
103112
else
104-
EMAIL_BODY=$(cat <<EOF
105-
{
106-
"body": "<p>Dear Team,</p><p>We would like to inform you that the ${{ env.accelerator_name }} Test Automation process has encountered an issue and has failed to complete successfully.</p><p><strong>Run URL:</strong> <a href=\"${RUN_URL}\">${RUN_URL}</a><br> ${OUTPUT}</p><p><strong>Test Report:</strong> <a href=\"${REPORT_URL}\">${REPORT_URL}</a></p><p>Please investigate the matter at your earliest convenience.</p><p>Best regards,<br>Your Automation Team</p>",
107-
"subject": "${{ env.accelerator_name }} Test Automation - Failure"
108-
}
109-
EOF
110-
)
113+
echo "| **Job Status** | ❌ Failed |" >> $GITHUB_STEP_SUMMARY
111114
fi
112-
113-
# Send the notification
114-
curl -X POST "${{ secrets.EMAILNOTIFICATION_LOGICAPP_URL_TA }}" \
115-
-H "Content-Type: application/json" \
116-
-d "$EMAIL_BODY" || echo "Failed to send notification"
115+
116+
echo "| **Target URL** | [${{ env.url }}](${{ env.url }}) |" >> $GITHUB_STEP_SUMMARY
117+
echo "| **Test Report** | [Download Artifact](${{ steps.upload_report.outputs.artifact-url }}) |" >> $GITHUB_STEP_SUMMARY
118+
echo "" >> $GITHUB_STEP_SUMMARY
119+
120+
echo "### 📋 Test Execution Details" >> $GITHUB_STEP_SUMMARY
121+
echo "| Attempt | Status | Notes |" >> $GITHUB_STEP_SUMMARY
122+
echo "|---------|--------|-------|" >> $GITHUB_STEP_SUMMARY
123+
echo "| **Test Run 1** | ${{ steps.test1.outcome == 'success' && '✅ Passed' || '❌ Failed' }} | Initial test execution |" >> $GITHUB_STEP_SUMMARY
124+
125+
if [[ "${{ steps.test1.outcome }}" == "failure" ]]; then
126+
echo "| **Test Run 2** | ${{ steps.test2.outcome == 'success' && '✅ Passed' || steps.test2.outcome == 'failure' && '❌ Failed' || '⏸️ Skipped' }} | Retry after 30s delay |" >> $GITHUB_STEP_SUMMARY
127+
fi
128+
129+
if [[ "${{ steps.test2.outcome }}" == "failure" ]]; then
130+
echo "| **Test Run 3** | ${{ steps.test3.outcome == 'success' && '✅ Passed' || steps.test3.outcome == 'failure' && '❌ Failed' || '⏸️ Skipped' }} | Final retry after 60s delay |" >> $GITHUB_STEP_SUMMARY
131+
fi
132+
133+
echo "" >> $GITHUB_STEP_SUMMARY
134+
135+
if [[ "$OVERALL_SUCCESS" == "true" ]]; then
136+
echo "### ✅ Test Results" >> $GITHUB_STEP_SUMMARY
137+
echo "- End-to-end tests completed successfully" >> $GITHUB_STEP_SUMMARY
138+
echo "- Application is functioning as expected" >> $GITHUB_STEP_SUMMARY
139+
else
140+
echo "### ❌ Test Results" >> $GITHUB_STEP_SUMMARY
141+
echo "- All test attempts failed" >> $GITHUB_STEP_SUMMARY
142+
echo "- Check the e2e-test/test job for detailed error information" >> $GITHUB_STEP_SUMMARY
143+
fi

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ This example focuses on a generic use case - chat with your own data, generate a
1313
</div>
1414
<br/>
1515

16+
**Note:** With any AI solutions you create using these templates, you are responsible for assessing all associated risks and for complying with all applicable laws and safety standards. Learn more in the transparency documents for [Agent Service](https://learn.microsoft.com/en-us/azure/ai-foundry/responsible-ai/agents/transparency-note) and [Agent Framework](https://github.com/microsoft/agent-framework/blob/main/TRANSPARENCY_FAQ.md).
17+
<br/>
18+
1619
<h2><img src="./docs/images/readme/solution-overview.png" width="48" />
1720
Solution overview
1821
</h2>
@@ -69,8 +72,8 @@ Follow the quick deploy steps on the deployment guide to deploy this solution to
6972
[Click here to launch the deployment guide](./docs/DeploymentGuide.md)
7073
<br/><br/>
7174

72-
| [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/microsoft/document-generation-solution-accelerator) | [![Open in Dev Containers](https://img.shields.io/static/v1?style=for-the-badge&label=Dev%20Containers&message=Open&color=blue&logo=visualstudiocode)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/microsoft/document-generation-solution-accelerator) |
73-
|---|---|
75+
| [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/microsoft/document-generation-solution-accelerator) | [![Open in Dev Containers](https://img.shields.io/static/v1?style=for-the-badge&label=Dev%20Containers&message=Open&color=blue&logo=visualstudiocode)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/microsoft/document-generation-solution-accelerator) | [![Open in Visual Studio Code Web](https://img.shields.io/static/v1?style=for-the-badge&label=Visual%20Studio%20Code%20(Web)&message=Open&color=blue&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/azure/?vscode-azure-exp=foundry&agentPayload=eyJiYXNlVXJsIjogImh0dHBzOi8vcmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbS9taWNyb3NvZnQvZG9jdW1lbnQtZ2VuZXJhdGlvbi1zb2x1dGlvbi1hY2NlbGVyYXRvci9yZWZzL2hlYWRzL21haW4vaW5mcmEvdnNjb2RlX3dlYiIsICJpbmRleFVybCI6ICIvaW5kZXguanNvbiIsICJ2YXJpYWJsZXMiOiB7ImFnZW50SWQiOiAiIiwgImNvbm5lY3Rpb25TdHJpbmciOiAiIiwgInRocmVhZElkIjogIiIsICJ1c2VyTWVzc2FnZSI6ICIiLCAicGxheWdyb3VuZE5hbWUiOiAiIiwgImxvY2F0aW9uIjogIiIsICJzdWJzY3JpcHRpb25JZCI6ICIiLCAicmVzb3VyY2VJZCI6ICIiLCAicHJvamVjdFJlc291cmNlSWQiOiAiIiwgImVuZHBvaW50IjogIiJ9LCAiY29kZVJvdXRlIjogWyJhaS1wcm9qZWN0cy1zZGsiLCAicHl0aG9uIiwgImRlZmF1bHQtYXp1cmUtYXV0aCIsICJlbmRwb2ludCJdfQ==) |
76+
|---|---|---|
7477

7578
<br/>
7679

azure_custom.yaml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
environment:
2+
name: document-generation
3+
location: eastus
4+
5+
name: document-generation
6+
metadata:
7+
8+
9+
requiredVersions:
10+
azd: '>= 1.18.0'
11+
12+
parameters:
13+
solutionPrefix:
14+
type: string
15+
default: bs-azdtest
16+
otherLocation:
17+
type: string
18+
default: eastus2
19+
baseUrl:
20+
type: string
21+
default: 'https://github.com/microsoft/document-generation-solution-accelerator'
22+
23+
services:
24+
webapp:
25+
project: ./src
26+
language: py
27+
host: appservice
28+
dist: ./dist
29+
hooks:
30+
prepackage:
31+
windows:
32+
shell: pwsh
33+
run: ../infra/scripts/package_webapp.ps1
34+
interactive: true
35+
continueOnError: false
36+
posix:
37+
shell: sh
38+
run: bash ../infra/scripts/package_webapp.sh
39+
interactive: true
40+
continueOnError: false
41+
42+
deployment:
43+
mode: Incremental
44+
template: ./infra/main.bicep # Path to the main.bicep file inside the 'deployment' folder
45+
parameters:
46+
solutionPrefix: ${parameters.solutionPrefix}
47+
otherLocation: ${parameters.otherLocation}
48+
baseUrl: ${parameters.baseUrl}

docs/CustomizingAzdParameters.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,12 @@ By default this template will use the environment name as the prefix to prevent
1818
| `AZURE_ENV_OPENAI_API_VERSION` | string | `2025-01-01-preview` | Specifies the API version for Azure OpenAI. |
1919
| `AZURE_ENV_MODEL_CAPACITY` | integer | `30` | Sets the GPT model capacity (based on what's available in your subscription). |
2020
| `AZURE_ENV_EMBEDDING_MODEL_NAME` | string | `text-embedding-ada-002` | Sets the name of the embedding model to use. |
21+
| `AZURE_ENV_ACR_NAME` | string | `byocgacontainerreg` | Sets the Azure Container Registry name (allowed value: `byocgacontainerreg`)|
2122
| `AZURE_ENV_IMAGETAG` | string | `latest_waf` | Set the Image tag Like (allowed values: latest_waf, dev, hotfix) |
2223
| `AZURE_ENV_EMBEDDING_MODEL_CAPACITY` | integer | `80` | Sets the capacity for the embedding model deployment. |
2324
| `AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID` | string | Guide to get your [Existing Workspace ID](/docs/re-use-log-analytics.md) | Reuses an existing Log Analytics Workspace instead of creating a new one. |
2425
| `AZURE_EXISTING_AI_PROJECT_RESOURCE_ID` | string | Guid to get your existing AI Foundry Project resource ID | Reuses an existing AIFoundry and AIFoundryProject instead of creating a new one. |
26+
| `AZURE_ENV_OPENAI_LOCATION` | string | `<User selects during deployment>` | Sets the Azure region for OpenAI resource deployment. |
2527

2628

2729
## How to Set a Parameter

docs/DeploymentGuide.md

Lines changed: 50 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@ azd env set AZURE_ENV_VM_ADMIN_PASSWORD <your-password>
6464
6565
## Deployment Options & Steps
6666

67-
Pick from the options below to see step-by-step instructions for GitHub Codespaces, VS Code Dev Containers, and Local Environments.
67+
Pick from the options below to see step-by-step instructions for GitHub Codespaces, VS Code Dev Containers, Visual Studio Code (WEB) and Local Environments.
6868

69-
| [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/microsoft/document-generation-solution-accelerator) | [![Open in Dev Containers](https://img.shields.io/static/v1?style=for-the-badge&label=Dev%20Containers&message=Open&color=blue&logo=visualstudiocode)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/microsoft/document-generation-solution-accelerator) |
70-
|---|---|
69+
| [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/microsoft/document-generation-solution-accelerator) | [![Open in Dev Containers](https://img.shields.io/static/v1?style=for-the-badge&label=Dev%20Containers&message=Open&color=blue&logo=visualstudiocode)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/microsoft/document-generation-solution-accelerator) | [![Open in Visual Studio Code Web](https://img.shields.io/static/v1?style=for-the-badge&label=Visual%20Studio%20Code%20(Web)&message=Open&color=blue&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/azure/?vscode-azure-exp=foundry&agentPayload=eyJiYXNlVXJsIjogImh0dHBzOi8vcmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbS9taWNyb3NvZnQvZG9jdW1lbnQtZ2VuZXJhdGlvbi1zb2x1dGlvbi1hY2NlbGVyYXRvci9yZWZzL2hlYWRzL21haW4vaW5mcmEvdnNjb2RlX3dlYiIsICJpbmRleFVybCI6ICIvaW5kZXguanNvbiIsICJ2YXJpYWJsZXMiOiB7ImFnZW50SWQiOiAiIiwgImNvbm5lY3Rpb25TdHJpbmciOiAiIiwgInRocmVhZElkIjogIiIsICJ1c2VyTWVzc2FnZSI6ICIiLCAicGxheWdyb3VuZE5hbWUiOiAiIiwgImxvY2F0aW9uIjogIiIsICJzdWJzY3JpcHRpb25JZCI6ICIiLCAicmVzb3VyY2VJZCI6ICIiLCAicHJvamVjdFJlc291cmNlSWQiOiAiIiwgImVuZHBvaW50IjogIiJ9LCAiY29kZVJvdXRlIjogWyJhaS1wcm9qZWN0cy1zZGsiLCAicHl0aG9uIiwgImRlZmF1bHQtYXp1cmUtYXV0aCIsICJlbmRwb2ludCJdfQ==) |
70+
|---|---|--|
7171

7272
<details>
7373
<summary><b>Deploy in GitHub Codespaces</b></summary>
@@ -103,6 +103,38 @@ You can run this solution in VS Code Dev Containers, which will open the project
103103

104104
</details>
105105

106+
<details>
107+
<summary><b>Deploy in Visual Studio Code (WEB)</b></summary>
108+
109+
### Visual Studio Code (WEB)
110+
111+
You can run this solution in VS Code Web. The button will open a web-based VS Code instance in your browser:
112+
113+
1. Open the solution accelerator (this may take several minutes):
114+
115+
[![Open in Visual Studio Code Web](https://img.shields.io/static/v1?style=for-the-badge&label=Visual%20Studio%20Code%20(Web)&message=Open&color=blue&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/azure/?vscode-azure-exp=foundry&agentPayload=eyJiYXNlVXJsIjogImh0dHBzOi8vcmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbS9taWNyb3NvZnQvZG9jdW1lbnQtZ2VuZXJhdGlvbi1zb2x1dGlvbi1hY2NlbGVyYXRvci9yZWZzL2hlYWRzL21haW4vaW5mcmEvdnNjb2RlX3dlYiIsICJpbmRleFVybCI6ICIvaW5kZXguanNvbiIsICJ2YXJpYWJsZXMiOiB7ImFnZW50SWQiOiAiIiwgImNvbm5lY3Rpb25TdHJpbmciOiAiIiwgInRocmVhZElkIjogIiIsICJ1c2VyTWVzc2FnZSI6ICIiLCAicGxheWdyb3VuZE5hbWUiOiAiIiwgImxvY2F0aW9uIjogIiIsICJzdWJzY3JpcHRpb25JZCI6ICIiLCAicmVzb3VyY2VJZCI6ICIiLCAicHJvamVjdFJlc291cmNlSWQiOiAiIiwgImVuZHBvaW50IjogIiJ9LCAiY29kZVJvdXRlIjogWyJhaS1wcm9qZWN0cy1zZGsiLCAicHl0aG9uIiwgImRlZmF1bHQtYXp1cmUtYXV0aCIsICJlbmRwb2ludCJdfQ==)
116+
117+
2. When prompted, sign in using your Microsoft account linked to your Azure subscription.
118+
119+
Select the appropriate subscription to continue.
120+
121+
3. Once the solution opens, the **AI Foundry terminal** will automatically start running the following command to install the required dependencies:
122+
123+
```shell
124+
sh install.sh
125+
```
126+
During this process, you’ll be prompted with the message:
127+
```
128+
What would you like to do with these files?
129+
- Overwrite with versions from template
130+
- Keep my existing files unchanged
131+
```
132+
Choose “**Overwrite with versions from template**” and provide a unique environment name when prompted.
133+
134+
4. Continue with the [deploying steps](#deploying-with-azd).
135+
136+
</details>
137+
106138
<details>
107139
<summary><b>Deploy in your local Environment</b></summary>
108140

@@ -172,7 +204,7 @@ To adjust quota settings, follow these [steps](./AzureGPTQuotaSettings.md).
172204

173205
### Deploying with AZD
174206

175-
Once you've opened the project in [Codespaces](#github-codespaces), [Dev Containers](#vs-code-dev-containers), or [locally](#local-environment), you can deploy it to Azure by following these steps:
207+
Once you've opened the project in [Codespaces](#github-codespaces), [Dev Containers](#vs-code-dev-containers), [Visual Studio Code (WEB)](#visual-studio-code-web) or [locally](#local-environment), you can deploy it to Azure by following these steps:
176208
177209
1. Login to Azure:
178210
@@ -209,10 +241,11 @@ Once you've opened the project in [Codespaces](#github-codespaces), [Dev Contain
209241

210242
6. Open the [Azure Portal](https://portal.azure.com/), go to the deployed resource group, find the App Service and get the app URL from `Default domain`.
211243

212-
7. You can now delete the resources by running `azd down`, if you are done trying out the application.
244+
7. You can now delete the resources by running `azd down`, if you are done trying out the application.
245+
> **Note:** If you deployed with `enableRedundancy=true` and Log Analytics workspace replication is enabled, you must first disable replication before running `azd down` else resource group delete will fail. Follow the steps in [Handling Log Analytics Workspace Deletion with Replication Enabled](./LogAnalyticsReplicationDisable.md), wait until replication returns `false`, then run `azd down`.
213246

214247
### 🛠️ Troubleshooting
215-
If you encounter any issues during the deployment process, please refer [troubleshooting](../docs/TroubleShootingSteps.md) document for detailed steps and solutions
248+
If you encounter any issues during the deployment process, please refer [troubleshooting](../docs/TroubleShootingSteps.md) document for detailed steps and solutions
216249

217250
## Post Deployment Steps
218251

@@ -226,6 +259,17 @@ Once you've opened the project in [Codespaces](#github-codespaces), [Dev Contain
226259

227260
- Follow steps in [Delete Resource Group](./DeleteResourceGroup.md) if your deployment fails and/or you need to clean up the resources.
228261

262+
## Deploy Your Local Changes
263+
264+
To deploy your local changes, rename the below files:
265+
266+
1. Rename `azure.yaml` to `azure_custom2.yaml` and `azure_custom.yaml` to `azure.yaml`.
267+
268+
2. **Go to `infra` directory:**
269+
- Rename `main.bicep` to `main_custom2.bicep` and `main_custom.bicep` to `main.bicep`.
270+
271+
3. Continue with the [deploying steps](#deploying-with-azd).
272+
229273
## Environment configuration for local development & debugging
230274
> Set APP_ENV in your .env file to control Azure authentication. Set the environment variable to dev to use Azure CLI credentials, or to prod to use Managed Identity for production. **Ensure you're logged in via az login when using dev in local**.
231275
To configure your environment, follow these steps:

0 commit comments

Comments
 (0)