dotnet / aspire

Tools, templates, and packages to accelerate building observable, production-ready apps
https://learn.microsoft.com/dotnet/aspire
MIT License
3.84k stars 462 forks source link

Regression: ReplicasAndProxylessEndpointThrows test fails #5898

Closed davidebbo closed 1 month ago

davidebbo commented 1 month ago

ReplicasAndProxylessEndpointThrows is disabled in CI per #4651, but I was running it frequently and it was passing reliably.

It became broken a few days ago due to a5b3bcfddb3478ab34f207251929d531322d1a85. The root of the problem is that the new code never calls ExecutableReplicaSet.Create, and no ExecutableReplicaSet instance is ever created.

Yet ApplicationExecutor has error handling logic that tests for it, and this is why the test is failing:

if (appResource.DcpResource is ExecutableReplicaSet ers && ers.Spec.Replicas > 1)
{
    throw new InvalidOperationException($"Resource '{modelResourceName}' uses multiple replicas and a proxy-less endpoint '{ea.Name}'. These features do not work together.");
}

It seems like a valid error detection situation, which has regressed.

davidfowl commented 1 month ago

cc @JamesNK