Skip to content

Commit

Permalink
Merge pull request #971 from solliancenet/cp_cherry_pick_060
Browse files Browse the repository at this point in the history
App Configuration/Key Vault Catalog Cherry Picks for release 0.6.0
  • Loading branch information
ciprianjichici authored May 14, 2024
2 parents 992aee2 + cf05eea commit be24442
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 92 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ The following table describes the required App Configuration parameters for the
| `FoundationaLLM:Vectorization:Queues:Index:AccountName` | | The account name of the Azure Storage account used for the index vectorization queue. |
| `FoundationaLLM:Vectorization:Queues:Partition:AccountName` | | The account name of the Azure Storage account used for the partition vectorization queue. |
| `FoundationaLLM:Vectorization:StateService:Storage:AuthenticationType` | | The authentication type used to connect to the underlying storage. Can be one of `AzureIdentity`, `AccountKey`, or `ConnectionString`. |
| `FoundationaLLM:Vectorization:StateService:Storage:ConnectionString` | Key Vault secret name: `foundationallm-vectorization-state-connectionstring` | The connection string to the Azure Storage account used for the vectorization state service. |
| `FoundationaLLM:Vectorization:ResourceProviderService:Storage:AuthenticationType` | | The authentication type used to connect to the underlying storage. Can be one of `AzureIdentity`, `AccountKey`, or `ConnectionString`. |
| `FoundationaLLM:Vectorization:SemanticKernelTextEmbeddingService:APIKey` | Key Vault secret name: `foundationallm-vectorization-semantickerneltextembedding-openai-apikey` | The API key used to connect to the Azure OpenAI service.
| `FoundationaLLM:Vectorization:SemanticKernelTextEmbeddingService:AuthenticationType` | | The authentication type used to connect to the Azure OpenAI service. Can be one of `AzureIdentity` or `APIKey`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -670,11 +670,6 @@ public static class AppConfigurationKeys
/// </summary>
public const string FoundationaLLM_Vectorization_StateService_Storage_AuthenticationType = "FoundationaLLM:Vectorization:StateService:Storage:AuthenticationType";
/// <summary>
/// The key for the FoundationaLLM:Vectorization:StateService:Storage:ConnectionString app configuration setting.
/// The connection string to the Azure Storage account used for the vectorization state service.
/// </summary>
public const string FoundationaLLM_Vectorization_StateService_Storage_ConnectionString = "FoundationaLLM:Vectorization:StateService:Storage:ConnectionString";
/// <summary>
/// The key for the FoundationaLLM:Vectorization:ResourceProviderService:Storage:AuthenticationType app configuration setting.
/// The authentication type used to connect to the underlying storage. Can be one of `AzureIdentity`, `AccountKey`, or `ConnectionString`.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
Expand Down
13 changes: 0 additions & 13 deletions src/dotnet/Configuration/Catalog/AppConfigurationCatalog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1735,19 +1735,6 @@ public static class AppConfigurationCatalog
sampleObject: null
),

new(
key: AppConfigurationKeys
.FoundationaLLM_Vectorization_StateService_Storage_ConnectionString,
minimumVersion: "0.3.0",
defaultValue: "Key Vault secret name: `foundationallm-vectorization-state-connectionstring`",
description:
"The connection string to the Azure Storage account used for the vectorization state service.",
keyVaultSecretName: KeyVaultSecretNames
.FoundationaLLM_Vectorization_State_ConnectionString,
contentType: "text/plain",
sampleObject: null
),

