Skip to content

Commit a195b1b

Browse files
Merge branch 'main' into demo
# Conflicts: # .devcontainer/Dockerfile # .github/workflows/bicep-audit.yml # .github/workflows/broken-links-checker.yml # .github/workflows/build-docker.yml # .github/workflows/ci.yml # .github/workflows/comment_coverage.yml # .github/workflows/create-release.yml # .github/workflows/scheduled-Dependabot-PRs-Auto-Merge.yml # .github/workflows/stale-bot.yml # .github/workflows/test-automation.yml # .github/workflows/tests.yml # code/create_app.py # code/frontend/package-lock.json # code/frontend/package.json # code/frontend/src/components/CitationPanel/CitationPanel.tsx # code/tests/functional/tests/backend_api/sk_orchestrator/test_response_without_tool_call.py # code/tests/test_create_app.py # docs/LOCAL_DEPLOYMENT.md # infra/main.bicep # infra/main.json # infra/main.parameters.json # infra/main.waf.parameters.json # infra/modules/app/function.bicep # poetry.lock # pyproject.toml # tests/e2e-test/tests/test_chat_with_your_data.py # tests/integration/ui/package-lock.json # tests/integration/ui/package.json
2 parents b1cd588 + 7e5bd25 commit a195b1b

116 files changed

Lines changed: 1569612 additions & 3714 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.

.devcontainer/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
FROM mcr.microsoft.com/devcontainers/python:3.11-bookworm
22

3+
# Remove Yarn repository to avoid GPG key expiration issue
4+
RUN rm -f /etc/apt/sources.list.d/yarn.list
5+
36
# install git
47
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
58
&& apt-get -y install --no-install-recommends git libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libnss3 libxss1 libasound2 libxtst6 xauth xvfb

.github/workflows/bicep-audit.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
security-events: write
2020
steps:
2121
- name: Checkout
22-
uses: actions/checkout@v5
22+
uses: actions/checkout@v6
2323

2424
- name: Run Microsoft Security DevOps Analysis
2525
uses: microsoft/security-devops-action@preview
@@ -29,7 +29,7 @@ jobs:
2929
tools: templateanalyzer
3030

3131
- name: Upload alerts to Security tab
32-
uses: github/codeql-action/upload-sarif@v3
32+
uses: github/codeql-action/upload-sarif@v4
3333
if: github.repository_owner == 'Azure-Samples'
3434
with:
3535
sarif_file: ${{ steps.msdo.outputs.sarifFile }}

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

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

33
on:
44
pull_request:
5-
paths:
6-
- '**/*.md'
75
workflow_dispatch:
86

97
permissions:
@@ -16,7 +14,7 @@ jobs:
1614

1715
steps:
1816
- name: Checkout Repo
19-
uses: actions/checkout@v5
17+
uses: actions/checkout@v6
2018
with:
2119
fetch-depth: 0
2220

@@ -29,15 +27,18 @@ jobs:
2927
files: |
3028
**/*.md
3129
30+
- name: Skip - No Markdown Files Changed
31+
if: github.event_name == 'pull_request' && steps.changed-markdown-files.outputs.any_changed != 'true'
32+
run: echo "No markdown files changed. Skipping broken link check."
3233

3334
# For PR: Check broken links only in changed files
3435
- name: Check Broken Links in Changed Markdown Files
3536
id: lychee-check-pr
3637
if: github.event_name == 'pull_request' && steps.changed-markdown-files.outputs.any_changed == 'true'
37-
uses: lycheeverse/lychee-action@v2.4.1
38+
uses: lycheeverse/lychee-action@v2.7.0
3839
with:
3940
args: >
40-
--verbose --exclude-mail --no-progress --exclude ^https?://
41+
--verbose --no-progress --exclude ^https?://
4142
${{ steps.changed-markdown-files.outputs.all_changed_files }}
4243
failIfEmpty: false
4344
env:
@@ -47,10 +48,10 @@ jobs:
4748
- name: Check Broken Links in All Markdown Files in Entire Repo (Manual Trigger)
4849
id: lychee-check-manual
4950
if: github.event_name == 'workflow_dispatch'
50-
uses: lycheeverse/lychee-action@v2.6.1
51+
uses: lycheeverse/lychee-action@v2.7.0
5152
with:
5253
args: >
53-
--verbose --exclude-mail --no-progress --exclude ^https?://
54+
--verbose --no-progress --exclude ^https?://
5455
'**/*.md'
5556
failIfEmpty: false
5657
env:

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

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,37 @@ on:
3535
workflow_dispatch:
3636

