From e8ec092d8456cd6d0cb836f29a9759d3aac2687d Mon Sep 17 00:00:00 2001 From: Ben Broderick Phillips Date: Thu, 14 Nov 2024 13:52:02 -0500 Subject: [PATCH] Update azopenai* to use hardcoded variable group config (#23748) * Update azopenai* to use hardcoded variable group config * Remove bicep template for ai services --- sdk/ai/azopenai/ci.yml | 52 ++++++++++++------- sdk/ai/azopenai/test-resources.bicep | 13 ----- sdk/ai/azopenaiassistants/ci.yml | 52 ++++++++++++------- .../azopenaiassistants/test-resources.bicep | 13 ----- sdk/ai/azopenaiextensions/ci.yml | 24 ++++++--- .../azopenaiextensions/test-resources.bicep | 13 ----- 6 files changed, 82 insertions(+), 85 deletions(-) delete mode 100644 sdk/ai/azopenai/test-resources.bicep delete mode 100644 sdk/ai/azopenaiassistants/test-resources.bicep delete mode 100644 sdk/ai/azopenaiextensions/test-resources.bicep diff --git a/sdk/ai/azopenai/ci.yml b/sdk/ai/azopenai/ci.yml index 2724b10fcc..f880aebfb6 100644 --- a/sdk/ai/azopenai/ci.yml +++ b/sdk/ai/azopenai/ci.yml @@ -23,23 +23,35 @@ pr: - sdk/ai/azopenai extends: - template: /eng/pipelines/templates/jobs/archetype-sdk-client.yml - parameters: - # We need to allow for longer retry times with tests that run against the public endpoint - # which throttles under load. Note, I left a little wiggle room since the TimeoutInMinutes - # controls the overall pipeline and TestRunTime configures the individual `go test -timeout` parameter. - TimeoutInMinutes: 35 - TestRunTime: 30m - ServiceDirectory: "ai/azopenai" - RunLiveTests: true - UsePipelineProxy: false - CloudConfig: - Public: - SubscriptionConfigurations: - - $(sub-config-openai-test-resources) # TestSecrets-openai - EnvVars: - AZURE_TEST_RUN_LIVE: "true" # use when utilizing the New-TestResources Script - AZURE_CLIENT_ID: $(AZOPENAI_CLIENT_ID) - AZURE_CLIENT_SECRET: $(AZOPENAI_CLIENT_SECRET) - AZURE_TENANT_ID: $(AZOPENAI_TENANT_ID) - AZURE_SUBSCRIPTION_ID: $(AZOPENAI_SUBSCRIPTION_ID) + template: /eng/pipelines/templates/jobs/archetype-sdk-client.yml + parameters: + # We need to allow for longer retry times with tests that run against the public endpoint + # which throttles under load. Note, I left a little wiggle room since the TimeoutInMinutes + # controls the overall pipeline and TestRunTime configures the individual `go test -timeout` parameter. + TimeoutInMinutes: 35 + TestRunTime: 30m + ServiceDirectory: "ai/azopenai" + RunLiveTests: true + UsePipelineProxy: false + CloudConfig: + Public: + ServiceConnection: azure-sdk-tests-openai + EnvVars: + AZURE_TEST_RUN_LIVE: "true" # use when utilizing the New-TestResources Script + AOAI_ASSISTANTS_ENDPOINT: $(GO-AOAI-ASSISTANTS-ENDPOINT) + AOAI_ASSISTANTS_KEY: $(GO-AOAI-ASSISTANTS-KEY) + AOAI_ENDPOINT_SWECENTRAL: $(GO-AOAI-ENDPOINT-SWECENTRAL) + AOAI_ENDPOINT_SWECENTRAL_API_KEY: $(GO-AOAI-ENDPOINT-SWECENTRAL-API-KEY) + AOAI_ENDPOINT_USEAST: $(GO-AOAI-ENDPOINT-USEAST) + AOAI_ENDPOINT_USEAST_API_KEY: $(GO-AOAI-ENDPOINT-USEAST-API-KEY) + AOAI_ENDPOINT_USEAST2: $(GO-AOAI-ENDPOINT-USEAST2) + AOAI_ENDPOINT_USEAST2_API_KEY: $(GO-AOAI-ENDPOINT-USEAST2-API-KEY) + AOAI_ENDPOINT_USNORTHCENTRAL: $(GO-AOAI-ENDPOINT-USNORTHCENTRAL) + AOAI_ENDPOINT_USNORTHCENTRAL_API_KEY: $(GO-AOAI-ENDPOINT-USNORTHCENTRAL-API-KEY) + COGNITIVE_SEARCH_API_ENDPOINT: $(GO-COGNITIVE-SEARCH-API-ENDPOINT) + COGNITIVE_SEARCH_API_INDEX: $(GO-COGNITIVE-SEARCH-API-INDEX) + COGNITIVE_SEARCH_API_KEY: $(GO-COGNITIVE-SEARCH-API-KEY) + legacy: $(GO-legacy) + OPENAI_API_KEY: $(GO-OPENAI-API-KEY) + OPENAI_ENDPOINT: $(GO-OPENAI-ENDPOINT) + USE_TOKEN_CREDS: $(GO-USE-TOKEN-CREDS) diff --git a/sdk/ai/azopenai/test-resources.bicep b/sdk/ai/azopenai/test-resources.bicep deleted file mode 100644 index c632c194b3..0000000000 --- a/sdk/ai/azopenai/test-resources.bicep +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -// This is a placeholder file to trigger environment variable setting via New-TestResources.ps1 - -@description('The base resource name.') -param baseName string = resourceGroup().name - -@description('Which Azure Region to deploy the resource to. Defaults to the resource group location.') -param location string = resourceGroup().location - -@description('The principal to assign the role to. This is application object id.') -param testApplicationOid string diff --git a/sdk/ai/azopenaiassistants/ci.yml b/sdk/ai/azopenaiassistants/ci.yml index b21cd13143..0f2f46799c 100644 --- a/sdk/ai/azopenaiassistants/ci.yml +++ b/sdk/ai/azopenaiassistants/ci.yml @@ -23,23 +23,35 @@ pr: - sdk/ai/azopenaiassistants extends: - template: /eng/pipelines/templates/jobs/archetype-sdk-client.yml - parameters: - # We need to allow for longer retry times with tests that run against the public endpoint - # which throttles under load. Note, I left a little wiggle room since the TimeoutInMinutes - # controls the overall pipeline and TestRunTime configures the individual `go test -timeout` parameter. - TimeoutInMinutes: 35 - TestRunTime: 30m - ServiceDirectory: "ai/azopenaiassistants" - RunLiveTests: true - UsePipelineProxy: false - CloudConfig: - Public: - SubscriptionConfigurations: - - $(sub-config-openai-test-resources) # TestSecrets-openai - EnvVars: - AZURE_TEST_RUN_LIVE: "true" # use when utilizing the New-TestResources Script - AZURE_CLIENT_ID: $(AZOPENAIASSISTANTS_CLIENT_ID) - AZURE_CLIENT_SECRET: $(AZOPENAIASSISTANTS_CLIENT_SECRET) - AZURE_TENANT_ID: $(AZOPENAIASSISTANTS_TENANT_ID) - AZURE_SUBSCRIPTION_ID: $(AZOPENAIASSISTANTS_SUBSCRIPTION_ID) + template: /eng/pipelines/templates/jobs/archetype-sdk-client.yml + parameters: + # We need to allow for longer retry times with tests that run against the public endpoint + # which throttles under load. Note, I left a little wiggle room since the TimeoutInMinutes + # controls the overall pipeline and TestRunTime configures the individual `go test -timeout` parameter. + TimeoutInMinutes: 35 + TestRunTime: 30m + ServiceDirectory: "ai/azopenaiassistants" + RunLiveTests: true + UsePipelineProxy: false + CloudConfig: + Public: + ServiceConnection: azure-sdk-tests-openai + EnvVars: + AZURE_TEST_RUN_LIVE: "true" # use when utilizing the New-TestResources Script + AOAI_ASSISTANTS_ENDPOINT: $(GO-AOAI-ASSISTANTS-ENDPOINT) + AOAI_ASSISTANTS_KEY: $(GO-AOAI-ASSISTANTS-KEY) + AOAI_ENDPOINT_SWECENTRAL: $(GO-AOAI-ENDPOINT-SWECENTRAL) + AOAI_ENDPOINT_SWECENTRAL_API_KEY: $(GO-AOAI-ENDPOINT-SWECENTRAL-API-KEY) + AOAI_ENDPOINT_USEAST: $(GO-AOAI-ENDPOINT-USEAST) + AOAI_ENDPOINT_USEAST_API_KEY: $(GO-AOAI-ENDPOINT-USEAST-API-KEY) + AOAI_ENDPOINT_USEAST2: $(GO-AOAI-ENDPOINT-USEAST2) + AOAI_ENDPOINT_USEAST2_API_KEY: $(GO-AOAI-ENDPOINT-USEAST2-API-KEY) + AOAI_ENDPOINT_USNORTHCENTRAL: $(GO-AOAI-ENDPOINT-USNORTHCENTRAL) + AOAI_ENDPOINT_USNORTHCENTRAL_API_KEY: $(GO-AOAI-ENDPOINT-USNORTHCENTRAL-API-KEY) + COGNITIVE_SEARCH_API_ENDPOINT: $(GO-COGNITIVE-SEARCH-API-ENDPOINT) + COGNITIVE_SEARCH_API_INDEX: $(GO-COGNITIVE-SEARCH-API-INDEX) + COGNITIVE_SEARCH_API_KEY: $(GO-COGNITIVE-SEARCH-API-KEY) + legacy: $(GO-legacy) + OPENAI_API_KEY: $(GO-OPENAI-API-KEY) + OPENAI_ENDPOINT: $(GO-OPENAI-ENDPOINT) + USE_TOKEN_CREDS: $(GO-USE-TOKEN-CREDS) diff --git a/sdk/ai/azopenaiassistants/test-resources.bicep b/sdk/ai/azopenaiassistants/test-resources.bicep deleted file mode 100644 index c632c194b3..0000000000 --- a/sdk/ai/azopenaiassistants/test-resources.bicep +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -// This is a placeholder file to trigger environment variable setting via New-TestResources.ps1 - -@description('The base resource name.') -param baseName string = resourceGroup().name - -@description('Which Azure Region to deploy the resource to. Defaults to the resource group location.') -param location string = resourceGroup().location - -@description('The principal to assign the role to. This is application object id.') -param testApplicationOid string diff --git a/sdk/ai/azopenaiextensions/ci.yml b/sdk/ai/azopenaiextensions/ci.yml index 7fcd48c87f..0b656e5d85 100644 --- a/sdk/ai/azopenaiextensions/ci.yml +++ b/sdk/ai/azopenaiextensions/ci.yml @@ -36,11 +36,23 @@ extends: ExcludeGoNMinus2: true CloudConfig: Public: - SubscriptionConfigurations: - - $(sub-config-openai-test-resources) # TestSecrets-openai + ServiceConnection: azure-sdk-tests-openai EnvVars: AZURE_TEST_RUN_LIVE: "true" # use when utilizing the New-TestResources Script - AZURE_CLIENT_ID: $(AZOPENAIEXTENSIONS_CLIENT_ID) - AZURE_CLIENT_SECRET: $(AZOPENAIEXTENSIONS_CLIENT_SECRET) - AZURE_TENANT_ID: $(AZOPENAIEXTENSIONS_TENANT_ID) - AZURE_SUBSCRIPTION_ID: $(AZOPENAIEXTENSIONS_SUBSCRIPTION_ID) + AOAI_ASSISTANTS_ENDPOINT: $(GO-AOAI-ASSISTANTS-ENDPOINT) + AOAI_ASSISTANTS_KEY: $(GO-AOAI-ASSISTANTS-KEY) + AOAI_ENDPOINT_SWECENTRAL: $(GO-AOAI-ENDPOINT-SWECENTRAL) + AOAI_ENDPOINT_SWECENTRAL_API_KEY: $(GO-AOAI-ENDPOINT-SWECENTRAL-API-KEY) + AOAI_ENDPOINT_USEAST: $(GO-AOAI-ENDPOINT-USEAST) + AOAI_ENDPOINT_USEAST_API_KEY: $(GO-AOAI-ENDPOINT-USEAST-API-KEY) + AOAI_ENDPOINT_USEAST2: $(GO-AOAI-ENDPOINT-USEAST2) + AOAI_ENDPOINT_USEAST2_API_KEY: $(GO-AOAI-ENDPOINT-USEAST2-API-KEY) + AOAI_ENDPOINT_USNORTHCENTRAL: $(GO-AOAI-ENDPOINT-USNORTHCENTRAL) + AOAI_ENDPOINT_USNORTHCENTRAL_API_KEY: $(GO-AOAI-ENDPOINT-USNORTHCENTRAL-API-KEY) + COGNITIVE_SEARCH_API_ENDPOINT: $(GO-COGNITIVE-SEARCH-API-ENDPOINT) + COGNITIVE_SEARCH_API_INDEX: $(GO-COGNITIVE-SEARCH-API-INDEX) + COGNITIVE_SEARCH_API_KEY: $(GO-COGNITIVE-SEARCH-API-KEY) + legacy: $(GO-legacy) + OPENAI_API_KEY: $(GO-OPENAI-API-KEY) + OPENAI_ENDPOINT: $(GO-OPENAI-ENDPOINT) + USE_TOKEN_CREDS: $(GO-USE-TOKEN-CREDS) diff --git a/sdk/ai/azopenaiextensions/test-resources.bicep b/sdk/ai/azopenaiextensions/test-resources.bicep deleted file mode 100644 index c632c194b3..0000000000 --- a/sdk/ai/azopenaiextensions/test-resources.bicep +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -// This is a placeholder file to trigger environment variable setting via New-TestResources.ps1 - -@description('The base resource name.') -param baseName string = resourceGroup().name - -@description('Which Azure Region to deploy the resource to. Defaults to the resource group location.') -param location string = resourceGroup().location - -@description('The principal to assign the role to. This is application object id.') -param testApplicationOid string