Skip to content

Commit a483104

Browse files
Merge branch 'main' into psl-oidc
2 parents 3f15d65 + c520b82 commit a483104

53 files changed

Lines changed: 13784 additions & 199 deletions

Some content is hidden

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

.github/CODEOWNERS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Lines starting with '#' are comments.
2+
# Each line is a file pattern followed by one or more owners.
3+
4+
# These owners will be the default owners for everything in the repo.
5+
* @Avijit-Microsoft @Roopan-Microsoft @Prajwal-Microsoft @aniaroramsft @Vinay-Microsoft @malrose07 @toherman-msft @nchandhi

.github/workflows/job-deploy-linux.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ jobs:
181181
echo ""
182182
echo "✅ All input parameters validated successfully!"
183183
- name: Checkout Code
184-
uses: actions/checkout@v4
184+
uses: actions/checkout@v6
185185

186186
- name: Configure Parameters Based on WAF Setting
187187
shell: bash

.github/workflows/job-deploy-windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ jobs:
183183
echo "✅ All input parameters validated successfully!"
184184
185185
- name: Checkout Code
186-
uses: actions/checkout@v4
186+
uses: actions/checkout@v6
187187

188188
- name: Configure Parameters Based on WAF Setting
189189
shell: bash

.github/workflows/job-deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ jobs:
320320
321321
322322
- name: Checkout Code
323-
uses: actions/checkout@v4
323+
uses: actions/checkout@v6
324324

325325
- name: Login to Azure (OIDC)
326326
uses: azure/login@v2

.github/workflows/job-docker-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
IMAGE_TAG: ${{ steps.generate_docker_tag.outputs.IMAGE_TAG }}
3030
steps:
3131
- name: Checkout Code
32-
uses: actions/checkout@v4
32+
uses: actions/checkout@v6
3333

3434
- name: Generate Unique Docker Image Tag
3535
id: generate_docker_tag

.github/workflows/test-automation-v2.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
TEST_REPORT_URL: ${{ steps.upload_report.outputs.artifact-url }}
3535
steps:
3636
- name: Checkout repository
37-
uses: actions/checkout@v5
37+
uses: actions/checkout@v6
3838

3939
- name: Set up Python
4040
uses: actions/setup-python@v6
@@ -136,7 +136,7 @@ jobs:
136136

137137
- name: Upload test report
138138
id: upload_report
139-
uses: actions/upload-artifact@v4
139+
uses: actions/upload-artifact@v6
140140
if: ${{ !cancelled() }}
141141
with:
142142
name: test-report

archive-doc-gen/scripts/auth_init.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def add_client_secret(credential, app_id):
5959

6060

6161
def update_azd_env(name, val):
62-
subprocess.run(f"azd env set {name} {val}", shell=True)
62+
subprocess.run(["azd", "env", "set", name, val], shell=False, check=True)
6363

6464

6565
if __name__ == "__main__":

