Skip to content

Commit 9da84c0

Browse files
tag error not found
2 parents c96e3e8 + 250e6fd commit 9da84c0

File tree

152 files changed

+20328
-9144
lines changed

Some content is hidden

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

152 files changed

+20328
-9144
lines changed

.azdo/pipelines/azure-dev.yml

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# Run when commits are pushed to mainline branch (main or master)
2+
# Set this to the mainline branch you are using
3+
trigger:
4+
- main
5+
6+
# Azure Pipelines workflow to deploy to Azure using azd
7+
# To configure required secrets and service connection for connecting to Azure, simply run `azd pipeline config --provider azdo`
8+
# Task "Install azd" needs to install setup-azd extension for azdo - https://marketplace.visualstudio.com/items?itemName=ms-azuretools.azd
9+
# See below for alternative task to install azd if you can't install above task in your organization
10+
11+
pool:
12+
vmImage: ubuntu-latest
13+
14+
steps:
15+
- task: setup-azd@0
16+
displayName: Install azd
17+
18+
# If you can't install above task in your organization, you can comment it and uncomment below task to install azd
19+
# - task: Bash@3
20+
# displayName: Install azd
21+
# inputs:
22+
# targetType: 'inline'
23+
# script: |
24+
# curl -fsSL https://aka.ms/install-azd.sh | bash
25+
26+
# azd delegate auth to az to use service connection with AzureCLI@2
27+
- pwsh: |
28+
azd config set auth.useAzCliAuth "true"
29+
displayName: Configure AZD to Use AZ CLI Authentication.
30+
31+
- task: AzureCLI@2
32+
displayName: Provision Infrastructure
33+
inputs:
34+
azureSubscription: azconnection
35+
scriptType: bash
36+
scriptLocation: inlineScript
37+
inlineScript: |
38+
azd provision --no-prompt
39+
env:
40+
41+
AZURE_SUBSCRIPTION_ID: $(AZURE_SUBSCRIPTION_ID)
42+
AZURE_ENV_NAME: $(AZURE_ENV_NAME)
43+
AZURE_LOCATION: $(AZURE_LOCATION)
44+
# Project specific environment variables
45+
# AZURE_RESOURCE_GROUP: $(AZURE_RESOURCE_GROUP)
46+
# AZURE_AIHUB_NAME: $(AZURE_AIHUB_NAME)
47+
# AZURE_AIPROJECT_NAME: $(AZURE_AIPROJECT_NAME)
48+
# AZURE_AISERVICES_NAME: $(AZURE_AISERVICES_NAME)
49+
# AZURE_SEARCH_SERVICE_NAME: $(AZURE_SEARCH_SERVICE_NAME)
50+
# AZURE_APPLICATION_INSIGHTS_NAME: $(AZURE_APPLICATION_INSIGHTS_NAME)
51+
# AZURE_CONTAINER_REGISTRY_NAME: $(AZURE_CONTAINER_REGISTRY_NAME)
52+
# AZURE_KEYVAULT_NAME: $(AZURE_KEYVAULT_NAME)
53+
# AZURE_STORAGE_ACCOUNT_NAME: $(AZURE_STORAGE_ACCOUNT_NAME)
54+
# AZURE_LOG_ANALYTICS_WORKSPACE_NAME: $(AZURE_LOG_ANALYTICS_WORKSPACE_NAME)
55+
# USE_CONTAINER_REGISTRY: $(USE_CONTAINER_REGISTRY)
56+
# USE_APPLICATION_INSIGHTS: $(USE_APPLICATION_INSIGHTS)
57+
# USE_SEARCH_SERVICE: $(USE_SEARCH_SERVICE)
58+
# AZURE_AI_CHAT_DEPLOYMENT_NAME: $(AZURE_AI_CHAT_DEPLOYMENT_NAME)
59+
# AZURE_AI_CHAT_DEPLOYMENT_SKU: $(AZURE_AI_CHAT_DEPLOYMENT_SKU)
60+
# AZURE_AI_CHAT_DEPLOYMENT_CAPACITY: $(AZURE_AI_CHAT_DEPLOYMENT_CAPACITY)
61+
# AZURE_AI_CHAT_MODEL_FORMAT: $(AZURE_AI_CHAT_MODEL_FORMAT)
62+
# AZURE_AI_CHAT_MODEL_NAME: $(AZURE_AI_CHAT_MODEL)
63+
# AZURE_AI_CHAT_MODEL_VERSION: $(AZURE_AI_CHAT_MODEL_VERSION)
64+
# AZURE_AI_EMBED_DEPLOYMENT_NAME: $(AZURE_AI_EMBED_DEPLOYMENT_NAME)
65+
# AZURE_AI_EMBED_DEPLOYMENT_SKU: $(AZURE_AI_EMBED_DEPLOYMENT_SKU)
66+
# AZURE_AI_EMBED_DEPLOYMENT_CAPACITY: $(AZURE_AI_EMBED_DEPLOYMENT_CAPACITY)
67+
# AZURE_AI_EMBED_MODEL_FORMAT: $(AZURE_AI_EMBED_MODEL_FORMAT)
68+
# AZURE_AI_EMBED_MODEL_NAME: $(AZURE_AI_EMBED_MODEL_NAME)
69+
# AZURE_AI_EMBED_MODEL_VERSION: $(AZURE_AI_EMBED_MODEL_VERSION)
70+
# AZURE_EXISTING_AIPROJECT_CONNECTION_STRING: $(AZURE_EXISTING_AIPROJECT_CONNECTION_STRING)
71+
- task: AzureCLI@2
72+
displayName: Deploy Application
73+
inputs:
74+
azureSubscription: azconnection
75+
scriptType: bash
76+
scriptLocation: inlineScript
77+
inlineScript: |
78+
azd deploy --no-prompt
79+
env:
80+
AZURE_SUBSCRIPTION_ID: $(AZURE_SUBSCRIPTION_ID)
81+
AZURE_ENV_NAME: $(AZURE_ENV_NAME)
82+
AZURE_LOCATION: $(AZURE_LOCATION)

