Skip to content

Commit 338442f

Browse files
Merge branch 'dev' into rc-dependabotchanges
2 parents 0ac9732 + fd99dcb commit 338442f

519 files changed

Lines changed: 39343 additions & 110789 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,34 +16,34 @@ USE_FOUNDRY=false
1616
# Format: https://<project-name>.services.ai.azure.com
1717
AZURE_AI_PROJECT_ENDPOINT=
1818

19-
# Image model deployment name in Foundry (e.g., gpt-image-1)
20-
AZURE_AI_IMAGE_DEPLOYMENT=gpt-image-1
19+
# Image model deployment name in Foundry (e.g., gpt-image-1-mini)
20+
AZURE_AI_IMAGE_MODEL_DEPLOYMENT=gpt-image-1-mini
2121

2222
# =============================================================================
2323
# Azure OpenAI Configuration
2424
# =============================================================================
2525
AI_FOUNDRY_RESOURCE_ID=/subscriptions/your-subscription-id/resourceGroups/your-resource-group/providers/Microsoft.CognitiveServices/accounts/your-aif-account
26-
AZURE_EXISTING_AI_PROJECT_RESOURCE_ID=/subscriptions/your-subscription-id/resourceGroups/your-resource-group/providers/Microsoft.CognitiveServices/accounts/your-aif-account/projects/your-project-name
26+
AZURE_EXISTING_AIPROJECT_RESOURCE_ID=/subscriptions/your-subscription-id/resourceGroups/your-resource-group/providers/Microsoft.CognitiveServices/accounts/your-aif-account/projects/your-project-name
2727
# Your Azure OpenAI endpoint (e.g., https://your-resource.openai.azure.com/)
2828
AZURE_OPENAI_ENDPOINT=https://your-openai.openai.azure.com/
2929

3030
# Model deployments
31-
AZURE_OPENAI_GPT_MODEL=gpt-5.1
31+
AZURE_ENV_GPT_MODEL_NAME=gpt-5.1
3232

3333
# Image Generation Model Configuration
34-
# Supported models: gpt-image-1 or gpt-image-1.5
35-
AZURE_OPENAI_IMAGE_MODEL=gpt-image-1
34+
# Supported models: gpt-image-1-mini or gpt-image-1.5
35+
AZURE_ENV_IMAGE_MODEL_NAME=gpt-image-1-mini
3636

37-
# For gpt-image-1 or gpt-image-1.5, the endpoint is the same as the main OpenAI endpoint, but you can specify a different one if needed
37+
# For gpt-image-1-mini or gpt-image-1.5, the endpoint is the same as the main OpenAI endpoint, but you can specify a different one if needed
3838
AZURE_OPENAI_GPT_IMAGE_ENDPOINT=https://your-openai.openai.azure.com
3939

4040
# Image generation settings
41-
# For gpt-image-1/1.5: sizes are 1024x1024, 1536x1024, 1024x1536, auto; quality is low, medium, high, auto
41+
# For gpt-image-1-mini/1.5: sizes are 1024x1024, 1536x1024, 1024x1536, auto; quality is low, medium, high, auto
4242
AZURE_OPENAI_IMAGE_SIZE=1024x1024
4343
AZURE_OPENAI_IMAGE_QUALITY=medium
4444

4545
# API versions
46-
AZURE_OPENAI_API_VERSION=2024-06-01
46+
AZURE_ENV_OPENAI_API_VERSION=2024-06-01
4747
AZURE_OPENAI_PREVIEW_API_VERSION=2024-02-01
4848

4949
# Generation parameters
@@ -53,6 +53,7 @@ AZURE_OPENAI_MAX_TOKENS=2000
5353
# =============================================================================
5454
# Azure Cosmos DB
5555
# =============================================================================
56+
COSMOSDB_ACCOUNT_NAME=your-cosmos-account
5657
AZURE_COSMOS_ENDPOINT=https://your-cosmos.documents.azure.com:443/
5758
AZURE_COSMOS_DATABASE_NAME=content-generation
5859
AZURE_COSMOS_PRODUCTS_CONTAINER=products
@@ -106,10 +107,21 @@ BRAND_REQUIRED_DISCLOSURES=
106107
# =============================================================================
107108
# Application Settings
108109
# =============================================================================
110+
RESOURCE_GROUP_NAME=your-resource-group
109111
# Server configuration
110112
PORT=5000
111113
WORKERS=4
112114

113115
# Feature flags
114116
AUTH_ENABLED=false
115117
SANITIZE_ANSWER=false
118+
119+
# =============================================================================
120+
# Logging Configuration
121+
# =============================================================================
122+
# Basic logging level (DEBUG, INFO, WARNING, ERROR)
123+
AZURE_BASIC_LOGGING_LEVEL=INFO
124+
# Logging level for Azure SDK and third-party packages (DEBUG, INFO, WARNING, ERROR)
125+
AZURE_PACKAGE_LOGGING_LEVEL=WARNING
126+
# Comma-separated list of Python logger names to apply package logging level to
127+
AZURE_LOGGING_PACKAGES=
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@
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 @nchandhi @dgp10801
6-
5+
* @Avijit-Microsoft @Roopan-Microsoft @Prajwal-Microsoft @aniaroramsft @Vinay-Microsoft @malrose07 @toherman-msft @nchandhi

.github/dependabot.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ updates:
1818
# Python (pip) dependencies - grouped
1919
- package-ecosystem: "pip"
2020
directories:
21-
- "/content-gen/src/backend"
22-
- "/content-gen/infra/vscode_web"
23-
- "/content-gen/scripts"
21+
- "/src/backend"
22+
- "/infra/vscode_web"
23+
- "/scripts"
2424
schedule:
2525
interval: "monthly"
2626
target-branch: "dependabotchanges"
@@ -35,8 +35,8 @@ updates:
3535
# npm dependencies - grouped
3636
- package-ecosystem: "npm"
3737
directories:
38-
- "/content-gen/src/app/frontend"
39-
- "/content-gen/src/app/frontend-server"
38+
- "/src/app/frontend"
39+
- "/src/app/frontend-server"
4040
schedule:
4141
interval: "monthly"
4242
target-branch: "dependabotchanges"
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: AZD Template Validation
2+
on:
3+
schedule:
4+
- cron: '30 1 * * 4' # Every Thursday at 7:00 AM IST (1:30 AM UTC)
5+
workflow_dispatch:
6+
7+
permissions:
8+
contents: read
9+
id-token: write
10+
pull-requests: write
11+
jobs:
12+
template_validation:
13+
runs-on: ubuntu-latest
14+
environment: production
15+
name: azd template validation
16+
env:
17+
GH_TOKEN: ${{ github.token }}
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- name: Set timestamp
22+
shell: bash
23+
run: echo "HHMM=$(date -u +'%H%M')" >> "$GITHUB_ENV"
24+
25+
- name: Validate Azure Template
26+
uses: microsoft/template-validation-action@v0.4.3
27+
with:
28+
validateAzd: ${{ vars.TEMPLATE_VALIDATE_AZD }}
29+
validateTests: ${{ vars.TEMPLATE_VALIDATE_TESTS }}
30+
useDevContainer: ${{ vars.TEMPLATE_USE_DEV_CONTAINER }}
31+
id: validation
32+
env:
33+
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
34+
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
35+
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
36+
AZURE_ENV_NAME: ${{ secrets.AZURE_ENV_NAME }}-${{ env.HHMM }}
37+
AZURE_LOCATION: ${{ secrets.AZURE_LOCATION }}
38+
AZURE_ENV_AI_SERVICE_LOCATION: ${{ secrets.AZURE_ENV_AI_SERVICE_LOCATION }}
39+
AZURE_AI_MODEL_CAPACITY: 1
40+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41+
42+
- name: print result
43+
run: cat ${{ steps.validation.outputs.resultFile }}

.github/workflows/azure-dev.yml

Lines changed: 67 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,80 @@
1-
name: Azure Template Validation
1+
name: Azure Dev Deploy
22
on:
33
workflow_dispatch:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- 'infra/**'
9+
- 'azure*.yaml'
10+
- '.github/workflows/azure-dev.yml'
411

