Conversation
Update to .NET 8.0 Updated README
c57c76c to
617a48f
Compare
ckittel
left a comment
There was a problem hiding this comment.
Summary:
- Use Entra ID
- Use new Azure SDK dependency injection model
- How do we get this to not just be a pub-sub example?
- Use bicep for the azure resource deployments
That third item is worrying me a bit, not sure how best to proceed. Would be glad to talk it over w/ ya!
| .ConfigureFunctionsWorkerDefaults() | ||
| .ConfigureAppConfiguration((hostingContext, config) => | ||
| { | ||
| config.AddJsonFile("local.settings.json", optional: true, reloadOnChange: true); | ||
| }) | ||
| .ConfigureServices(services => | ||
| { | ||
| var configuration = services.BuildServiceProvider().GetRequiredService<IConfiguration>(); | ||
|
|
||
| services.AddSingleton(configuration); | ||
|
|
||
| services.AddSingleton<ServiceBusClient>(sp => | ||
| { | ||
| var connectionString = configuration.GetValue<string>("ServiceBusConnectionString"); | ||
| return new ServiceBusClient(connectionString); | ||
| }); | ||
| }) | ||
| .Build(); |
There was a problem hiding this comment.
Can this get converted to:
services.AddAzureClients(cb => {
cb.AddServiceBusClient(...)
});https://learn.microsoft.com/azure/azure-functions/dotnet-isolated-process-guide?tabs=linux#register-azure-clients -- The PG is trying to get folks to use this model for Azure SDK clients intead of the custom approach like you have here.
priority-queue/PriorityQueueConsumerHigh/PriorityQueueConsumerHighFn.cs
Outdated
Show resolved
Hide resolved
priority-queue/PriorityQueueConsumerHigh/PriorityQueueConsumerHigh.csproj
Outdated
Show resolved
Hide resolved
priority-queue/PriorityQueueConsumerLow/PriorityQueueConsumerLow.csproj
Outdated
Show resolved
Hide resolved
priority-queue/PriorityQueueConsumerLow/PriorityQueueConsumerLowFn.cs
Outdated
Show resolved
Hide resolved
* Improvements. Bicep file. Settings. Moved to managed identity. Run func start * Removing VS requirement * deleting any --------- Co-authored-by: Federico Arambarri <v-fearam>
…des, and Azure Deployment Enhancements (#373) * Some updates and rewording * Update API and Readme * Readme Improvement * Moving forward * Changing names * Improve Information * Net10
There was a problem hiding this comment.
Pull request overview
This PR updates the Priority Queue cloud pattern example from .NET 6 to .NET 8, adds comprehensive Bicep infrastructure-as-code templates for Azure deployment, and provides an improved README with detailed deployment instructions. The update modernizes the Azure Functions to use the isolated worker model with dependency injection and managed identities for secure authentication.
Key changes:
- Migration from .NET 6 to .NET 8 with isolated worker model for Azure Functions
- Introduction of Bicep templates for automated infrastructure provisioning including Service Bus, Storage Accounts, Function Apps, and monitoring
- Comprehensive README rewrite with step-by-step deployment guide and Application Insights monitoring queries
Reviewed changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| priority-queue/bicep/main.bicep | Defines Service Bus namespace, topics, subscriptions, filters, Log Analytics workspace, and RBAC role assignments |
| priority-queue/bicep/azure/sites.bicep | Creates individual Azure Function Apps with Flex Consumption plans, managed identities, and storage configuration |
| priority-queue/bicep/azure/azure-function-apps.bicep | Orchestrates deployment of shared resources (Storage Account, Application Insights) and three Function Apps with different scaling profiles |
| priority-queue/Readme.md | Provides comprehensive deployment guide with prerequisites, local execution steps, Azure deployment instructions, and monitoring queries |
| priority-queue/PriorityQueueSender/*.{csproj,cs,json} | Updates sender function to .NET 8 isolated worker model with manual Service Bus client configuration |
| priority-queue/PriorityQueueConsumerLow/*.{csproj,cs,json} | Updates low-priority consumer function to .NET 8 isolated worker model with dependency injection |
| priority-queue/PriorityQueueConsumerHigh/*.{csproj,cs,json} | Updates high-priority consumer function to .NET 8 isolated worker model with dependency injection |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
priority-queue/Readme.md
Outdated
| - Once refreshed you will see two tabs, "invocation" and "logs" | ||
| - From the invocations tab you can see the twenty most recent function invocation traces. For more advanced analysis, run the query in Application Insights. | ||
| - From the logs tab you can see the logging information that your functions are sending. No newline at end of file | ||
| > Azure Functions require an Azure Storage account as a backing resource. When running locally, you can use Azurite, the local storage emulator, to fulfill this requirement. |
There was a problem hiding this comment.
@v-federicoar (per an earlier recommendation from Chad) Can we drop the guidance to "run locally" - So we would only have the below guidance
Deploy the example to Azure
(but you can remove the part about it being "optional" as it would be the only guidance)
* Addressing Pull request comment * Update priority-queue/bicep/main.bicep Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update priority-queue/Readme.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Update to .NET 10
Updated README
So many updates - Thanks to @v-federicoar