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

[release/8.0-staging] ServiceKey comparisons use Equals for matching #96847

Merged

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Jan 11, 2024

Backport of #95807 to release/8.0-staging

/cc @steveharter @tommysor

Customer Impact

Keyed services in DI are new in 8.0, and this addresses an issue when a custom key implements Equals(object) - in some cases the Equals() was not called when it should have been.

Testing

New tests were added.

Risk

Low; simple replace from == to .Equals()

Other

  • Added <GeneratePackageOnBuild>true</GeneratePackageOnBuild>
  • Added <ServicingVersion>1</ServicingVersion>

This brings RemoveAllKeyed in line with service resolution (ServiceProvider.GetRequiredKeyedService)
@ghost
Copy link

ghost commented Jan 11, 2024

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

Issue Details

Backport of #95807 to release/8.0-staging

/cc @steveharter @tommysor

Customer Impact

Testing

Risk

IMPORTANT: If this backport is for a servicing release, please verify that:

  • The PR target branch is release/X.0-staging, not release/X.0.

  • If the change touches code that ships in a NuGet package, you have added the necessary package authoring and gotten it explicitly reviewed.

Author: github-actions[bot]
Assignees: -
Labels:

area-Extensions-DependencyInjection

Milestone: -

@carlossanlop
Copy link
Member

@steveharter @halter73 can you please help fill out the template and send an email to Tactics requesting approval?

Friendly reminder that Tuesday January 16th 4pm is the Code Complete deadline for the February Release. If all requirements are met, please merge your PR before that date and time to ensure this fix gets included in that Release. Otherwise, this will have to wait until March.

@steveharter steveharter added this to the 8.0.x milestone Jan 18, 2024
@steveharter steveharter self-assigned this Jan 18, 2024
@ericstj ericstj added the Servicing-consider Issue for next servicing release review label Jan 25, 2024
@rbhanda rbhanda modified the milestones: 8.0.x, 8.0.3 Feb 1, 2024
@rbhanda rbhanda added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Feb 1, 2024
@carlossanlop
Copy link
Member

@steveharter @benjaminpetit today is code complete for the March release. If this PR meets all the servicing criteria, please merge it before 4pm PT.

Comment on lines +7 to +8
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<ServicingVersion>1</ServicingVersion>
Copy link
Member

Choose a reason for hiding this comment

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

Package authoring changes LGTM.

@carlossanlop carlossanlop merged commit 11a4ff1 into release/8.0-staging Feb 12, 2024
109 of 112 checks passed
@carlossanlop carlossanlop deleted the backport/pr-95807-to-release/8.0-staging branch February 12, 2024 22:24
@github-actions github-actions bot locked and limited conversation to collaborators Mar 14, 2024
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.

None yet

6 participants