Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 5, 2026

Orleans 9.2.1+ requires keyed service registrations for Azure Storage clients when used with Aspire. Using non-keyed APIs (AddAzureBlobClient, AddAzureTableClient) throws InvalidOperationException about missing keyed clients.

Updated API calls in Orleans documentation:

  • Server projects: AddAzureBlobClient("grainstate")AddKeyedAzureBlobServiceClient("grainstate")
  • Server projects: AddAzureTableClient("clustering")AddKeyedAzureTableServiceClient("clustering")
  • Client projects: AddAzureTableClient("clustering")AddKeyedAzureTableServiceClient("clustering")

Before:

builder.AddAzureTableClient("clustering");
builder.AddAzureBlobClient("grainstate");
builder.UseOrleans();

After:

builder.AddKeyedAzureTableServiceClient("clustering");
builder.AddKeyedAzureBlobServiceClient("grainstate");
builder.UseOrleans();
Original prompt

This section details on the original issue you should resolve

<issue_title>Instructions for Orleans Integration do not work with latest Orleans 9.2.1 and Aspire 13.1.0</issue_title>
<issue_description>When using the latest Orleans 9.2.1 and Aspire 13.1.0, I had to make the following changes in the Program.cs

builder.AddKeyedAzureBlobServiceClient("grainstate"); // Originally: builder.AddAzureBlobClient("grainstate");
builder.AddKeyedAzureTableServiceClient("clustering"); // Originally: builder.AddAzureTableClient("clustering");

If you don't make this change in both the client and server, then it will throw an InvalidOperationException about not being able to find a keyed Table/Blob client.</issue_description>

<agent_instructions>Please update the orleans content to use the latest versions and verify the APIs documented. Do not include version numbers in any of the updates.</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>
Copilot AI changed the title [WIP] Update Orleans integration instructions for recent changes Update Orleans integration docs to use keyed Azure Storage clients Jan 5, 2026
Copilot AI requested a review from IEvangelist January 5, 2026 15:57
@IEvangelist IEvangelist marked this pull request as ready for review January 5, 2026 15:59
@IEvangelist IEvangelist requested a review from eerhardt as a code owner January 5, 2026 15:59
Copilot AI review requested due to automatic review settings January 5, 2026 15:59
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Orleans integration documentation to use keyed Azure Storage client registration methods, which are required for Orleans 9.2.1+ when used with Aspire. The documentation now correctly shows the use of AddKeyedAzureTableServiceClient and AddKeyedAzureBlobServiceClient instead of the non-keyed versions that would cause InvalidOperationException at runtime.

  • Updated API calls from non-keyed to keyed service registration methods for Azure Storage clients
  • Applied changes consistently across all Orleans server and client code examples
  • Addresses runtime exceptions that occur when using non-keyed APIs with recent Orleans and Aspire versions

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@IEvangelist IEvangelist merged commit 9489356 into main Jan 7, 2026
12 checks passed
@IEvangelist IEvangelist deleted the copilot/update-orleans-integration-instructions branch January 7, 2026 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Instructions for Orleans Integration do not work with latest Orleans 9.2.1 and Aspire 13.1.0

3 participants