Skip to content

Commit

Permalink
Provide only correct names to ConfigureQueueDependency() (microsoft#843)
Browse files Browse the repository at this point in the history
### Motivation and Context
Due to changes in KernelMemory, providing alternative names now causes
the system to die.

### Description
Only provide correct config section names.

### Contribution Checklist
- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows the [Contribution
Guidelines](https://github.com/microsoft/chat-copilot/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/chat-copilot/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [ ] All unit tests pass, and I have added new tests where possible
  • Loading branch information
glahaye authored Mar 6, 2024
1 parent 8fbaebb commit 3bb4a6f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions shared/ServiceConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,14 +130,12 @@ private void ConfigureQueueDependency(IKernelMemoryBuilder builder)
case string y1 when y1.Equals("AzureQueue", StringComparison.OrdinalIgnoreCase):
case string y2 when y2.Equals("AzureQueues", StringComparison.OrdinalIgnoreCase):
// Check 2 keys for backward compatibility
builder.Services.AddAzureQueuesOrchestration(this.GetServiceConfig<AzureQueuesConfig>("AzureQueues")
?? this.GetServiceConfig<AzureQueuesConfig>("AzureQueue"));
builder.Services.AddAzureQueuesOrchestration(this.GetServiceConfig<AzureQueuesConfig>("AzureQueue"));
break;

case string y when y.Equals("RabbitMQ", StringComparison.OrdinalIgnoreCase):
// Check 2 keys for backward compatibility
builder.Services.AddRabbitMQOrchestration(this.GetServiceConfig<RabbitMqConfig>("RabbitMQ")
?? this.GetServiceConfig<RabbitMqConfig>("RabbitMq"));
builder.Services.AddRabbitMQOrchestration(this.GetServiceConfig<RabbitMqConfig>("RabbitMq"));
break;

case string y when y.Equals("SimpleQueues", StringComparison.OrdinalIgnoreCase):
Expand Down
2 changes: 1 addition & 1 deletion webapi/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@
"Auth": "ConnectionString",
//"ConnectionString": "", // dotnet user-secrets set "KernelMemory:Services:AzureBlobs:ConnectionString" "MY_AZUREBLOB_CONNECTIONSTRING"
//"Account": "",
"Container": "memorypipeline"
"Container": "chatmemory"
//"EndpointSuffix": "core.windows.net"
},
//
Expand Down

0 comments on commit 3bb4a6f

Please sign in to comment.