Skip to content

Commit 0905e13

Browse files
2 parents 2f280b1 + a53bf13 commit 0905e13

File tree

148 files changed

+53719
-2567
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

148 files changed

+53719
-2567
lines changed

.devcontainer/devcontainer.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22
"name": "Multi Agent Custom Automation Engine Solution Accelerator",
33
"image": "mcr.microsoft.com/devcontainers/python:3.11-bullseye",
44
"features": {
5-
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
5+
"ghcr.io/devcontainers/features/docker-in-docker:2": {"version": "latest"},
66
"ghcr.io/azure/azure-dev/azd:latest": {},
77
"ghcr.io/devcontainers/features/node:1": {},
88
"ghcr.io/devcontainers/features/azure-cli:1": {},
9-
"ghcr.io/jsburckhardt/devcontainer-features/uv:1": {}
9+
"ghcr.io/jsburckhardt/devcontainer-features/uv:1": {"shellautocompletion": true,
10+
"version": "latest"}
1011
},
1112
"customizations": {
1213
"vscode": {

.devcontainer/setupEnv.sh

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
1-
#!/bin/bash
2-
3-
cd ./src/backend
4-
uv add -r requirements.txt
5-
6-
cd ../frontend
7-
uv add -r requirements.txt
8-
9-
cd ..
10-
11-
1+
#!/bin/sh
122

3+
echo "Pull latest code for the current branch"
4+
git fetch
5+
git pull
136

7+
set -e
148

9+
echo "Setting up Backend..."
10+
cd ./src/backend
11+
uv sync --frozen
12+
cd ../../
1513

14+
echo "Setting up Frontend..."
15+
cd ./src/frontend
16+
npm install
17+
pip install -r requirements.txt
18+
cd ../../
1619

17-
# pip install --upgrade pip
18-
19-
20-
# (cd ./src/frontend; pip install -r requirements.txt)
21-
22-
23-
# (cd ./src/backend; pip install -r requirements.txt)
24-
20+
echo "Setting up MCP..."
21+
cd ./src/mcp_server
22+
uv sync --frozen
23+
cd ../../
2524

25+
echo "Setup complete! 🎉"

.github/workflows/azure-dev.yml

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
name: Azure Template Validation
22
on:
3-
push:
4-
branches:
5-
- main
63
workflow_dispatch:
74

85
permissions:
@@ -13,19 +10,32 @@ permissions:
1310
jobs:
1411
template_validation_job:
1512
runs-on: ubuntu-latest
13+
environment: production
1614
name: template validation
1715
steps:
18-
- uses: actions/checkout@v4
19-
20-
- uses: microsoft/template-validation-action@Latest
16+
# Step 1: Checkout the code from your repository
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
# Step 2: Validate the Azure template using microsoft/template-validation-action
20+
- name: Validate Azure Template
21+
uses: microsoft/template-validation-action@Latest
22+
with:
23+
validateAzd: true
24+
useDevContainer: false
2125
id: validation
2226
env:
23-
AZURE_CLIENT_ID: ${{ vars.AZURE_CLIENT_ID }}
24-
AZURE_TENANT_ID: ${{ vars.AZURE_TENANT_ID }}
25-
AZURE_SUBSCRIPTION_ID: ${{ vars.AZURE_SUBSCRIPTION_ID }}
26-
AZURE_ENV_NAME: ${{ vars.AZURE_ENV_NAME }}
27-
AZURE_LOCATION: ${{ vars.AZURE_LOCATION }}
27+
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
28+
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
29+
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
30+
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
31+
AZURE_ENV_NAME: ${{ secrets.AZURE_ENV_NAME }}
32+
AZURE_LOCATION: ${{ secrets.AZURE_LOCATION }}
33+
AZURE_ENV_OPENAI_LOCATION : ${{ secrets.AZURE_AI_DEPLOYMENT_LOCATION }}
34+
AZURE_ENV_MODEL_CAPACITY: 1
35+
AZURE_ENV_MODEL_4_1_CAPACITY: 1
2836
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37+
AZURE_DEV_COLLECT_TELEMETRY: ${{ vars.AZURE_DEV_COLLECT_TELEMETRY }}
2938

39+
# Step 3: Print the result of the validation
3040
- name: print result
3141
run: cat ${{ steps.validation.outputs.resultFile }}

.github/workflows/deploy-waf.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Validate WAF Deployment
1+
name: Validate WAF Deployment v3
22

33
on:
44
push:
@@ -105,6 +105,10 @@ jobs:
105105
id: deploy
106106
run: |
107107
set -e
108+
109+
# Generate current timestamp in desired format: YYYY-MM-DDTHH:MM:SS.SSSSSSSZ
110+
current_date=$(date -u +"%Y-%m-%dT%H:%M:%S.%7NZ")
111+
108112
az deployment group create \
109113
--resource-group ${{ env.RESOURCE_GROUP_NAME }} \
110114
--template-file infra/main.bicep \
@@ -117,6 +121,8 @@ jobs:
117121
enableMonitoring=true \
118122
enablePrivateNetworking=true \
119123
enableScalability=true \
124+
createdBy="Pipeline" \
125+
tags="{'SecurityControl':'Ignore','Purpose':'Deploying and Cleaning Up Resources for Validation','CreatedDate':'$current_date'}"
120126
121127
122128
- name: Send Notification on Failure

.github/workflows/deploy.yml

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
name: Validate Deployment
1+
name: Validate Deployment v3
22

33
on:
44
workflow_run:
5-
workflows: ["Build Docker and Optional Push"]
5+
workflows: ["Build Docker and Optional Push v3"]
66
types:
77
- completed
88
branches:
99
- main
10+
- dev-v3
1011
- hotfix
11-
- dev
1212
schedule:
1313
- cron: "0 11,23 * * *" # Runs at 11:00 AM and 11:00 PM GMT
1414
workflow_dispatch: #Allow manual triggering
1515
env:
16-
GPT_MIN_CAPACITY: 150
16+
GPT_MIN_CAPACITY: 1
1717
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
1818

1919
jobs:
@@ -36,7 +36,7 @@ jobs:
3636
export AZURE_TENANT_ID=${{ secrets.AZURE_TENANT_ID }}
3737
export AZURE_CLIENT_SECRET=${{ secrets.AZURE_CLIENT_SECRET }}
3838
export AZURE_SUBSCRIPTION_ID="${{ secrets.AZURE_SUBSCRIPTION_ID }}"
39-
export GPT_MIN_CAPACITY="150"
39+
export GPT_MIN_CAPACITY="1"
4040
export AZURE_REGIONS="${{ vars.AZURE_REGIONS }}"
4141
4242
chmod +x infra/scripts/checkquota.sh
@@ -116,15 +116,18 @@ jobs:
116116
id: deploy
117117
run: |
118118
if [[ "${{ env.BRANCH_NAME }}" == "main" ]]; then
119-
IMAGE_TAG="latest"
120-
elif [[ "${{ env.BRANCH_NAME }}" == "dev" ]]; then
121-
IMAGE_TAG="dev"
119+
IMAGE_TAG="latest_v3"
120+
elif [[ "${{ env.BRANCH_NAME }}" == "dev-v3" ]]; then
121+
IMAGE_TAG="dev_v3"
122122
elif [[ "${{ env.BRANCH_NAME }}" == "hotfix" ]]; then
123123
IMAGE_TAG="hotfix"
124124
else
125125
IMAGE_TAG="latest"
126126
fi
127127
128+
# Generate current timestamp in desired format: YYYY-MM-DDTHH:MM:SS.SSSSSSSZ
129+
current_date=$(date -u +"%Y-%m-%dT%H:%M:%S.%7NZ")
130+
128131
az deployment group create \
129132
--resource-group ${{ env.RESOURCE_GROUP_NAME }} \
130133
--template-file infra/main.bicep \
@@ -137,8 +140,9 @@ jobs:
137140
backendContainerImageTag="${IMAGE_TAG}" \
138141
frontendContainerImageTag="${IMAGE_TAG}" \
139142
azureAiServiceLocation='${{ env.AZURE_LOCATION }}' \
140-
gptModelCapacity=150 \
143+
gptModelCapacity=1 \
141144
createdBy="Pipeline" \
145+
tags="{'SecurityControl':'Ignore','Purpose':'Deploying and Cleaning Up Resources for Validation','CreatedDate':'$current_date'}" \
142146
--output json
143147
144148
- name: Extract Web App and API App URLs
@@ -177,20 +181,9 @@ jobs:
177181
echo "SUCCESS=false" >> $GITHUB_OUTPUT
178182
fi
179183
180-
e2e-test:
181-
needs: deploy
182-
if: needs.deploy.outputs.DEPLOYMENT_SUCCESS == 'true'
183-
uses: ./.github/workflows/test-automation.yml
184-
with:
185-
MACAE_WEB_URL: ${{ needs.deploy.outputs.WEBAPP_URL }}
186-
MACAE_URL_API: ${{ needs.deploy.outputs.MACAE_URL_API }}
187-
MACAE_RG: ${{ needs.deploy.outputs.RESOURCE_GROUP_NAME }}
188-
MACAE_CONTAINER_APP: ${{ needs.deploy.outputs.CONTAINER_APP }}
189-
secrets: inherit
190-
191184
cleanup-deployment:
192185
if: always() && needs.deploy.outputs.RESOURCE_GROUP_NAME != ''
193-
needs: [deploy, e2e-test]
186+
needs: [deploy]
194187
runs-on: ubuntu-latest
195188
env:
196189
RESOURCE_GROUP_NAME: ${{ needs.deploy.outputs.RESOURCE_GROUP_NAME }}

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

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
name: Build Docker and Optional Push
1+
name: Build Docker and Optional Push v3
22

33
on:
44
push:
55
branches:
66
- main
7-
- dev
8-
- demo
7+
- dev-v3
8+
- demo-v3
99
- hotfix
1010
pull_request:
1111
types:
@@ -15,8 +15,8 @@ on:
1515
- synchronize
1616
branches:
1717
- main
18-
- dev
19-
- demo
18+
- dev-v3
19+
- demo-v3
2020
- hotfix
2121
workflow_dispatch:
2222

@@ -32,7 +32,7 @@ jobs:
3232
uses: docker/setup-buildx-action@v1
3333

3434
- name: Log in to Azure Container Registry
35-
if: ${{ github.ref_name == 'main' || github.ref_name == 'dev' || github.ref_name == 'demo' || github.ref_name == 'hotfix' }}
35+
if: ${{ github.ref_name == 'main' || github.ref_name == 'dev-v3'|| github.ref_name == 'demo-v3' || github.ref_name == 'hotfix' }}
3636
uses: azure/docker-login@v2
3737
with:
3838
login-server: ${{ secrets.ACR_LOGIN_SERVER || 'acrlogin.azurecr.io' }}
@@ -52,11 +52,11 @@ jobs:
5252
id: determine_tag
5353
run: |
5454
if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then
55-
echo "TAG=latest" >> $GITHUB_ENV
56-
elif [[ "${{ github.ref }}" == "refs/heads/dev" ]]; then
57-
echo "TAG=dev" >> $GITHUB_ENV
58-
elif [[ "${{ github.ref }}" == "refs/heads/demo" ]]; then
59-
echo "TAG=demo" >> $GITHUB_ENV
55+
echo "TAG=latest_v3" >> $GITHUB_ENV
56+
elif [[ "${{ github.ref }}" == "refs/heads/dev-v3" ]]; then
57+
echo "TAG=dev_v3" >> $GITHUB_ENV
58+
elif [[ "${{ github.ref }}" == "refs/heads/demo-v3" ]]; then
59+
echo "TAG=demo_v3" >> $GITHUB_ENV
6060
elif [[ "${{ github.ref }}" == "refs/heads/hotfix" ]]; then
6161
echo "TAG=hotfix" >> $GITHUB_ENV
6262
else
@@ -88,4 +88,14 @@ jobs:
8888
push: ${{ env.TAG != 'pullrequest-ignore' }}
8989
tags: |
9090
${{ steps.registry.outputs.ext_registry }}/macaefrontend:${{ env.TAG }}
91-
${{ steps.registry.outputs.ext_registry }}/macaefrontend:${{ env.HISTORICAL_TAG }}
91+
${{ steps.registry.outputs.ext_registry }}/macaefrontend:${{ env.HISTORICAL_TAG }}
92+
93+
- name: Build and optionally push MCP Docker image
94+
uses: docker/build-push-action@v6
95+
with:
96+
context: ./src/mcp_server
97+
file: ./src/mcp_server/Dockerfile
98+
push: ${{ env.TAG != 'pullrequest-ignore' }}
99+
tags: |
100+
${{ steps.registry.outputs.ext_registry }}/macaemcp:${{ env.TAG }}
101+
${{ steps.registry.outputs.ext_registry }}/macaemcp:${{ env.HISTORICAL_TAG }}

.github/workflows/test.yml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,29 @@ jobs:
4848
echo "Test files found, running tests."
4949
echo "skip_tests=false" >> $GITHUB_ENV
5050
fi
51+
5152
- name: Run tests with coverage
5253
if: env.skip_tests == 'false'
5354
run: |
54-
pytest --cov=. --cov-report=term-missing --cov-report=xml --ignore=tests/e2e-test/tests
55+
pytest --cov=. --cov-report=term-missing --cov-report=xml \
56+
--ignore=tests/e2e-test/tests \
57+
--ignore=src/backend/tests/test_app.py \
58+
--ignore=src/tests/agents/test_foundry_integration.py \
59+
--ignore=src/tests/mcp_server/test_factory.py \
60+
--ignore=src/tests/mcp_server/test_hr_service.py \
61+
--ignore=src/backend/tests/test_config.py \
62+
--ignore=src/tests/agents/test_human_approval_manager.py \
63+
--ignore=src/backend/tests/test_team_specific_methods.py \
64+
--ignore=src/backend/tests/models/test_messages.py \
65+
--ignore=src/backend/tests/test_otlp_tracing.py \
66+
--ignore=src/backend/tests/auth/test_auth_utils.py
67+
68+
# - name: Run tests with coverage
69+
# if: env.skip_tests == 'false'
70+
# run: |
71+
# pytest --cov=. --cov-report=term-missing --cov-report=xml --ignore=tests/e2e-test/tests
5572

5673
- name: Skip coverage report if no tests
5774
if: env.skip_tests == 'true'
5875
run: |
59-
echo "Skipping coverage report because no tests were found."
76+
echo "Skipping coverage report because no tests were found."

README.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,6 @@ The solution leverages Azure OpenAI Service, Azure Container Apps, Azure Cosmos
2929
|![image](./docs/images/readme/agent_flow.png)|
3030
|---|
3131

32-
### How to customize
33-
If you'd like to customize the solution accelerator, here are some common areas to start:
34-
35-
[Custom scenario](./docs/CustomizeSolution.md)
36-
3732
<br/>
3833

3934
### Additional resources
@@ -72,6 +67,8 @@ Quick deploy
7267
### How to install or deploy
7368
Follow the quick deploy steps on the deployment guide to deploy this solution to your own Azure subscription.
7469

70+
> **Note:** This solution accelerator requires **Azure Developer CLI (azd) version 1.18.0 or higher**. Please ensure you have the latest version installed before proceeding with deployment. [Download azd here](https://learn.microsoft.com/en-us/azure/developer/azure-developer-cli/install-azd).
71+
7572
[Click here to launch the deployment guide](./docs/DeploymentGuide.md)
7673
<br/><br/>
7774

0 commit comments

Comments
 (0)