archive-doc-gen/scripts/data_preparation.py

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,15 @@ def create_or_update_search_index(
152152
if not admin_key:
153153
admin_key = json.loads(
154154
subprocess.run(
155-
f"az search admin-key show --subscription {subscription_id} --resource-group {resource_group} --service-name {service_name}",
156-
shell=True,
155+
[
156+
"az", "search", "admin-key", "show",
157+
"--subscription", subscription_id,
158+
"--resource-group", resource_group,
159+
"--service-name", service_name
160+
],
161+
shell=False,
157162
capture_output=True,
163+
check=True,
158164
).stdout
159165
)["primaryKey"]
160166

@@ -312,9 +318,15 @@ def upload_documents_to_index(
312318
if not admin_key:
313319
admin_key = json.loads(
314320
subprocess.run(
315-
f"az search admin-key show --subscription {subscription_id} --resource-group {resource_group} --service-name {service_name}",
316-
shell=True,
321+
[
322+
"az", "search", "admin-key", "show",
323+
"--subscription", subscription_id,
324+
"--resource-group", resource_group,
325+
"--service-name", service_name
326+
],
327+
shell=False,
317328
capture_output=True,
329+
check=True,
318330
).stdout
319331
)["primaryKey"]
320332

@@ -349,9 +361,15 @@ def validate_index(service_name, subscription_id, resource_group, index_name):
349361
api_version = "2024-03-01-Preview"
350362
admin_key = json.loads(
351363
subprocess.run(
352-
f"az search admin-key show --subscription {subscription_id} --resource-group {resource_group} --service-name {service_name}",
353-
shell=True,
364+
[
365+
"az", "search", "admin-key", "show",
366+
"--subscription", subscription_id,
367+
"--resource-group", resource_group,
368+
"--service-name", service_name
369+
],
370+
shell=False,
354371
capture_output=True,
372+
check=True,
355373
).stdout
356374
)["primaryKey"]
357375

content-gen/infra/main.bicep

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,7 @@ var imageModelDeployment = imageModelChoice != 'none' ? [
261261
var aiFoundryAiServicesModelDeployment = concat(baseModelDeployments, imageModelDeployment)
262262

263263
var aiFoundryAiProjectDescription = 'Content Generation AI Foundry Project'
264+
var existingTags = resourceGroup().tags ?? {}
264265

265266
// ============== //
266267
// Resources //
@@ -289,13 +290,15 @@ resource avmTelemetry 'Microsoft.Resources/deployments@2024-03-01' = if (enableT
289290
resource resourceGroupTags 'Microsoft.Resources/tags@2021-04-01' = {
290291
name: 'default'
291292
properties: {
292-
tags: {
293-
...resourceGroup().tags
294-
... tags
295-
TemplateName: 'ContentGen'
296-
Type: enablePrivateNetworking ? 'WAF' : 'Non-WAF'
297-
CreatedBy: createdBy
298-
}
293+
tags: union(
294+
existingTags,
295+
tags,
296+
{
297+
TemplateName: 'ContentGen'
298+
Type: enablePrivateNetworking ? 'WAF' : 'Non-WAF'
299+
CreatedBy: createdBy
300+
}
301+
)
299302
}
300303
}
301304

content-gen/infra/main.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,7 @@
321321
"imageModelDeployment": "[if(not(equals(parameters('imageModelChoice'), 'none')), createArray(createObject('format', 'OpenAI', 'name', variables('imageModelConfig')[parameters('imageModelChoice')].name, 'model', variables('imageModelConfig')[parameters('imageModelChoice')].name, 'sku', createObject('name', variables('imageModelConfig')[parameters('imageModelChoice')].sku, 'capacity', parameters('imageModelCapacity')), 'version', variables('imageModelConfig')[parameters('imageModelChoice')].version, 'raiPolicyName', 'Microsoft.Default')), createArray())]",
322322
"aiFoundryAiServicesModelDeployment": "[concat(variables('baseModelDeployments'), variables('imageModelDeployment'))]",
323323
"aiFoundryAiProjectDescription": "Content Generation AI Foundry Project",
324+
"existingTags": "[coalesce(resourceGroup().tags, createObject())]",
324325
"logAnalyticsWorkspaceResourceName": "[format('log-{0}', variables('solutionSuffix'))]",
325326
"applicationInsightsResourceName": "[format('appi-{0}', variables('solutionSuffix'))]",
326327
"userAssignedIdentityResourceName": "[format('id-{0}', variables('solutionSuffix'))]",
@@ -377,7 +378,7 @@
377378
"apiVersion": "2021-04-01",
378379
"name": "default",
379380
"properties": {
380-
"tags": "[shallowMerge(createArray(resourceGroup().tags, parameters('tags'), createObject('TemplateName', 'ContentGen', 'Type', if(parameters('enablePrivateNetworking'), 'WAF', 'Non-WAF'), 'CreatedBy', parameters('createdBy'))))]"
381+
"tags": "[union(variables('existingTags'), parameters('tags'), createObject('TemplateName', 'ContentGen', 'Type', if(parameters('enablePrivateNetworking'), 'WAF', 'Non-WAF'), 'CreatedBy', parameters('createdBy')))]"
381382
}
382383
},
383384
"aiSearchFoundryConnection": {

0 commit comments

Comments
 (0)