Skip to content

Fixes CA2213 issues on NuGet client repo (release-6.3.x)#4913

Merged
kartheekp-ms merged 1 commit intorelease-6.3.xfrom
dev-kartheekp-ms-fixcifailure-63x
Nov 11, 2022
Merged

Fixes CA2213 issues on NuGet client repo (release-6.3.x)#4913
kartheekp-ms merged 1 commit intorelease-6.3.xfrom
dev-kartheekp-ms-fixcifailure-63x

Conversation

@kartheekp-ms
Copy link
Contributor

@kartheekp-ms kartheekp-ms commented Nov 10, 2022

Bug

Fixes: https://github.com/NuGet/Client.Engineering/issues/1998
Tracking: NuGet/Home#12116

Regression? Last working version:

Description

Cherry-pick c543930 to suppress CI failures in release-6.3.x branch because PR build failed with the following error.

##[error]src\NuGet.Core\NuGet.Protocol\HttpSource\HttpSourceAuthenticationHandler.cs(28,40): Error CA2213: 'HttpSourceAuthenticationHandler' contains field '_httpClientLock' that is of IDisposable type 'SemaphoreSlim', but it is never disposed. Change the Dispose method on 'HttpSourceAuthenticationHandler' to call Close or Dispose on this field.
D:\a\_work\1\s\src\NuGet.Core\NuGet.Protocol\HttpSource\HttpSourceAuthenticationHandler.cs(28,40): error CA2213: 'HttpSourceAuthenticationHandler' contains field '_httpClientLock' that is of IDisposable type 'SemaphoreSlim', but it is never disposed. Change the Dispose method on 'HttpSourceAuthenticationHandler' to call Close or Dispose on this field. [D:\a\_work\1\s\src\NuGet.Core\NuGet.Protocol\NuGet.Protocol.csproj]

PR Checklist

  • PR has a meaningful title

  • PR has a linked issue.

  • Described changes

  • Tests

    • N/A
  • Documentation

    • N/A

@kartheekp-ms kartheekp-ms requested a review from a team as a code owner November 10, 2022 20:51
Copy link
Member

@nkolev92 nkolev92 left a comment

Choose a reason for hiding this comment

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

Wouldn't this change technically introduce more risk? Can we just suppress the warning instead.

* suppress CA2213 to unblock dev

* Adding TODO comment with bug number
@kartheekp-ms kartheekp-ms force-pushed the dev-kartheekp-ms-fixcifailure-63x branch from 01fecb7 to f2b2096 Compare November 11, 2022 00:40
@kartheekp-ms
Copy link
Contributor Author

Wouldn't this change technically introduce more risk? Can we just suppress the warning instead.

Sure, we can do that. Cherry-picked c543930 commit.

@kartheekp-ms kartheekp-ms merged commit 99602e5 into release-6.3.x Nov 11, 2022
@kartheekp-ms kartheekp-ms deleted the dev-kartheekp-ms-fixcifailure-63x branch November 11, 2022 21:32
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.

5 participants