12+
513
permissions:
614
contents: read
715
id-token: write
8-
pull-requests: write
9-
16+
1017
jobs:
11-
template_validation_job:
18+
deploy:
1219
runs-on: ubuntu-latest
13-
name: Template validation
20+
name: azd deploy
21+
environment: production
22+
env:
23+
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
24+
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
25+
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
26+
AZURE_ENV_NAME: ${{ secrets.AZURE_ENV_NAME }}
27+
AZURE_LOCATION: ${{ secrets.AZURE_LOCATION }}
28+
AZURE_ENV_AI_SERVICE_LOCATION: ${{ secrets.AZURE_ENV_AI_SERVICE_LOCATION }}
29+
AZURE_ENV_EXISTING_LOG_ANALYTICS_WORKSPACE_RID: ${{ secrets.AZURE_ENV_EXISTING_LOG_ANALYTICS_WORKSPACE_RID }}
30+
AZURE_EXISTING_AIPROJECT_RESOURCE_ID: ${{ secrets.AZURE_EXISTING_AIPROJECT_RESOURCE_ID }}
31+
AZURE_DEV_COLLECT_TELEMETRY: ${{ vars.AZURE_DEV_COLLECT_TELEMETRY }}
1432

1533
steps:
16-
# Step 1: Checkout the code from your repository
17-
- name: Checkout code
34+
- name: Checkout Code
1835
uses: actions/checkout@v6
1936

20-
# Step 2: Validate the Azure template using microsoft/template-validation-action
21-
- name: Validate Azure Template
22-
uses: microsoft/template-validation-action@v0.4.4
23-
id: validation
37+
- name: Set timestamp and env name
38+
shell: bash
39+
run: |
40+
HHMM=$(date -u +'%H%M')
41+
echo "AZURE_ENV_NAME=${AZURE_ENV_NAME}-${HHMM}" >> "$GITHUB_ENV"
42+
43+
- name: Install azd
44+
uses: Azure/setup-azd@v2
45+
46+
- name: Login to Azure
47+
uses: azure/login@v2
2448
with:
25-
workingDirectory: ./content-gen
26-
env:
27-
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
28-
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
29-
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
30-
AZURE_ENV_NAME: ${{ secrets.AZURE_ENV_NAME }}
31-
AZURE_LOCATION: ${{ secrets.AZURE_LOCATION }}
32-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33-
34-
# Step 3: Print the result of the validation
35-
- name: Print result
36-
run: cat ${{ steps.validation.outputs.resultFile }}
49+
client-id: ${{ secrets.AZURE_CLIENT_ID }}
50+
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
51+
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
52+
53+
- name: Login to AZD
54+
shell: bash
55+
run: |
56+
azd auth login \
57+
--client-id "$AZURE_CLIENT_ID" \
58+
--federated-credential-provider "github" \
59+
--tenant-id "$AZURE_TENANT_ID"
60+
61+
- name: Provision and Deploy
62+
shell: bash
63+
run: |
64+
if ! azd env select "$AZURE_ENV_NAME"; then
65+
azd env new "$AZURE_ENV_NAME" --subscription "$AZURE_SUBSCRIPTION_ID" --location "$AZURE_LOCATION" --no-prompt
66+
fi
67+
68+
azd config set defaults.subscription "$AZURE_SUBSCRIPTION_ID"
69+
70+
71+
if [[ -n "${AZURE_ENV_EXISTING_LOG_ANALYTICS_WORKSPACE_RID:-}" ]]; then
72+
azd env set AZURE_ENV_EXISTING_LOG_ANALYTICS_WORKSPACE_RID "$AZURE_ENV_EXISTING_LOG_ANALYTICS_WORKSPACE_RID"
73+
fi
74+
75+
if [[ -n "${AZURE_EXISTING_AIPROJECT_RESOURCE_ID:-}" ]]; then
76+
azd env set AZURE_EXISTING_AIPROJECT_RESOURCE_ID "$AZURE_EXISTING_AIPROJECT_RESOURCE_ID"
77+
fi
78+
79+
azd up --no-prompt
80+

.github/workflows/codeql.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ on:
1414
schedule:
1515
- cron: '17 11 * * 0'
1616

17+
concurrency:
18+
group: codeql-${{ github.ref }}
19+
cancel-in-progress: true
20+
1721
jobs:
1822
analyze:
1923
name: Analyze

.github/workflows/deploy-orchestrator.yml

