Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
7105506
feat: Added API for deletion of processed files
Prajwal-Microsoft Apr 3, 2025
62712a9
CP - US(#16438) story implementation and bug fix(#16072) and code cle…
Bangarraju-Microsoft Apr 8, 2025
43d24b3
UI - Changes and added flag for logs
Bangarraju-Microsoft Apr 9, 2025
08cbd5e
Merge pull request #21 from microsoft/psl-raju-dev
Prajwal-Microsoft Apr 9, 2025
76d9e24
UI - feedbackpoints fixed (#16858) and code cleanup
Bangarraju-Microsoft Apr 11, 2025
61dc660
UI - Load swagger api documentation
Bangarraju-Microsoft Apr 11, 2025
49bba07
Merge pull request #27 from microsoft/psl-raju-dev
Prajwal-Microsoft Apr 14, 2025
74c23f8
UI - Changes (expand/collapse panels)
Bangarraju-Microsoft Apr 15, 2025
719e410
UI - rename env variable names
Bangarraju-Microsoft Apr 15, 2025
f8ca5e0
UI - Expand/Collapse style changes
Bangarraju-Microsoft Apr 15, 2025
e76d790
feat: Added Post deployment script to guide User to execute data impo…
Prajwal-Microsoft Apr 15, 2025
ed1eea1
fix: Updated sku as per design
Prajwal-Microsoft Apr 15, 2025
e416fad
fix: Added allowed values for model version
Prajwal-Microsoft Apr 16, 2025
bd151f8
Bug fix(#17041) US (#17042,17138)
Bangarraju-Microsoft Apr 17, 2025
83447fa
Merge branch 'psl-raju-dev' of https://github.com/microsoft/content-p…
Bangarraju-Microsoft Apr 17, 2025
c08fc17
Merge remote-tracking branch 'origin/main' into dev
Prajwal-Microsoft Apr 21, 2025
57e3e68
Merge remote-tracking branch 'origin/main' into psl-raju-dev
Prajwal-Microsoft Apr 21, 2025
97c2db9
Merge remote-tracking branch 'origin/dev' into psl-raju-dev
Prajwal-Microsoft Apr 21, 2025
0613a74
Merge remote-tracking branch 'origin/dev' into psl-raju-dev
Prajwal-Microsoft Apr 21, 2025
6ff86c3
updated readme image for env update_env_app_1_1.png
Bangarraju-Microsoft Apr 21, 2025
9feadbb
Merge branch 'psl-raju-dev' of https://github.com/microsoft/content-p…
Bangarraju-Microsoft Apr 21, 2025
0fa6124
added backend unit test
AjitPadhi-Microsoft Apr 21, 2025
d1cace1
lint issue fix
AjitPadhi-Microsoft Apr 21, 2025
4654a86
lint issue fix
AjitPadhi-Microsoft Apr 21, 2025
97501a7
lint issue fix
AjitPadhi-Microsoft Apr 21, 2025
f879098
fix: Updated Image and main json
Prajwal-Microsoft Apr 21, 2025
614b287
lint issue fix
AjitPadhi-Microsoft Apr 21, 2025
af4187a
Merge pull request #87 from microsoft/psl-raju-dev
Prajwal-Microsoft Apr 21, 2025
b24b34c
fix: Added executable permission for dev container
Prajwal-Microsoft Apr 21, 2025
7a46d3e
Merge remote-tracking branch 'origin/psl-raju-dev' into dev
Prajwal-Microsoft Apr 21, 2025
66dc30a
lint issue fix
AjitPadhi-Microsoft Apr 22, 2025
1bbc1bc
Merge remote-tracking branch 'origin/dev' into backend_unit_test
AjitPadhi-Microsoft Apr 22, 2025
d92d2ce
fix: Removed Post provision hook as the output is being truncated
Prajwal-Microsoft Apr 22, 2025
f586762
lint issue fix
AjitPadhi-Microsoft Apr 22, 2025
8e80006
test issue fix
AjitPadhi-Microsoft Apr 22, 2025
c9634b3
test issue fix
AjitPadhi-Microsoft Apr 22, 2025
e7d0229
test issue fix
AjitPadhi-Microsoft Apr 22, 2025
e20b1f8
test issue fix
AjitPadhi-Microsoft Apr 22, 2025
fec0816
test issue fix
AjitPadhi-Microsoft Apr 22, 2025
3906ed0
test issue fix
AjitPadhi-Microsoft Apr 22, 2025
71c7b5f
test issue fix
AjitPadhi-Microsoft Apr 22, 2025
1125239
test issue fix
AjitPadhi-Microsoft Apr 22, 2025
ee70b22
test issue fix
AjitPadhi-Microsoft Apr 22, 2025
c70145f
test issue fix
AjitPadhi-Microsoft Apr 22, 2025
f3de1a1
test issue fix
AjitPadhi-Microsoft Apr 22, 2025
7f144a7
test issue fix
AjitPadhi-Microsoft Apr 22, 2025
3aca699
test issue fix
AjitPadhi-Microsoft Apr 22, 2025
89b4d2d
test issue fix
AjitPadhi-Microsoft Apr 22, 2025
ff261e1
test issue fix
AjitPadhi-Microsoft Apr 22, 2025
9d49102
UI - Theme colors applied
Bangarraju-Microsoft Apr 22, 2025
d0465b2
Merge branch 'psl-raju-dev' of https://github.com/microsoft/content-p…
Bangarraju-Microsoft Apr 22, 2025
62c0c5d
fix: Removed the Content understanding from hub connection
Prajwal-Microsoft Apr 22, 2025
074e1a2
fix: Commented next steps as more changes are required
Prajwal-Microsoft Apr 22, 2025
0b7f1f7
fix: Removed unwanted env file
Prajwal-Microsoft Apr 22, 2025
e51b53b
Merge pull request #91 from microsoft/psl-raju-dev
Prajwal-Microsoft Apr 22, 2025
7153beb
Merge pull request #90 from microsoft/backend_unit_test
Prajwal-Microsoft Apr 23, 2025
d3111b8
UI - Bug and Observations fixed
Bangarraju-Microsoft Apr 23, 2025
1d152ff
Merge pull request #92 from microsoft/psl-raju-dev
Prajwal-Microsoft Apr 23, 2025
dbded28
fix: Corrected the URL Endpoint URL
Prajwal-Microsoft Apr 24, 2025
f6fe182
Merge branch 'dev' of https://github.com/microsoft/content-processing…
Prajwal-Microsoft Apr 24, 2025
d13d28d
feat: Updated the main.json based on latest changes
Prajwal-Microsoft Apr 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .devcontainer/setupEnv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ yarn install
cd ../../

echo "Setting up executable permission for shell scripts"
sed -i 's/\r$//' ./infra/scripts/post_deployment.sh
sudo chmod +x ./infra/scripts/docker-build.sh
sudo chmod +x ./infra/scripts/post_deployment.sh
sudo chmod +x ./src/ContentProcessorAPI/samples/upload_files.sh
sudo chmod +x ./src/ContentProcessorAPI/samples/schemas/register_schema.sh

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: Install Backend Dependencies
run: |
python -m pip install --upgrade pip
pip install -r src/ContentProcessorAPI/requirements.txt
pip install -r src/ContentProcessor/requirements.txt
pip install pytest-cov
pip install pytest-asyncio

Expand All @@ -43,7 +43,7 @@ jobs:
- name: Check if Backend Test Files Exist
id: check_backend_tests
run: |
if [ -z "$(find src/ContentProcessorAPI/app/tests -type f -name 'test_*.py')" ]; then
if [ -z "$(find src/ContentProcessor/src/tests -type f -name 'test_*.py')" ]; then
echo "No backend test files found, skipping backend tests."
echo "skip_backend_tests=true" >> $GITHUB_ENV
else
Expand All @@ -54,8 +54,8 @@ jobs:
- name: Run Backend Tests with Coverage
if: env.skip_backend_tests == 'false'
run: |
pytest src/ContentProcessorAPI/app/tests
pytest --cov=. --cov-report=term-missing --cov-report=xml
cd src/ContentProcessor
python -m pytest -vv --cov=. --cov-report=xml --cov-report=term-missing --cov-fail-under=80

- name: Skip Backend Tests
if: env.skip_backend_tests == 'true'
Expand Down
10 changes: 9 additions & 1 deletion azure.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,12 @@ hooks:
windows:
shell: pwsh
run: $timestamp = Get-Date -Format "yyyyMMdd-HHmmss"; $logFile = "azd_preprovision_$timestamp.log"; ./infra/scripts/docker-build.ps1 $env:AZURE_SUBSCRIPTION_ID $env:AZURE_ENV_NAME $env:AZURE_LOCATION $env:AZURE_RESOURCE_GROUP $env:USE_LOCAL_BUILD *>&1 | Tee-Object -FilePath $logFile

postprovision:
posix:
shell: sh
run: sed -i 's/\r$//' ./infra/scripts/post_deployment.sh; ./infra/scripts/post_deployment.sh
interactive: true
windows:
shell: pwsh
run: ./infra/scripts/post_deployment.ps1
interactive: true
8 changes: 4 additions & 4 deletions docs/ConfigureAppAuthentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,13 @@ We will add Microsoft Entra ID as an authentication provider to API and Web Appl
3. Grab Scope Name for Impersonation

- Select **Expose an API** in the left menu. Copy the Scope name, then paste it in some temporary place.
The copied text will be used for Web Application Environment variable - **APP_MSAL_AUTH_SCOPE**.
The copied text will be used for Web Application Environment variable - **APP_WEB_SCOPE**.
![configure_app_registration_web_9](./Images/configure_app_registration_web_9.png)

4. Grab Client Id for Web App

- Select **Overview** in the left menu. Copy the Client Id, then paste it in some temporary place.
The copied text will be used for Web Application Environment variable - **APP_MSAL_AUTH_CLIENT_ID**.
The copied text will be used for Web Application Environment variable - **APP_WEB_CLIENT_ID**.
![configure_app_registration_web_10](./Images/configure_app_registration_web_10.png)

## Step 3: Configure Application Registration - API Application
Expand All @@ -90,7 +90,7 @@ We will add Microsoft Entra ID as an authentication provider to API and Web Appl
![configure_app_registration_api_1](./Images/configure_app_registration_api_1.png)

- Select **Expose an API** in the left menu. Copy the Scope name, then paste it in some temporary place.
The copied text will be used for Web Application Environment variable - **APP_MSAL_TOKEN_SCOPE**.
The copied text will be used for Web Application Environment variable - **APP_API_SCOPE**.
![configure_app_registration_api_2](./Images/configure_app_registration_api_2.png)

## Step 4: Add Web Application's Client Id to Allowed Client Applications List in API Application Registration
Expand All @@ -112,7 +112,7 @@ Now, we will edit and deploy the Web Application Container with updated Environm

1. Select **Containers** menu under **Application**. Then click **Environment variables** tab.
![update_env_app_1_1](./Images/update_env_app_1_1.png)
2. Update 3 values which were taken in previous steps for **APP_MSAL_AUTH_CLIENT_ID**, **APP_MSAL_AUTH_SCOPE**, **APP_MSAL_TOKEN_SCOPE**.
2. Update 3 values which were taken in previous steps for **APP_WEB_CLIENT_ID**, **APP_WEB_SCOPE**, **APP_API_SCOPE**.
Click on **Save as a new revision**.
The updated revision will be activated soon.

Expand Down
Binary file modified docs/Images/update_env_app_1_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 8 additions & 4 deletions infra/container_app/deploy_container_app_api_web.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -131,21 +131,25 @@ module containerAppWeb 'deploy_container_app.bicep' = {
value: containerAppApiEndpoint
}
{
name: 'APP_MSAL_AUTH_CLIENT_ID'
name: 'APP_WEB_CLIENT_ID'
value: '<APP_REGISTRATION_CLIENTID>'
}
{
name: 'APP_MSAL_AUTH_AUTHORITY'
name: 'APP_WEB_AUTHORITY'
value: '${environment().authentication.loginEndpoint}/${tenant().tenantId}'
}
{
name: 'APP_MSAL_AUTH_SCOPE'
name: 'APP_WEB_SCOPE'
value: '<FRONTEND_API_SCOPE>'
}
{
name: 'APP_MSAL_TOKEN_SCOPE'
name: 'APP_API_SCOPE'
value: '<BACKEND_API_SCOPE>'
}
{
name: 'APP_CONSOLE_LOG_ENABLED'
value: 'false'
}
]
minReplicas: minReplicaContainerWeb
maxReplicas: maxReplicaContainerWeb
Expand Down
17 changes: 0 additions & 17 deletions infra/deploy_ai_foundry.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -213,23 +213,6 @@ resource aiHub 'Microsoft.MachineLearningServices/workspaces@2023-08-01-preview'
aiServicesDeployments
]
}

