-
Notifications
You must be signed in to change notification settings - Fork 458
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for restarting services from the dashboard #295
Comments
@karolz-ms can you evaluate whether this is doable for preview? not critical for preview but is a signficant pain point. |
I believe the change can be done solely in dashboard view model code. Namely, to restart a service, the model code should:
I cannot think of any change on the DCP side that would be required for the above to work as desired, but if we discover something missing, by all means open an issue on the DCP repo. The same technique should also work for restarting Containers. |
Cleared milestone for dashboard triage to see if it fits |
@karolz-ms - Do we need to do anything wrt service/endpoint when deleting/re-creating the service? Would the same work for container/executable? |
@smitpatel no we don't but we need to make sure that annotations are preserved on the Executable/ExecutableReplicaSet. And the same procedure should also work for Containers. I am going to update my previous comment with this information. |
Just an idea for the future: On some scenarios this restart action can require an authorized user, and optionally with roles or policies requirements. |
Was looking to add a request for this as well, both in the case where a service has died (obv not due to an error on my part) and when ive made a change in the running app and need to restart it. |
Using dotnet watch handles the latter case on command line and VS does the same when you use ctrl+f5. You can also hot reload when you hit F5 |
So dotnet watch is transitive? that's nice! i tried it now though and got errors like this in the logs
Starting normaly without watch works for the same solution |
I haven't had the chance to play around with Aspire yet, but this would be great! It's also part of the main big thing I think Tye was missing: being able to start/stop/restart services on demand: dotnet/tye#876
It would be great if there was a way of communicating with the host via a CLI/API to do these things (kind of like what you can do with And by the way, I'm really happy that Tye got a revival in Aspire! It has so much potential for the inner dev loop, so I'm glad it did 😊 |
It would be great to get this in for the next preview based on your prototype @tlmii |
Perhaps that is what you've already done but one option would be to be able to start/restart services in watch mode from the dashboard? Maybe that could also be configured in the startup profile? So i can have a profile called "debug flimflam" that is set to Start service A normally, watch service B, ignore service C |
@drewnoakes This is something we want and I know you were looking at adding command support. This would be the first one. |
Unfortunately restart isn't enough for that since the apphost won’t rebuild your code. If you’re in visual studio, you have to run without debugging to get a more incremental experience without hot reload. |
I think not only restart, but For example, we can start with ReplicaCount = 3 for service, but we can change it to "0" and "4", for example. This will insanely help with testing scenarios of failovers locally - test what happens if you just turn off the database, and than rescale it In my head, this would like smth like this: This will also resolve issue #3095 - as one of the ways to perform "complete stop" of the service (or even restart, after some time, with specified replica count we want) However, It seems easy to add this feature for .NET apps, but it's might be not so trivial for applications where nodes are required to be in state of consensus (any leader-election, multimaster or master-replica architecture) (for example Kafka or Postgres), because it might be required to add info to all brokers/servers about new added host. UPD: Decided to move disscussion about replicas to dedicated issue |
I saw the issue you filed, but restart is what we’ll do first as it’s well understood and useful scenario. |
FYI - @drewnoakes / @karolz-ms |
Fixed in #295 |
In building apps with the aspire, I'm often using the dashboard as a debugging aid, when a process dies it pretty disruptive to have to restart the entire orchestration project in order to reproduce an issue. It would be great to have the ability to restart a process from the dashboard.
The text was updated successfully, but these errors were encountered: