orleans
orleans copied to clipboard
Add Microsoft.Extensions.Configuration provider for azure queue streaming
I'm interested in using Aspire with an Orleans project I'm working on which uses Azure storage for persistence/streaming, but I saw Orleans doesn't yet support the streaming config sent over by the Aspire apphost. I based my changes off of #8764 and did some pretty minimal manual testing using the orleans sample in the Aspire playground.
Microsoft Reviewers: Open in CodeFlow
@benjaminpetit PTAL - what should IConfiguration support look like for Azure Queues
@tskimmett a test would be helpful here. Eg, update some/all of the existing Azure Queue Streaming tests to use this functionality.
I looked to see if there were relevant tests that could be updated for this and couldn't really tell, but I can take another look at that.
I've updated AQStreamingTests.cs to make use of the new configuration approach for streaming. Notably, this uncovered the problem that the ProviderBuilder I added was incomplete, in that it was not registered for the client, only the Silo.
As a side note, I ran into some trouble running tests to begin with for a few reasons:
- I was missing a basic config
jsonfile with a connection string- I added one on my local machine to get around this. Maybe there are docs explaining local test setup, but I couldn't find any.
- The tests don't work by default on macOS because the testing framework code is written against storage emulator (deprecated).
- I got around this by adding a config setting which disables the automatic emulator startup and manually made sure I had Azurite running.
If you'd like, I can open a PR for that last point to slightly improve the dev experience on non-windows platforms, but not sure if you're too concerned about that.
@ReubenBond @benjaminpetit Let me know if you have any more suggestions or feel more tests are necessary.
I think it's a good start, but it should also be possible to configure MessageVisibilityTimeout.
For tests, I think it would be better to have simple unit tests that just test the config parsing (I believe there is property to get the AccountName on the QueueServiceClient for example).
Sorry it's been so long, life got in the way, but I am determined to help improve the Aspire integration (albeit selfishly 🙂). Please let me know what else needs to be done to get this over the finish line.
@benjaminpetit Any chance you can take another look?
any updates on this PR @benjaminpetit / @ReubenBond / @jsedlack?
/azp run
Azure Pipelines successfully started running 1 pipeline(s).