Don't cache Endpoints if a source throws#43729
Merged
BrennanConroy merged 1 commit intorelease/7.0from Sep 6, 2022
Merged
Conversation
|
Hi @halter73. Please make sure you've updated the PR description to use the Shiproom Template. Also, make sure this PR is not marked as a draft and is ready-to-merge. To learn more about how to prepare a servicing PR click here. |
eee92e2 to
d0f247d
Compare
JamesNK
approved these changes
Sep 3, 2022
d0f247d to
0999449
Compare
0999449 to
be48264
Compare
davidfowl
approved these changes
Sep 3, 2022
Member
|
Approved for .NET 7 RC2. |
1 task
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Don't cache Endpoints in CompositeEndpointDataSource if a child EndpointDataSource source throws. CompositeEndpointDataSource is almost always the root EndpointDataSource, so this affects most apps.
Fixes #43693
Customer Impact
Without this fix, you do not see endpoint generation errors after the first request. You should see something like:
But instead get 404s after the first failed request:
We should be consistently throwing exceptions to outer middleware like the one responsible for the developer exception page and producing 500s instead of 404s.
Regression?
This is a regression introduced in 7.0-preview6 by #42195.
Risk
This is merely waiting to cache a list later after we know nothing threw while generating the list's elements.
Verification
Packaging changes reviewed?
@Pilchie