.devcontainer/devcontainer.json

Lines changed: 31 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,48 @@
11
{
22
"name": "Multi Agent Custom Automation Engine Solution Accelerator",
3-
"image": "mcr.microsoft.com/devcontainers/python:3.10",
3+
"image": "mcr.microsoft.com/devcontainers/python:3.11-bullseye",
44
"features": {
5-
"ghcr.io/devcontainers/features/azure-cli:1.0.8": {},
5+
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
66
"ghcr.io/azure/azure-dev/azd:latest": {},
7-
"ghcr.io/rchaganti/vsc-devcontainer-features/azurebicep:1.0.5": {}
7+
"ghcr.io/devcontainers/features/node:1": {},
8+
"ghcr.io/devcontainers/features/azure-cli:1": {},
9+
"ghcr.io/jsburckhardt/devcontainer-features/uv:1": {}
810
},
9-
10-
"postCreateCommand": "sudo chmod +x .devcontainer/setupEnv.sh && ./.devcontainer/setupEnv.sh",
11-
1211
"customizations": {
1312
"vscode": {
1413
"extensions": [
14+
"dbaeumer.vscode-eslint",
15+
"esbenp.prettier-vscode",
16+
"GitHub.vscode-github-actions",
1517
"ms-azuretools.azure-dev",
18+
"ms-azuretools.vscode-azurefunctions",
1619
"ms-azuretools.vscode-bicep",
17-
"ms-python.python"
18-
]
19-
},
20-
"codespaces": {
21-
"openFiles": [
22-
"README.md"
20+
"ms-azuretools.vscode-docker",
21+
"ms-vscode.js-debug",
22+
"ms-vscode.vscode-node-azure-pack",
23+
"charliermarsh.ruff",
24+
"exiasr.hadolint",
25+
"kevinrose.vsc-python-indent",
26+
"mosapride.zenkaku",
27+
"ms-python.python",
28+
"njpwerner.autodocstring",
29+
"redhat.vscode-yaml",
30+
"shardulm94.trailing-spaces",
31+
"tamasfe.even-better-toml",
32+
"yzhang.markdown-all-in-one",
33+
"ms-vscode.azure-account"
2334
]
2435
}
2536
},
26-
37+
"postCreateCommand": "bash ./.devcontainer/setupEnv.sh",
38+
"containerEnv": {
39+
"DISPLAY": "dummy",
40+
"PYTHONUNBUFFERED": "True",
41+
"UV_LINK_MODE": "copy",
42+
"UV_PROJECT_ENVIRONMENT": "/home/vscode/.venv"
43+
},
2744
"remoteUser": "vscode",
2845
"hostRequirements": {
2946
"memory": "8gb"
3047
}
31-
}
48+
}

.devcontainer/setupEnv.sh

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,25 @@
11
#!/bin/bash
22

3-
pip install --upgrade pip
3+
cd ./src/backend
4+
uv add -r requirements.txt
45

6+
cd ../frontend
7+
uv add -r requirements.txt
58

6-
(cd ./src/frontend; pip install -r requirements.txt)
9+
cd ..
710

811

9-
(cd ./src/backend; pip install -r requirements.txt)
12+
13+
14+
15+
16+
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)
1024

1125

