From d6a956b640feb555e1b93be19acb80971c7c5832 Mon Sep 17 00:00:00 2001 From: "Niraj Chaudhari (Persistent Systems Inc)" Date: Wed, 3 Sep 2025 11:24:48 +0530 Subject: [PATCH 1/3] Add deployer name in Createdby tag --- infra/main.bicep | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/infra/main.bicep b/infra/main.bicep index 1fc9582c..56589a8d 100644 --- a/infra/main.bicep +++ b/infra/main.bicep @@ -165,6 +165,25 @@ var replicaLocation = replicaRegionPairs[location] // Resources // // ============== // +var deployerInfo = deployer() +var allTags = union( + { + 'azd-env-name': solutionName + }, + tags +) +resource resourceGroupTags 'Microsoft.Resources/tags@2021-04-01' = { + name: 'default' + properties: { + tags: { + ...allTags + TemplateName: 'MACAE' + CreatedBy: split(deployerInfo.userPrincipalName, '@')[0] + } + } +} + + #disable-next-line no-deployments-resources resource avmTelemetry 'Microsoft.Resources/deployments@2024-03-01' = if (enableTelemetry) { name: '46d3xbcp.ptn.sa-multiagentcustauteng.${replace('-..--..-', '.', '-')}.${substring(uniqueString(deployment().name, location), 0, 4)}' From cb0f6f0e2a22956b1fa158a233fa175b64dd2c37 Mon Sep 17 00:00:00 2001 From: Dhruvkumar-Microsoft Date: Thu, 4 Sep 2025 13:23:03 +0530 Subject: [PATCH 2/3] added the intallation changes --- docs/DeploymentGuide.md | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/docs/DeploymentGuide.md b/docs/DeploymentGuide.md index fb4fca41..d246079f 100644 --- a/docs/DeploymentGuide.md +++ b/docs/DeploymentGuide.md @@ -344,16 +344,23 @@ The files for the dev container are located in `/.devcontainer/` folder. - If you are using `venv`, create and activate your virtual environment for both the frontend and backend folders. -8. **Install requirements - frontend:** +8. **Install requirements - Backend:** - - In each of the frontend and backend folders - - Open a terminal in the `src` folder and run: + - To install the requirement for backend - + Open a terminal in the `src/backend` folder and run: ```bash - pip install -r requirements.txt + pip install uv + uv sync ``` 9. **Build the frontend (important):** + - To install the requirement for frontend - + Open a terminal in the `src/frontend` folder and run: + ```bash + pip install -r requirements.txt + ``` + - Before running the frontend server, you must build the frontend to generate the necessary `build/assets` directory. From the `src/frontend` directory, run: @@ -365,7 +372,7 @@ The files for the dev container are located in `/.devcontainer/` folder. 10. **Run the application:** -- From the src/backend directory: +- From the `src/backend` directory activate the virtual environment created through step 8 and Run: ```bash python app_kernel.py @@ -377,8 +384,14 @@ python app_kernel.py python frontend_server.py ``` -10. Open a browser and navigate to `http://localhost:3000` -11. To see swagger API documentation, you can navigate to `http://localhost:8000/docs` +or Run + + ```bash + npm run dev + ``` + +11. Open a browser and navigate to `http://localhost:3000` +12. To see swagger API documentation, you can navigate to `http://localhost:8000/docs` ## Debugging the solution locally From 6dcfe525da249ca343331c2d9bc56f220837681c Mon Sep 17 00:00:00 2001 From: "Niraj Chaudhari (Persistent Systems Inc)" Date: Fri, 5 Sep 2025 15:57:06 +0530 Subject: [PATCH 3/3] Adding a hardcoded createdBy parameter to the deploy.yml file to prevent validation pipeline failures caused by the deployer function in the Bicep file. --- .github/workflows/deploy.yml | 1 + infra/main.bicep | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 82f0941b..11f4dd94 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -137,6 +137,7 @@ jobs: imageTag="${IMAGE_TAG}" \ azureAiServiceLocation='${{ env.AZURE_LOCATION }}' \ gptModelCapacity=150 \ + createdBy="Pipeline" \ --output json - name: Extract Web App and API App URLs diff --git a/infra/main.bicep b/infra/main.bicep index 56589a8d..8bedd789 100644 --- a/infra/main.bicep +++ b/infra/main.bicep @@ -165,20 +165,23 @@ var replicaLocation = replicaRegionPairs[location] // Resources // // ============== // -var deployerInfo = deployer() + var allTags = union( { 'azd-env-name': solutionName }, tags ) +@description('Optional created by user name') +param createdBy string = empty(deployer().userPrincipalName) ? '' : split(deployer().userPrincipalName, '@')[0] + resource resourceGroupTags 'Microsoft.Resources/tags@2021-04-01' = { name: 'default' properties: { tags: { ...allTags TemplateName: 'MACAE' - CreatedBy: split(deployerInfo.userPrincipalName, '@')[0] + CreatedBy: createdBy } } }