3737
jobs:
38+
check-changes:
39+
runs-on: ubuntu-latest
40+
outputs:
41+
should_build: ${{ steps.filter.outputs.docker_related }}
42+
steps:
43+
- name: Checkout
44+
uses: actions/checkout@v6
45+
with:
46+
fetch-depth: 0
47+
48+
- name: Check for relevant changes
49+
id: filter
50+
uses: dorny/paths-filter@v3
51+
with:
52+
filters: |
53+
docker_related:
54+
- 'code/**'
55+
- '!code/tests/**'
56+
- 'docker/**'
57+
- 'package.json'
58+
- 'pyproject.toml'
59+
- '.github/workflows/build-docker-images.yml'
60+
- '.github/workflows/build-docker.yml'
61+
62+
- name: Skip - No Relevant Changes
63+
if: steps.filter.outputs.docker_related != 'true' && github.event_name != 'workflow_dispatch'
64+
run: echo "No relevant changes detected. Skipping docker build."
65+
3866
docker-build:
67+
needs: check-changes
68+
if: needs.check-changes.outputs.should_build == 'true' || github.event_name == 'workflow_dispatch'
3969
strategy:
4070
matrix:
4171
include:

.github/workflows/build-docker.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
runs-on: ubuntu-latest
3030
steps:
3131
- name: Checkout
32-
uses: actions/checkout@v5
32+
uses: actions/checkout@v6
3333

3434
- name: Docker Login to cwydcontainerreg (Main)
3535
if: ${{ inputs.push == true && github.ref_name == 'main' }}

.github/workflows/ci.yml

Lines changed: 36 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,36 @@ concurrency:
2525
group: ${{ github.workflow }}-${{ github.ref }}
2626

2727
jobs:
28+
check-changes:
29+
runs-on: ubuntu-latest
30+
outputs:
31+
should_deploy: ${{ steps.filter.outputs.deploy_related }}
32+
steps:
33+
- name: Checkout
34+
uses: actions/checkout@v6
35+
with:
36+
fetch-depth: 0
37+
38+
- name: Check for relevant changes
39+
id: filter
40+
uses: dorny/paths-filter@v3
41+
with:
42+
filters: |
43+
deploy_related:
44+
- 'infra/**'
45+
- 'scripts/**'
46+
- 'azure.yaml'
47+
- 'pyproject.toml'
48+
- 'Makefile'
49+
- '.github/workflows/ci.yml'
50+
51+
- name: Skip - No Relevant Changes
52+
if: steps.filter.outputs.deploy_related != 'true' && github.event_name != 'workflow_dispatch' && github.event_name != 'schedule'
53+
run: echo "No relevant changes detected. Skipping deployment validation."
54+
2855
deploy:
56+
needs: check-changes
57+
if: needs.check-changes.outputs.should_deploy == 'true' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule'
2958
runs-on: ubuntu-latest
3059
env:
3160
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
@@ -48,12 +77,8 @@ jobs:
4877
- name: Checkout code
4978
uses: actions/checkout@v5
5079

51-
- name: Install AZD
52-
run: |
53-
set -e
54-
echo "Fetching deployment output..."
55-
# Install azd (Azure Developer CLI) - required by process_sample_data.sh
56-
curl -fsSL https://aka.ms/install-azd.sh | bash
80+
- name: Install azd
81+
uses: Azure/setup-azd@v2
5782

5883
- name: Run Quota Check
5984
id: quota-check
@@ -391,17 +416,17 @@ jobs:
391416

392417

393418
e2e-test:
394-
needs: deploy
395-
if: needs.deploy.outputs.DEPLOYMENT_SUCCESS == 'true'
419+
needs: [check-changes, deploy]
420+
if: always() && needs.deploy.result == 'success' && needs.deploy.outputs.DEPLOYMENT_SUCCESS == 'true'
396421
uses: ./.github/workflows/test-automation.yml
397422
with:
398423
web_url: ${{ needs.deploy.outputs.web_url }}
399424
admin_url: ${{ needs.deploy.outputs.admin_url }}
400425

401426

402427
cleanup:
403-
if: always()
404-
needs: [deploy, e2e-test]
428+
if: always() && needs.deploy.result != 'skipped'
429+
needs: [check-changes, deploy, e2e-test]
405430
runs-on: ubuntu-latest
406431

407432
env:
@@ -416,7 +441,7 @@ jobs:
416441

417442
steps:
418443
- name: Checkout code
419-
uses: actions/checkout@v5
444+
uses: actions/checkout@v6
420445

