Skip to content
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

Improve start/stopping/restarting commands by waiting for completion #6625

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

JamesNK
Copy link
Member

@JamesNK JamesNK commented Nov 7, 2024

Description

  • Resource start/stop/restart wait for a notification that the resource's state has changed to the desired state. For example, starting a resource causes the server to wait for a state of "Running".
  • Timeout of 20 seconds and then a failure message is displayed.
  • Fixed issue with displaying toast update in the dashboard. If a toast has closed then updating it does nothing. Now a toast is updated and its close time is extended if it is still open, or a new toast is shown with the update

Fixes #6224

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No
  • Does the change require an update in our Aspire docs?
Microsoft Reviewers: Open in CodeFlow

@JamesNK JamesNK added area-dashboard area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication labels Nov 7, 2024
@JamesNK
Copy link
Member Author

JamesNK commented Nov 11, 2024

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@@ -8,6 +8,8 @@ namespace Aspire.Hosting.ApplicationModel;

internal static class CommandsConfigurationExtensions
{
private static readonly TimeSpan s_timeout = TimeSpan.FromSeconds(20);
Copy link
Member

Choose a reason for hiding this comment

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

How did you pick this number?

Copy link
Member Author

@JamesNK JamesNK Nov 11, 2024

Choose a reason for hiding this comment

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

I picked it myself. It seems like 20 seconds is a good amount of time for a timeout.

Edit: I added a comment to say how number was chosen.

@JamesNK JamesNK force-pushed the jamesnk/start-stop-restart-wait branch from 8d9327a to 8294ab1 Compare November 11, 2024 08:14
@JamesNK
Copy link
Member Author

JamesNK commented Nov 12, 2024

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@JamesNK JamesNK marked this pull request as draft November 19, 2024 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication area-dashboard
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve start/stop/restart command notifications
3 participants