Skip to content

Conversation

@twsouthwick
Copy link
Member

This change enables auto-configuration of the adapter services based off of the configuration set in aspire. This will ensure that things are wired up correctly for each and only has to be declared in a single space.

This is currently a proof of concept to see how much we can simplify the process of incremental migration with Aspire.

@twsouthwick
Copy link
Member Author

@CZEMacLeod I'd appreciate any thoughts you have here as well. I know you have some similar APIs in one of your projects, but the goal here would be to plumb things through so they can just work and requires a bit more deeper plumbing to allow the services to be autowired together.

Base automatically changed from better-framework-hosting to main June 17, 2025 16:20
@twsouthwick twsouthwick requested a review from joperezr June 17, 2025 22:14
@twsouthwick twsouthwick marked this pull request as ready for review June 17, 2025 22:16
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

Copy link
Member

Choose a reason for hiding this comment

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

Sorry if I'm missing something dumb, but can't these things be lumped together with the IncrementalMigration project as well?

Copy link
Member Author

Choose a reason for hiding this comment

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

A couple of reasons why I added a new package:

  1. It seems that the opinionated Aspire stuff is usually in a separate package, so I followed that pattern
  2. We don't currently directly reference Yarp in the packages, so this package brings that together
  3. It also simplifies that for both framework and core, we can now just say install the "Aspire.Microsoft.AspNetCore.SystemWebAdapters" package

I'm not tied to this setup and would be fine combining them if these reasons aren't good ones to keep it separate.

<PackageVersion Include="System.Runtime.Caching" Version="8.0.0" />
<PackageVersion Include="System.Security.Principal.Windows" Version="5.0.0" />
<PackageVersion Include="System.Text.Json" Version="8.0.5" />
<PackageVersion Include="Yarp.ReverseProxy" Version="2.3.0" />
Copy link
Member

Choose a reason for hiding this comment

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

I know you are not using that here yet, but as FYI Aspire also has a custom integration for Yarp.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, I took a look at it, but it seems to require a setup with a config file which isn't how we've been using it since there's a single fallback. Maybe I missed something, but it seems that in its current state it's not a great fit for how customers set up incremental migration setups.

{
// All health checks must pass for app to be considered ready to accept traffic after starting
app.MapHealthChecks("/health");
app.MapHealthChecks("/health").ShortCircuit();
Copy link
Member

Choose a reason for hiding this comment

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

Might be a dumb question but won't this be already part of the above call to configure http clients where we add the standard resilience handler?

Copy link
Member

@joperezr joperezr left a comment

Choose a reason for hiding this comment

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

Left a couple of questions but this looks good overall.

@twsouthwick twsouthwick enabled auto-merge (squash) June 25, 2025 01:26
@twsouthwick twsouthwick merged commit bdd62ea into main Jun 25, 2025
5 checks passed
@twsouthwick twsouthwick deleted the aspirify branch June 25, 2025 01:36
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.

3 participants