Skip to content

Abort host startup before the next phase#90183

Merged
steveharter merged 1 commit into
dotnet:mainfrom
steveharter:DiOrdering
Aug 9, 2023
Merged

Abort host startup before the next phase#90183
steveharter merged 1 commit into
dotnet:mainfrom
steveharter:DiOrdering

Conversation

@steveharter

Copy link
Copy Markdown
Contributor

Change host startup behavior so that the startup aborts before the next phase (Starting, Start and Started) if there are any exceptions.

This makes more sense than the previous behavior of gathering all exceptions in Starting, Start, Started and then abort after Started -- e.g. if an exception occurs in Starting then Start and Started were still run in the previous behavior.

Shutdown, however, will continue to have the same semantics where exceptions are gathered in Stopping, Stop and Stopped. This is to ensure all shutdown code is called.

Fixes #88603

@ghost

ghost commented Aug 8, 2023

Copy link
Copy Markdown

Tagging subscribers to this area: @dotnet/area-extensions-hosting
See info in area-owners.md if you want to be subscribed.

Issue Details

Change host startup behavior so that the startup aborts before the next phase (Starting, Start and Started) if there are any exceptions.

This makes more sense than the previous behavior of gathering all exceptions in Starting, Start, Started and then abort after Started -- e.g. if an exception occurs in Starting then Start and Started were still run in the previous behavior.

Shutdown, however, will continue to have the same semantics where exceptions are gathered in Stopping, Stop and Stopped. This is to ensure all shutdown code is called.

Fixes #88603

Author: steveharter
Assignees: steveharter
Labels:

area-Extensions-Hosting

Milestone: 8.0.0

@buyaa-n buyaa-n left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@steveharter steveharter merged commit ad5ba12 into dotnet:main Aug 9, 2023
@steveharter steveharter deleted the DiOrdering branch August 9, 2023 14:00
@ghost ghost locked as resolved and limited conversation to collaborators Sep 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Validate StartAsync() exception semantics for Starting, Start, Started

3 participants