.flake8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[flake8]
22
max-line-length = 88
33
extend-ignore = E501
4-
exclude = .venv, frontend
4+
exclude = .venv, frontend, src/backend/tests
55
ignore = E203, W503, G004, G200, E402
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +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-
* @Avijit-Microsoft @Roopan-Microsoft @Prajwal-Microsoft @marktayl1 @Fr4nc3
5+
* @Avijit-Microsoft @Roopan-Microsoft @Prajwal-Microsoft @marktayl1 @Fr4nc3 @Vinay-Microsoft @aniaroramsft

.github/workflows/azure-dev.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Azure Template Validation
2+
on:
3+
push:
4+
branches:
5+
- main
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
id-token: write
11+
pull-requests: write
12+
13+
jobs:
14+
template_validation_job:
15+
runs-on: ubuntu-latest
16+
name: template validation
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- uses: microsoft/template-validation-action@Latest
21+
id: validation
22+
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 }}
28+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29+
30+
- name: print result
31+
run: cat ${{ steps.validation.outputs.resultFile }}

.github/workflows/deploy.yml

Lines changed: 8 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ jobs:
2424
export GPT_MIN_CAPACITY="50"
2525
export AZURE_REGIONS="${{ vars.AZURE_REGIONS }}"
2626
27-
chmod +x deploy/scripts/checkquota.sh
28-
if ! deploy/scripts/checkquota.sh; then
27+
chmod +x infra/scripts/checkquota.sh
28+
if ! infra/scripts/checkquota.sh; then
2929
# If quota check fails due to insufficient quota, set the flag
30-
if grep -q "No region with sufficient quota found" deploy/scripts/checkquota.sh; then
30+
if grep -q "No region with sufficient quota found" infra/scripts/checkquota.sh; then
3131
echo "QUOTA_FAILED=true" >> $GITHUB_ENV
3232
fi
3333
exit 1 # Fail the pipeline if any other failure occurs
@@ -73,9 +73,9 @@ jobs:
7373
id: generate_rg_name
7474
run: |
7575
echo "Generating a unique resource group name..."
76-
TIMESTAMP=$(date +%Y%m%d%H%M%S)
77-
COMMON_PART="ci-biab"
78-
UNIQUE_RG_NAME="${COMMON_PART}${TIMESTAMP}"
76+
ACCL_NAME="macae" # Account name as specified
77+
SHORT_UUID=$(uuidgen | cut -d'-' -f1)
78+
UNIQUE_RG_NAME="arg-${ACCL_NAME}-${SHORT_UUID}"
7979
echo "RESOURCE_GROUP_NAME=${UNIQUE_RG_NAME}" >> $GITHUB_ENV
8080
echo "Generated Resource_GROUP_PREFIX: ${UNIQUE_RG_NAME}"
8181
@@ -100,7 +100,7 @@ jobs:
100100
set -e
101101
az deployment group create \
102102
--resource-group ${{ env.RESOURCE_GROUP_NAME }} \
103-
--template-file deploy/macae.bicep \
103+
--template-file infra/macae.bicep \
104104
--parameters azureOpenAILocation=${{env.AZURE_LOCATION }} cosmosLocation=${{env.AZURE_LOCATION }}
105105
106106
@@ -168,34 +168,6 @@ jobs:
168168
echo "Azure Container Registry name: ${acr_name}"
169169
fi
170170
171-
172-
- name: Build the image and update the container app
173-
id: build-and-update
174-
run: |
175-
176-
set -e
177-
# Define variables for acr and container app names
178-
acr_name="${{ env.ACR_NAME }}"
179-
echo "ACR name: {$acr_name}"
180-
backend_container_app_name="macae-backend"
181-
backend_build_image_tag="backend:latest"
182-
183-
echo "Building the container image..."
184-
# Build the image
185-
az acr build -r ${acr_name} -t ${backend_build_image_tag} ./src/backend
186-
echo "Backend image build completed successfully."
187-
188-
frontend_container_app_name="${{ env.APP_SERVICE_NAME }}"
189-
frontend_build_image_tag="frontend:latest"
190-
191-
echo "Building the container image..."
192-
# Build the image
193-
az acr build -r ${acr_name} -t ${frontend_build_image_tag} ./src/frontend
194-
echo "Frontend image build completed successfully."
195-
196-
# Add the new container to the website
197-
az webapp config container set --resource-group ${{ env.RESOURCE_GROUP_NAME }} --name ${frontend_container_app_name} --container-image-name ${acr_name}.azurecr.io/frontend:latest --container-registry-url https://${acr_name}.azurecr.io
198-
199171
200172
- name: Delete Bicep Deployment
201173
if: success()
@@ -282,4 +254,4 @@ jobs:
282254
echo "Purged the openai resource: ${{ env.OPENAI_RESOURCE_NAME }}"
283255
fi
284256
285-
echo "Resource purging completed successfully"
257+
echo "Resource purging completed successfully"

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

