orleans icon indicating copy to clipboard operation
orleans copied to clipboard

Add Microsoft.Extensions.Configuration provider for azure queue streaming

Open tskimmett opened this issue 1 year ago • 8 comments
trafficstars

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

tskimmett avatar Mar 31 '24 02:03 tskimmett

@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.

ReubenBond avatar May 15 '24 18:05 ReubenBond

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.

tskimmett avatar May 15 '24 23:05 tskimmett

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.

tskimmett avatar Jun 23 '24 14:06 tskimmett

As a side note, I ran into some trouble running tests to begin with for a few reasons:

  • I was missing a basic config json file 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.

tskimmett avatar Jun 23 '24 14:06 tskimmett

@ReubenBond @benjaminpetit Let me know if you have any more suggestions or feel more tests are necessary.

tskimmett avatar Jul 06 '24 03:07 tskimmett

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).

benjaminpetit avatar Jul 08 '24 13:07 benjaminpetit

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.

tskimmett avatar Sep 26 '24 01:09 tskimmett

@benjaminpetit Any chance you can take another look?

tskimmett avatar Sep 30 '24 14:09 tskimmett

any updates on this PR @benjaminpetit / @ReubenBond / @jsedlack?

abbottdev avatar Jan 13 '25 12:01 abbottdev

/azp run

ReubenBond avatar Feb 05 '25 18:02 ReubenBond

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Feb 05 '25 18:02 azure-pipelines[bot]