Lines changed: 30 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
workflow_call:
55
inputs:
66
runner_os:
7-
description: 'Runner OS (ubuntu-latest, windows-latest, or devcontainer)'
7+
description: 'Runner OS (ubuntu-latest or windows-latest)'
88
required: true
99
type: string
1010
azure_location:
@@ -42,12 +42,12 @@ on:
4242
required: false
4343
default: 'GoldenPath-Testing'
4444
type: string
45-
AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID:
45+
AZURE_ENV_EXISTING_LOG_ANALYTICS_WORKSPACE_RID:
4646
description: 'Log Analytics Workspace ID (Optional)'
4747
required: false
4848
default: ''
4949
type: string
50-
AZURE_EXISTING_AI_PROJECT_RESOURCE_ID:
50+
AZURE_EXISTING_AIPROJECT_RESOURCE_ID:
5151
description: 'AI Project Resource ID (Optional)'
5252
required: false
5353
default: ''
@@ -61,19 +61,15 @@ on:
6161
description: 'Trigger type (workflow_dispatch, pull_request, schedule)'
6262
required: true
6363
type: string
64-
image_model_choice:
65-
description: 'Image model to deploy (gpt-image-1, gpt-image-1.5, none)'
64+
AZURE_ENV_IMAGE_MODEL_NAME:
65+
description: 'Image model to deploy (gpt-image-1-mini, gpt-image-1.5, none)'
6666
required: false
67-
default: 'gpt-image-1'
67+
default: 'gpt-image-1-mini'
6868
type: string
6969

7070
env:
7171
AZURE_DEV_COLLECT_TELEMETRY: ${{ vars.AZURE_DEV_COLLECT_TELEMETRY }}
72-
permissions:
73-
contents: read
74-
actions: read
75-
packages: write # Required by job-deploy → job-deploy-devcontainer to push devcontainer image to GHCR
76-
72+
7773
jobs:
7874
docker-build:
7975
uses: ./.github/workflows/job-docker-build.yml
@@ -95,27 +91,42 @@ jobs:
9591
EXP: ${{ inputs.EXP }}
9692
build_docker_image: ${{ inputs.build_docker_image }}
9793
existing_webapp_url: ${{ inputs.existing_webapp_url }}
98-
AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID: ${{ inputs.AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID }}
99-
AZURE_EXISTING_AI_PROJECT_RESOURCE_ID: ${{ inputs.AZURE_EXISTING_AI_PROJECT_RESOURCE_ID }}
100-
docker_image_tag: ${{ needs.docker-build.outputs.IMAGE_TAG }}
94+
AZURE_ENV_EXISTING_LOG_ANALYTICS_WORKSPACE_RID: ${{ inputs.AZURE_ENV_EXISTING_LOG_ANALYTICS_WORKSPACE_RID }}
95+
AZURE_EXISTING_AIPROJECT_RESOURCE_ID: ${{ inputs.AZURE_EXISTING_AIPROJECT_RESOURCE_ID }}
96+
docker_image_tag: ${{ needs.docker-build.outputs.AZURE_ENV_IMAGE_TAG }}
10197
run_e2e_tests: ${{ inputs.run_e2e_tests }}
10298
cleanup_resources: ${{ inputs.cleanup_resources }}
103-
image_model_choice: ${{ inputs.image_model_choice }}
99+
AZURE_ENV_IMAGE_MODEL_NAME: ${{ inputs.AZURE_ENV_IMAGE_MODEL_NAME }}
104100
secrets: inherit
105101

106102
e2e-test:
107-
# if: "!cancelled() && ((needs.deploy.result == 'success' && needs.deploy.outputs.WEB_APPURL != '') || (inputs.existing_webapp_url != '' && inputs.existing_webapp_url != null)) && (inputs.trigger_type != 'workflow_dispatch' || (inputs.run_e2e_tests != 'None' && inputs.run_e2e_tests != '' && inputs.run_e2e_tests != null))"
108-
if: false # Temporarily disable E2E tests
103+
if: "!cancelled() && ((needs.deploy.result == 'success' && needs.deploy.outputs.WEB_APPURL != '') || (inputs.existing_webapp_url != '' && inputs.existing_webapp_url != null)) && (inputs.trigger_type != 'workflow_dispatch' || (inputs.run_e2e_tests != 'None' && inputs.run_e2e_tests != '' && inputs.run_e2e_tests != null))"
109104
needs: [docker-build, deploy]
110105
uses: ./.github/workflows/test-automation-v2.yml
111106
with:
112107
DOCGEN_URL: ${{ needs.deploy.outputs.WEB_APPURL || inputs.existing_webapp_url }}
113108
TEST_SUITE: ${{ inputs.trigger_type == 'workflow_dispatch' && inputs.run_e2e_tests || 'GoldenPath-Testing' }}
114109
secrets: inherit
115110