Lines changed: 34 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ on:
1818
- dev
1919
- demo
2020
- hotfix
21-
workflow_dispatch:
21+
workflow_dispatch:
2222

2323
jobs:
2424
build-and-push:
@@ -32,14 +32,19 @@ 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' || github.ref_name == 'demo' || github.ref_name == 'hotfix' }}
3636
uses: azure/docker-login@v2
3737
with:
3838
login-server: ${{ secrets.ACR_LOGIN_SERVER }}
3939
username: ${{ secrets.ACR_USERNAME }}
4040
password: ${{ secrets.ACR_PASSWORD }}
4141

42-
- name: Set Docker image tag
42+
- name: Get current date
43+
id: date
44+
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
45+
46+
- name: Determine Tag Name Based on Branch
47+
id: determine_tag
4348
run: |
4449
if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then
4550
echo "TAG=latest" >> $GITHUB_ENV
@@ -52,29 +57,35 @@ jobs:
5257
else
5358
echo "TAG=pullrequest-ignore" >> $GITHUB_ENV
5459
fi
55-
60+
5661
- name: Get registry
5762
id: registry
5863
run: |
5964
echo "ext_registry=${{ secrets.ACR_LOGIN_SERVER || 'acrlogin.azurecr.io'}}" >> $GITHUB_OUTPUT
60-
61-
- name: Build and push Docker images optionally
65+
66+
- name: Set Historical Tag
6267
run: |
63-
cd src/backend
64-
docker build -t ${{ steps.registry.outputs.ext_registry }}/macaebackend:${{ env.TAG }} -f Dockerfile . && \
65-
if [[ "${{ env.TAG }}" == "latest" || "${{ env.TAG }}" == "dev" || "${{ env.TAG }}" == "demo" || "${{ env.TAG }}" == "hotfix" ]]; then
66-
docker push ${{ steps.registry.outputs.ext_registry }}/macaebackend:${{ env.TAG }} && \
67-
echo "Backend image built and pushed successfully."
68-
else
69-
echo "Skipping Docker push for backend with tag: ${{ env.TAG }}"
70-
fi
71-
cd ../frontend
72-
docker build -t ${{ steps.registry.outputs.ext_registry }}/macaefrontend:${{ env.TAG }} -f Dockerfile . && \
73-
if [[ "${{ env.TAG }}" == "latest" || "${{ env.TAG }}" == "dev" || "${{ env.TAG }}" == "demo" || "${{ env.TAG }}" == "hotfix" ]]; then
74-
docker push ${{ steps.registry.outputs.ext_registry }}/macaefrontend:${{ env.TAG }} && \
75-
echo "Frontend image built and pushed successfully."
76-
else
77-
echo "Skipping Docker push for frontend with tag: ${{ env.TAG }}"
78-
fi
68+
DATE_TAG=$(date +'%Y-%m-%d')
69+
RUN_ID=${{ github.run_number }}
70+
# Create historical tag using TAG, DATE_TAG, and RUN_ID
71+
echo "HISTORICAL_TAG=${{ env.TAG }}_${DATE_TAG}_${RUN_ID}" >> $GITHUB_ENV
7972
80-
73+
- name: Build and optionally push Backend Docker image
74+
uses: docker/build-push-action@v6
75+
with:
76+
context: ./src/backend
77+
file: ./src/backend/Dockerfile
78+
push: ${{ env.TAG != 'pullrequest-ignore' }}
79+
tags: |
80+
${{ steps.registry.outputs.ext_registry }}/macaebackend:${{ env.TAG }}
81+
${{ steps.registry.outputs.ext_registry }}/macaebackend:${{ env.HISTORICAL_TAG }}
82+
83+
- name: Build and optionally push Frontend Docker image
84+
uses: docker/build-push-action@v6
85+
with:
86+
context: ./src/frontend
87+
file: ./src/frontend/Dockerfile
88+
push: ${{ env.TAG != 'pullrequest-ignore' }}
89+
tags: |
90+
${{ steps.registry.outputs.ext_registry }}/macaefrontend:${{ env.TAG }}
91+
${{ steps.registry.outputs.ext_registry }}/macaefrontend:${{ env.HISTORICAL_TAG }}

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,4 +456,5 @@ __pycache__/
456456
*.xsd.cs
457457

458458
*.whl
459-
!autogen_core-0.3.dev0-py3-none-any.whl
459+
.azure
460+
.github/copilot-instructions.md

0 commit comments

Comments
 (0)