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

Update packages used by repo #5939

Merged
merged 5 commits into from
Aug 5, 2024
Merged

Update packages used by repo #5939

merged 5 commits into from
Aug 5, 2024

Conversation

zivkan
Copy link
Member

@zivkan zivkan commented Jul 30, 2024

Bug

Fixes: https://github.com/NuGet/Client.Engineering/issues/2946

Description

  • Enable auditSources for repo
  • make NuGetAudit warnings not errors
  • did restore with -p:NuGetAuditMode=all because that's going to be the default when this version of NuGet ships, and fix all warnings

The new version of xunit has some changed behaviour, ITestOutputHelper is per-test, and if it's used after the test it was created for has finished, it throws. PackageManagerTests has tests that would set NuGet's static telemetry object, but not clear it, so I split those telemetry tests into a different class, and set that class to use a collection with parallelism disabled, which makes the tests run after all parallelisable tests have finished. I have an idea for how to improve our test infrastructure to eliminate this risk happening in other test projects, but I'll implement it in another PR.

While at it, I also split the file into a bunch of smaller files, so more of those tests can be run in parallel. Now, dotnet test on my machine for this test project finishes after 1m 48s, compared to 2m 54s (and I found a test that was declared wrong, so I fixed that and now we have 2 more tests running, all in less time).

PR Checklist

  • Meaningful title, helpful description and a linked NuGet/Home issue
  • Added tests N/A
  • Link to an issue or pull request to update docs if this PR changes settings, environment variables, new feature, etc. N/A

@zivkan zivkan requested a review from a team as a code owner July 30, 2024 04:17
@zivkan zivkan changed the title Dev zivkan update packages Update packages used by repo Jul 30, 2024
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.

It can be laborious to audit transitives for projects that don't ship as packages or aren't executables themselves.

We can consider limiting things to the NuGet.Core assemblies + NuGet.VisualStudio.Client, NuGet.VisualStudio, NuGet.VisualStudio.Contracts.

@zivkan zivkan force-pushed the dev-zivkan-update-packages branch from c3ed12f to 754df9c Compare July 31, 2024 11:14
nkolev92
nkolev92 previously approved these changes Jul 31, 2024
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.

Nicely done.

Excited we're using audit sources!

@zivkan zivkan force-pushed the dev-zivkan-update-packages branch from 9600f29 to 40fb5af Compare August 4, 2024 19:37
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.

3 participants