Open karolz-ms opened 3 weeks ago
What is the lifetime relationship between the app host process and the launched dcp processes today? Does the app host process request the shutdown of dcp, or does dcp monitor the launching process and shut itself down when the launching process ends?
There is no good way for the app host process to request DCP shutdown, so the second part is true (dcp monitor the launching process and shut itself down when the launching process ends). Part of the fix for this will be to add a new type of request to DCP that will allow the (test) app host to say "I am done, please perform resource cleanup and shut yourself down".
Is there an existing issue for this?
Describe the bug
When running multiple tests that use app host/DCP, DCP instances (and associated resources such as containers) are kept running until the test run ends. They are not shut down, and resources are not freed, until all the tests complete running. This puts unnecessary strain on the machine and contributes to test instability.
Expected Behavior
What should happen instead is that as soon as a test ends, regardless of the outcome, the DCP instance is allowed to do a graceful shutdown and has the opportunity to release all resources.
Steps To Reproduce
dotnet/Aspire-Samples
GitHub repositorybuild.cmd
dcp
/dcpctrl
instances piling up as the tests are executed.Exceptions (if any)
No response
.NET Version info
No response
Anything else?
No response