421446
- name: Destroy resources
422447
uses: devcontainers/ci@v0.3

.github/workflows/comment_coverage.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
github.event.workflow_run.conclusion != 'cancelled'
1919
steps:
2020
- name: Download artifact
21-
uses: actions/download-artifact@v5
21+
uses: actions/download-artifact@v7
2222
with:
2323
name: coverage
2424
github-token: ${{ secrets.GITHUB_TOKEN }}
@@ -39,7 +39,7 @@ jobs:
3939
return response.data[0]?.number ?? "";
4040
retries: 3
4141
- name: Comment coverage
42-
uses: MishaKav/pytest-coverage-comment@13d3c18e21895566c746187c9ea74736372e5e91
42+
uses: MishaKav/pytest-coverage-comment@ae0e8a539a3f310aefb3bfb6a2209778a21fa42b
4343
with:
4444
pytest-xml-coverage-path: coverage.xml
4545
junitxml-path: coverage-junit.xml

.github/workflows/create-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717

1818
steps:
1919
- name: Checkout
20-
uses: actions/checkout@v5
20+
uses: actions/checkout@v6
2121
with:
2222
ref: ${{ github.event.workflow_run.head_sha }}
2323

Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
name: Deployment orchestrator
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
runner_os:
7+
description: 'Runner OS (ubuntu-latest or windows-latest)'
8+
required: true
9+
type: string
10+
resource_group_name:
11+
description: 'Resource Group Name (Optional)'
12+
required: false
13+
default: ''
14+
type: string
15+
waf_enabled:
16+
description: 'Enable WAF'
17+
required: false
18+
default: false
19+
type: boolean
20+
EXP:
21+
description: 'Enable EXP'
22+
required: false
23+
default: false
24+
type: boolean
25+
cleanup_resources:
26+
description: 'Cleanup Deployed Resources'
27+
required: false
28+
default: false
29+
type: boolean
30+
run_e2e_tests:
31+
description: 'Run End-to-End Tests'
32+
required: false
33+
default: 'GoldenPath-Testing'
34+
type: string
35+
existing_webapp_url:
36+
description: 'Existing Container WebApp URL (Skips Deployment)'
37+
required: false
38+
default: ''
39+
type: string
40+
existing_admin_app_url:
41+
description: 'Existing Admin WebApp URL (Skips Deployment)'
42+
required: false
43+
default: ''
44+
type: string
45+
trigger_type:
46+
description: 'Trigger type (workflow_dispatch, pull_request, schedule)'
47+
required: true
48+
type: string
49+
AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID:
50+
description: 'Log Analytics Workspace ID (Optional)'
51+
required: false
52+
default: ''
53+
type: string
54+
AZURE_SEARCH_USE_INTEGRATED_VECTORIZATION:
55+
description: 'Enable Azure Search Integrated Vectorization'
56+
required: false
57+
default: 'false'
58+
type: string
59+
AZURE_SEARCH_USE_SEMANTIC_SEARCH:
60+
description: 'Enable Azure Search Semantic Search'
61+
required: false
62+
default: 'false'
63+
type: string
64+
USE_ADVANCED_IMAGE_PROCESSING:
65+
description: 'Use Advanced Image Processing'
66+
required: false
67+
default: 'false'
68+
type: string
69+
DATABASE_TYPE:
70+
description: 'Type of database to use'
71+
required: false
72+
default: 'PostgreSQL'
73+
type: string
74+
75+
env:
76+
AZURE_DEV_COLLECT_TELEMETRY: ${{ vars.AZURE_DEV_COLLECT_TELEMETRY }}
77+
78+
jobs:
79+
deploy:
80+
if: "!cancelled() && (inputs.trigger_type != 'workflow_dispatch' || inputs.existing_webapp_url == '' || inputs.existing_webapp_url == null)"
81+
uses: ./.github/workflows/job-deploy.yml
82+
with:
83+
trigger_type: ${{ inputs.trigger_type }}
84+
runner_os: ${{ inputs.runner_os }}
85+
resource_group_name: ${{ inputs.resource_group_name }}
86+
waf_enabled: ${{ inputs.waf_enabled }}
87+
EXP: ${{ inputs.EXP }}
88+
existing_webapp_url: ${{ inputs.existing_webapp_url }}
89+
run_e2e_tests: ${{ inputs.run_e2e_tests }}
90+
AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID: ${{ inputs.AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID }}
91+
cleanup_resources: ${{ inputs.cleanup_resources }}
92+
AZURE_SEARCH_USE_INTEGRATED_VECTORIZATION: ${{ inputs.AZURE_SEARCH_USE_INTEGRATED_VECTORIZATION }}
93+
AZURE_SEARCH_USE_SEMANTIC_SEARCH: ${{ inputs.AZURE_SEARCH_USE_SEMANTIC_SEARCH }}
94+
USE_ADVANCED_IMAGE_PROCESSING: ${{ inputs.USE_ADVANCED_IMAGE_PROCESSING }}
95+
DATABASE_TYPE: ${{ inputs.DATABASE_TYPE }}
96+
secrets: inherit
97+
98+
99+
100+
e2e-test:
101+
if: "!cancelled() && ((needs.deploy.result == 'success' && needs.deploy.outputs.WEB_APPURL != '' && needs.deploy.outputs.ADMIN_APPURL != '') || (inputs.existing_webapp_url != '' && inputs.existing_webapp_url != null && inputs.existing_admin_app_url != '' && inputs.existing_admin_app_url != null)) && (inputs.trigger_type != 'workflow_dispatch' || (inputs.run_e2e_tests != 'None' && inputs.run_e2e_tests != '' && inputs.run_e2e_tests != null))"
102+
needs: [deploy]
103+
uses: ./.github/workflows/test-automation-v2.yml
104+
with:
105+
TEST_URL: ${{ needs.deploy.outputs.WEB_APPURL || inputs.existing_webapp_url }}
106+
ADMIN_APPURL: ${{ needs.deploy.outputs.ADMIN_APPURL || inputs.existing_admin_app_url }}
107+
TEST_SUITE: ${{ inputs.trigger_type == 'workflow_dispatch' && inputs.run_e2e_tests || 'GoldenPath-Testing' }}
108+
secrets: inherit
109+
110+
send-notification:
111+
if: "!cancelled()"
112+
needs: [deploy, e2e-test]
113+
uses: ./.github/workflows/job-send-notification.yml
114+
with:
115+
trigger_type: ${{ inputs.trigger_type }}
116+
waf_enabled: ${{ inputs.waf_enabled }}
117+
EXP: ${{ inputs.EXP }}
118+
run_e2e_tests: ${{ inputs.run_e2e_tests }}
119+
existing_webapp_url: ${{ inputs.existing_webapp_url }}
120+
deploy_result: ${{ needs.deploy.result }}
121+
e2e_test_result: ${{ needs.e2e-test.result }}
122+
WEB_APPURL: ${{ needs.deploy.outputs.WEB_APPURL || inputs.existing_webapp_url }}
123+
RESOURCE_GROUP_NAME: ${{ needs.deploy.outputs.RESOURCE_GROUP_NAME }}
124+
QUOTA_FAILED: ${{ needs.deploy.outputs.QUOTA_FAILED }}
125+
TEST_SUCCESS: ${{ needs.e2e-test.outputs.TEST_SUCCESS }}
126+
TEST_REPORT_URL: ${{ needs.e2e-test.outputs.TEST_REPORT_URL }}
127+
secrets: inherit
128+
129+
cleanup-deployment:
130+
if: "!cancelled() && needs.deploy.outputs.RESOURCE_GROUP_NAME != '' && inputs.existing_webapp_url == '' && (inputs.trigger_type != 'workflow_dispatch' || inputs.cleanup_resources)"
131+
needs: [deploy, e2e-test]
132+
uses: ./.github/workflows/job-cleanup-deployment.yml
133+
with:
134+
runner_os: ${{ inputs.runner_os }}
135+
trigger_type: ${{ inputs.trigger_type }}
136+
cleanup_resources: ${{ inputs.cleanup_resources }}
137+
existing_webapp_url: ${{ inputs.existing_webapp_url }}
138+
RESOURCE_GROUP_NAME: ${{ needs.deploy.outputs.RESOURCE_GROUP_NAME }}
139+
AZURE_LOCATION: ${{ needs.deploy.outputs.AZURE_LOCATION }}
140+
AZURE_ENV_OPENAI_LOCATION: ${{ needs.deploy.outputs.AZURE_ENV_OPENAI_LOCATION }}
141+
ENV_NAME: ${{ needs.deploy.outputs.ENV_NAME }}
142+
IMAGE_TAG: ${{ needs.deploy.outputs.IMAGE_TAG }}
143+
RESOURCE_TOKEN: ${{ needs.deploy.outputs.RESOURCE_TOKEN }}
144+
secrets: inherit

0 commit comments

Comments
 (0)