Skip to content

Commit 7172287

Browse files
Merge pull request #371 from microsoft/main
fix: downmerge from main to dev
2 parents c3e807e + c7def41 commit 7172287

224 files changed

Lines changed: 2951 additions & 3833 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/devcontainer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
]
1717
}
1818
},
19-
// "postStartCommand": "git pull origin main && python3 -m pip install -r infra/scripts/index_scripts/requirements.txt",
19+
"postStartCommand": "git pull origin main && python3 -m pip install -r infra/scripts/index_scripts/requirements.txt && curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash && chmod +x ./scripts/quota_check_params.sh",
2020
"remoteUser": "vscode",
2121
"hostRequirements": {
2222
"memory": "4gb"
2323
}
24-
}
24+
}

.github/workflows/azure-dev.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
name: Azure Template Validation
22
on:
3-
# workflow_dispatch:
4-
push:
5-
branches:
6-
- dev
3+
workflow_dispatch:
74

85
permissions:
96
contents: read
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
6+
permissions:
7+
contents: write
8+
pull-requests: write
9+
10+
name: Create-Release
11+
12+
jobs:
13+
create-release:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
with:
19+
ref: ${{ github.event.workflow_run.head_sha }}
20+
21+
- uses: codfish/semantic-release-action@v3
22+
id: semantic
23+
with:
24+
tag-format: 'v${version}'
25+
additional-packages: |
26+
['conventional-changelog-conventionalcommits@7']
27+
plugins: |
28+
[
29+
[
30+
"@semantic-release/commit-analyzer",
31+
{
32+
"preset": "conventionalcommits"
33+
}
34+
],
35+
[
36+
"@semantic-release/release-notes-generator",
37+
{
38+
"preset": "conventionalcommits",
39+
"presetConfig": {
40+
"types": [
41+
{ type: 'feat', section: 'Features', hidden: false },
42+
{ type: 'fix', section: 'Bug Fixes', hidden: false },
43+
{ type: 'perf', section: 'Performance Improvements', hidden: false },
44+
{ type: 'revert', section: 'Reverts', hidden: false },
45+
{ type: 'docs', section: 'Other Updates', hidden: false },
46+
{ type: 'style', section: 'Other Updates', hidden: false },
47+
{ type: 'chore', section: 'Other Updates', hidden: false },
48+
{ type: 'refactor', section: 'Other Updates', hidden: false },
49+
{ type: 'test', section: 'Other Updates', hidden: false },
50+
{ type: 'build', section: 'Other Updates', hidden: false },
51+
{ type: 'ci', section: 'Other Updates', hidden: false }
52+
]
53+
}
54+
}
55+
],
56+
'@semantic-release/github'
57+
]
58+
env:
59+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
60+
- run: echo ${{ steps.semantic.outputs.release-version }}
61+
62+
- run: echo "$OUTPUTS"
63+
env:
64+
OUTPUTS: ${{ toJson(steps.semantic.outputs) }}

.github/workflows/deploy.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -111,16 +111,17 @@ jobs:
111111
set -e
112112
az deployment group create \
113113
--resource-group ${{ env.RESOURCE_GROUP_NAME }} \
114-
--template-file infrastructure/deployment.json \
114+
--template-file infra/main.json \
115115
--parameters \
116-
HostingPlanName="${{ env.SOLUTION_PREFIX }}-plan" \
117-
ApplicationInsightsName="appins-${{ env.SOLUTION_PREFIX }}" \
118-
WebsiteName="webapp-${{ env.SOLUTION_PREFIX }}" \
119-
CosmosDBName="db-cosmos-${{ env.SOLUTION_PREFIX }}" \
120-
CosmosDBRegion="${{ env.AZURE_LOCATION }}" \
121-
AzureSearchService="search-${{ env.SOLUTION_PREFIX }}" \
122-
AzureOpenAIResource="aoai-${{ env.SOLUTION_PREFIX }}" \
123-
WorkspaceName="worksp-${{ env.SOLUTION_PREFIX }}"
116+
environmentName="${{ env.SOLUTION_PREFIX }}" \
117+
secondaryLocation="eastus2" \
118+
deploymentType="GlobalStandard" \
119+
gptModelName="gpt-4o" \
120+
azureOpenaiAPIVersion="2024-05-01-preview" \
121+
gptDeploymentCapacity="10" \
122+
embeddingModel="text-embedding-ada-002" \
123+
embeddingDeploymentCapacity="30" \
124+
imageTag="latest"
124125
125126
- name: Delete Bicep Deployment
126127
if: success()

.github/workflows/docker-build-and-push.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ jobs:
7272
- name: Build Docker Image and optionally push - Internal Registry
7373
uses: docker/build-push-action@v6
7474
with:
75-
context: .
76-
file: WebApp.Dockerfile
75+
context: ./src
76+
file: ./src/WebApp.Dockerfile
7777
push: ${{ github.ref_name == 'main' || github.ref_name == 'dev' || github.ref_name == 'demo' || github.ref_name == 'dependabotchanges' }}
7878
tags: |
7979
${{ steps.registry.outputs.int_registry }}/webapp:${{ steps.determine_tag.outputs.tagname }}
@@ -83,8 +83,8 @@ jobs:
8383
if: ${{ github.ref_name == 'main' }}
8484
uses: docker/build-push-action@v6
8585
with:
86-
context: .
87-
file: WebApp.Dockerfile
86+
context: ./src
87+
file: ./src/WebApp.Dockerfile
8888
push: ${{github.ref_name == 'main' }}
8989
tags: |
9090
${{ steps.registry.outputs.ext_registry }}/webapp:${{ steps.determine_tag.outputs.tagname }}