resource aiServiceContentUnderstandingConnection 'connections@2024-07-01-preview' = {
name: '${aiHubName}-cu-connection-AzureOpenAI'
properties: {
category: 'AIServices'
target: aiServices_CU.properties.endpoint
authType: 'AAD'
isSharedToAll: true
metadata: {
ApiType: 'Azure'
ResourceId: aiServices_CU.id
}
}
dependsOn: [
aiServicesDeployments
]
}
}

resource aiHubProject 'Microsoft.MachineLearningServices/workspaces@2024-01-01-preview' = {
Expand Down
34 changes: 8 additions & 26 deletions infra/deploy_container_registry.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -3,49 +3,31 @@
targetScope = 'resourceGroup'

param environmentName string

var uniqueId = toLower(uniqueString(subscription().id, environmentName, resourceGroup().location))
var solutionName = 'cps-${padLeft(take(uniqueId, 12), 12, '0')}'

var containerNameCleaned = replace('cr${solutionName }', '-', '')

@description('Provide a location for the registry.')
param location string = resourceGroup().location

@description('Provide a tier of your Azure Container Registry.')
param acrSku string = 'Premium'

param acrSku string = 'Basic'
resource containerRegistry 'Microsoft.ContainerRegistry/registries@2021-09-01' = {
name: containerNameCleaned
location: location
sku: {
name: acrSku
}
properties: {
adminUserEnabled: true
dataEndpointEnabled: false
networkRuleBypassOptions: 'AzureServices'
networkRuleSet: {
defaultAction: 'Allow'
}
policies: {
quarantinePolicy: {
status: 'disabled'
}
retentionPolicy: {
status: 'enabled'
days: 7
}
trustPolicy: {
status: 'disabled'
type: 'Notary'
}
}
publicNetworkAccess: 'Enabled'
zoneRedundancy: 'Disabled'
}
}

output createdAcrName string = containerNameCleaned
output createdAcrId string = containerRegistry.id
output acrEndpoint string = containerRegistry.properties.loginServer

1 change: 0 additions & 1 deletion infra/deploy_keyvault.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ resource keyVault 'Microsoft.KeyVault/vaults@2022-07-01' = {
enabledForDiskEncryption: true
enabledForTemplateDeployment: true
enableRbacAuthorization: true
enablePurgeProtection: true
publicNetworkAccess: 'enabled'
// networkAcls: {
// bypass: 'AzureServices'
Expand Down
8 changes: 8 additions & 0 deletions infra/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ param gptModelName string = 'gpt-4o'

@minLength(1)
@description('Version of the GPT model to deploy:')
@allowed([
'2024-08-06'
])
param gptModelVersion string = '2024-08-06'

//var gptModelVersion = '2024-02-15-preview'
Expand Down Expand Up @@ -248,3 +251,8 @@ module updateContainerApp './container_app/deploy_container_app_api_web.bicep' =
}
dependsOn: [roleAssignments]
}

output CONTAINER_WEB_APP_NAME string = containerApps.outputs.containerAppWebName
output CONTAINER_API_APP_NAME string = containerApps.outputs.containerAppApiName
output CONTAINER_WEB_APP_FQDN string = containerApps.outputs.containweAppWebEndPoint
output CONTAINER_API_APP_FQDN string = containerApps.outputs.containweAppApiEndPoint
Loading
Loading