111+
cleanup-deployment:
112+
if: "!cancelled() && needs.deploy.outputs.RESOURCE_GROUP_NAME != '' && inputs.existing_webapp_url == '' && (inputs.trigger_type != 'workflow_dispatch' || inputs.cleanup_resources)"
113+
needs: [docker-build, deploy, e2e-test]
114+
uses: ./.github/workflows/job-cleanup-deployment.yml
115+
with:
116+
runner_os: ${{ inputs.runner_os }}
117+
trigger_type: ${{ inputs.trigger_type }}
118+
cleanup_resources: ${{ inputs.cleanup_resources }}
119+
existing_webapp_url: ${{ inputs.existing_webapp_url }}
120+
RESOURCE_GROUP_NAME: ${{ needs.deploy.outputs.RESOURCE_GROUP_NAME }}
121+
AZURE_LOCATION: ${{ needs.deploy.outputs.AZURE_LOCATION }}
122+
AZURE_ENV_AI_SERVICE_LOCATION: ${{ needs.deploy.outputs.AZURE_ENV_AI_SERVICE_LOCATION }}
123+
ENV_NAME: ${{ needs.deploy.outputs.ENV_NAME }}
124+
AZURE_ENV_IMAGE_TAG: ${{ needs.deploy.outputs.AZURE_ENV_IMAGE_TAG }}
125+
secrets: inherit
126+
116127
send-notification:
117128
if: "!cancelled()"
118-
needs: [docker-build, deploy, e2e-test]
129+
needs: [docker-build, deploy, e2e-test, cleanup-deployment]
119130
uses: ./.github/workflows/job-send-notification.yml
120131
with:
121132
trigger_type: ${{ inputs.trigger_type }}
@@ -130,20 +141,5 @@ jobs:
130141
QUOTA_FAILED: ${{ needs.deploy.outputs.QUOTA_FAILED }}
131142
TEST_SUCCESS: ${{ needs.e2e-test.outputs.TEST_SUCCESS }}
132143
TEST_REPORT_URL: ${{ needs.e2e-test.outputs.TEST_REPORT_URL }}
133-
secrets: inherit
134-
135-
cleanup-deployment:
136-
if: "!cancelled() && needs.deploy.outputs.RESOURCE_GROUP_NAME != '' && inputs.existing_webapp_url == '' && (inputs.trigger_type != 'workflow_dispatch' || inputs.cleanup_resources)"
137-
needs: [docker-build, deploy, e2e-test]
138-
uses: ./.github/workflows/job-cleanup-deployment.yml
139-
with:
140-
runner_os: ${{ inputs.runner_os }}
141-
trigger_type: ${{ inputs.trigger_type }}
142-
cleanup_resources: ${{ inputs.cleanup_resources }}
143-
existing_webapp_url: ${{ inputs.existing_webapp_url }}
144-
RESOURCE_GROUP_NAME: ${{ needs.deploy.outputs.RESOURCE_GROUP_NAME }}
145-
AZURE_LOCATION: ${{ needs.deploy.outputs.AZURE_LOCATION }}
146-
AZURE_ENV_OPENAI_LOCATION: ${{ needs.deploy.outputs.AZURE_ENV_OPENAI_LOCATION }}
147-
ENV_NAME: ${{ needs.deploy.outputs.ENV_NAME }}
148-
IMAGE_TAG: ${{ needs.deploy.outputs.IMAGE_TAG }}
144+
cleanup_result: ${{ needs.cleanup-deployment.result }}
149145
secrets: inherit

0 commit comments

Comments
 (0)