.github/workflows/node.js.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ jobs:
1515
runs-on: ubuntu-latest
1616
defaults:
1717
run:
18-
working-directory: frontend
18+
working-directory: src/frontend
1919
strategy:
2020
matrix:
21-
node-version: [16.x, 18.x, 21.x]
21+
node-version: [18.x, 21.x]
2222
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
2323

2424
steps:
@@ -28,7 +28,8 @@ jobs:
2828
with:
2929
node-version: ${{ matrix.node-version }}
3030
cache: 'npm'
31-
cache-dependency-path: '**/package-lock.json'
31+
cache-dependency-path: 'src/frontend/package-lock.json'
3232
- run: npm ci
33+
- run: npm install --save-dev jest-environment-jsdom # Install missing package
3334
- run: NODE_OPTIONS=--max_old_space_size=8192 npm run build --if-present
3435
- run: npm run test --if-present

.github/workflows/pylint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- name: Install dependencies
2424
run: |
2525
python -m pip install --upgrade pip
26-
pip install -r requirements-dev.txt
26+
pip install -r src/requirements-dev.txt
2727
2828
# Step 3: Run all code quality checks
2929
- name: Pylint

.github/workflows/python-app.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ jobs:
2525
- name: Install dependencies
2626
run: |
2727
python -m pip install --upgrade pip
28-
pip install -r requirements-dev.txt
28+
pip install -r src/requirements-dev.txt
2929
- name: Test with pytest
3030
run: |
31-
export PYTHONPATH=$(pwd)
31+
export PYTHONPATH=$(pwd)/src
3232
pytest -v --show-capture=stdout -k "not integration"
3333
3434
test_windows:
@@ -43,8 +43,8 @@ jobs:
4343
- name: Install dependencies
4444
run: |
4545
python -m pip install --upgrade pip
46-
pip install -r requirements-dev.txt
46+
pip install -r src/requirements-dev.txt
4747
- name: Test with pytest
4848
run: |
49-
$env:PYTHONPATH=$pwd
49+
$env:PYTHONPATH="$pwd\src"
5050
pytest -v --show-capture=stdout -k "not integration"

.github/workflows/tests.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929

3030
- name: Install Backend Dependencies
3131
run: |
32-
python -m pip install -r requirements.txt
32+
python -m pip install -r src/requirements.txt
3333
python -m pip install coverage pytest-cov
3434
python -m pip install azure-keyvault-secrets
3535
@@ -79,21 +79,21 @@ jobs:
7979
${{ runner.os }}-node-
8080
8181
- name: Navigate to frontend directory
82-
run: cd frontend
82+
run: cd src/frontend
8383

8484
- name: Install Frontend Dependencies
8585
run: |
86-
cd frontend # Change to the frontend directory
86+
cd src/frontend # Change to the frontend directory
8787
npm install # Install dependencies from frontend/package.json
8888
8989
- name: Run Frontend Tests with Coverage
9090
run: |
91-
cd frontend # Change to the frontend directory
91+
cd src/frontend # Change to the frontend directory
9292
if npm run test -- --coverage; then
9393
echo "Tests completed, checking coverage."
9494
# Check coverage report and ensure it meets threshold
95-
if [ -f frontend/coverage/lcov-report/index.html ]; then
96-
COVERAGE=$(cat frontend/coverage/lcov-report/index.html | grep -oP 'total: \K[0-9]+(\.[0-9]+)?')
95+
if [ -f src/frontend/coverage/lcov-report/index.html ]; then
96+
COVERAGE=$(cat src/frontend/coverage/lcov-report/index.html | grep -oP 'total: \K[0-9]+(\.[0-9]+)?')
9797
if (( $(echo "$COVERAGE < 80" | bc -l) )); then
9898
echo "Coverage is below 80%, failing the job."
9999
exit 1
@@ -107,5 +107,5 @@ jobs:
107107
with:
108108
name: frontend-coverage
109109
path: |
110-
frontend/coverage/ # Correct path to frontend coverage
111-
frontend/coverage/lcov-report/ # Correct path to frontend lcov report
110+
src/frontend/coverage/ # Correct path to frontend coverage
111+
src/frontend/coverage/lcov-report/ # Correct path to frontend lcov report

.gitignore

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
.venv
2-
frontend/node_modules
2+
33
.env
44
.azure/
55
__pycache__/
66
.ipynb_checkpoints/
7-
static
8-
scripts/config.json
7+
8+
99
venv
1010
myenv
11-
frontend/coverage
11+
1212
scriptsenv/

0 commit comments

Comments
 (0)