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

Preserve extension registration order #26132

Merged
merged 1 commit into from
Sep 22, 2021
Merged

Preserve extension registration order #26132

merged 1 commit into from
Sep 22, 2021

Conversation

AndriySvyryd
Copy link
Member

Fixes #26071

Description

The extension services are applied in alphabetic order instead of the order in which they were added.

The fix requires breaking some protected API on DbContextOptions, but this class is designed to use composition, not inheritance, so it shouldn't affect any external code.

Customer impact

Extensions that depend on a provider being registered will throw errors if they happen to be sorted before the provider.

How found

Customer

Regression

Yes, introduced in rc1 by 4e3ce4e

Testing

Test for this scenario added in the PR.

Risk

Low, this reverts the behavior to pre-rc1.

@AndriySvyryd AndriySvyryd requested a review from a team September 22, 2021 02:56
@AndriySvyryd AndriySvyryd changed the title Preserve extension registration order [6.0] Preserve extension registration order Sep 22, 2021
@AndriySvyryd
Copy link
Member Author

@Pilchie For approval

@Pilchie
Copy link
Member

Pilchie commented Sep 22, 2021

Approved for EFCore 6.0

@AndriySvyryd AndriySvyryd changed the title [6.0] Preserve extension registration order Preserve extension registration order Sep 22, 2021
@AndriySvyryd AndriySvyryd merged commit 2b2f3a3 into release/6.0 Sep 22, 2021
@AndriySvyryd AndriySvyryd deleted the Issue26071 branch September 22, 2021 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Customization of the ordering of extensions
3 participants