new(
key: AppConfigurationKeys
.FoundationaLLM_Vectorization_ResourceProviderService_Storage_AuthenticationType,
Expand Down
65 changes: 2 additions & 63 deletions src/dotnet/Configuration/Catalog/KeyVaultSecretsCatalog.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using FoundationaLLM.Common.Constants;
using FoundationaLLM.Common.Constants;
using FoundationaLLM.Common.Constants.Configuration;
using FoundationaLLM.Common.Models.Configuration.KeyVault;

Expand All @@ -14,18 +14,6 @@ public static class KeyVaultSecretsCatalog
/// </summary>
public static readonly List<KeyVaultSecretEntry> GenericEntries =
[
new(
secretName: KeyVaultSecretNames
.FoundationaLLM_AgentHub_StorageManager_BlobStorage_ConnectionString,
minimumVersion: "0.3.0",
description: ""
),
new(
secretName: KeyVaultSecretNames
.FoundationaLLM_Agent_ResourceProvider_Storage_ConnectionString,
minimumVersion: "0.3.0",
description: "The connection string to the Azure Storage account used for the agent resource provider."
),
new(
secretName: KeyVaultSecretNames.FoundationaLLM_APIs_AgentFactoryAPI_APIKey,
minimumVersion: "0.3.0",
Expand Down Expand Up @@ -61,12 +49,6 @@ public static class KeyVaultSecretsCatalog
minimumVersion: "0.3.0",
description: ""
),
new(
secretName: KeyVaultSecretNames
.FoundationaLLM_Prompt_ResourceProvider_Storage_ConnectionString,
minimumVersion: "0.3.0",
description: "The connection string to the Azure Storage account used for the prompt resource provider."
),
new(
secretName: KeyVaultSecretNames.FoundationaLLM_APIs_PromptHubAPI_APIKey,
minimumVersion: "0.3.0",
Expand All @@ -87,35 +69,11 @@ public static class KeyVaultSecretsCatalog
minimumVersion: "0.3.0",
description: ""
),
new(
secretName: KeyVaultSecretNames
.FoundationaLLM_BlobStorageMemorySource_Blobstorageconnection,
minimumVersion: "0.3.0",
description: ""
),
new(
secretName: KeyVaultSecretNames
.FoundationaLLM_DataSourceHub_StorageManager_BlobStorage_ConnectionString,
minimumVersion: "0.3.0",
description: ""
),
new(
secretName: KeyVaultSecretNames
.FoundationaLLM_DataSourceHub_StorageManager_BlobStorage_ConnectionString,
minimumVersion: "0.3.0",
description: ""
),
new(
secretName: KeyVaultSecretNames.FoundationaLLM_OpenAI_Api_Key,
minimumVersion: "0.3.0",
description: ""
),
new(
secretName: KeyVaultSecretNames
.FoundationaLLM_PromptHub_StorageManager_BlobStorage_ConnectionString,
minimumVersion: "0.3.0",
description: ""
),
new(
secretName: KeyVaultSecretNames.FoundationaLLM_SemanticKernelAPI_OpenAI_Key,
minimumVersion: "0.3.0",
Expand All @@ -131,31 +89,12 @@ public static class KeyVaultSecretsCatalog
minimumVersion: "0.3.0",
description: "The API key of the vectorization worker API."
),
new(
secretName: KeyVaultSecretNames.FoundationaLLM_Vectorization_State_ConnectionString,
minimumVersion: "0.3.0",
description:
"The connection string to the Azure Storage account used for the vectorization state service."
),
new(
secretName: KeyVaultSecretNames
.FoundationaLLM_Vectorization_ResourceProvider_Storage_ConnectionString,
minimumVersion: "0.3.0",
description:
"The connection string to the Azure Storage account used for the vectorization state service."
),
new(
secretName: KeyVaultSecretNames.FoundationaLLM_Events_AzureEventGrid_APIKey,
minimumVersion: "0.4.0",
description:
"The API key for the Azure Event Grid service."
),
new(
secretName: KeyVaultSecretNames
.FoundationaLLM_DataSource_ResourceProvider_Storage_ConnectionString,
minimumVersion: "0.5.0",
description: "The connection string to the Azure Storage account used for the data source resource provider."
),
)
];

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using FoundationaLLM.Common.Models.Configuration.Storage;
using FoundationaLLM.Common.Models.Configuration.Storage;

namespace FoundationaLLM.Vectorization.Models.Configuration
{
Expand All @@ -11,9 +11,9 @@ public class RequestSourceServiceSettings
/// The name of the request source.
/// </summary>
public required string Name { get; set; }

/// <summary>
/// The name of the storage account.
/// The name of the storage account
/// </summary>
public required string AccountName { get; set; }

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using FoundationaLLM.Common.Constants;
using FoundationaLLM.Common.Constants;
using FoundationaLLM.Vectorization.Exceptions;
using FoundationaLLM.Vectorization.Interfaces;
using FoundationaLLM.Vectorization.Models;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Azure.Storage.Queues;
using Azure.Storage.Queues;
using FoundationaLLM.Common.Authentication;
using FoundationaLLM.Vectorization.Interfaces;
using FoundationaLLM.Vectorization.Models;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using Azure.Storage.Queues;
using FakeItEasy;
using FoundationaLLM.Common.Authentication;
using FoundationaLLM.Common.Models.Vectorization;
using FoundationaLLM.Vectorization.Interfaces;
using FoundationaLLM.Vectorization.Models;
Expand All @@ -20,12 +21,11 @@ public StorageQueueRequestSourceServiceTests()
_stateService = A.Fake<IVectorizationStateService>();
RequestSourceServiceSettings requestManagerServiceSettings = new RequestSourceServiceSettings()
{
Name = Environment.GetEnvironmentVariable("StorageQueueServiceTestsQueueName") ?? "testing",
ConnectionConfigurationName = "SomeConfigProperty",
ConnectionString = Environment.GetEnvironmentVariable("StorageQueueServiceTestsQueueConnectionString"),
Name = Environment.GetEnvironmentVariable("StorageQueueServiceTestsQueueName") ?? "testing",
AccountName = "Test_AccountName",
VisibilityTimeoutSeconds = 60
};
_queueClient = new QueueServiceClient(requestManagerServiceSettings.ConnectionString).GetQueueClient(requestManagerServiceSettings.Name);
_queueClient = new QueueServiceClient(new Uri($"https://test.dfs.core.windows.net")).GetQueueClient(requestManagerServiceSettings.Name);
ILogger<StorageQueueRequestSourceService> logger = LoggerFactory.Create(builder => builder.AddConsole()).CreateLogger<StorageQueueRequestSourceService>();
_storageQueueRequestSourceService = new StorageQueueRequestSourceService(requestManagerServiceSettings, logger);
}
Expand Down

0 comments on commit be24442

Please sign in to comment.