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.3xx] Update dependencies from nuget/nuget.client #38037

Conversation

dotnet-maestro[bot]
Copy link
Contributor

@dotnet-maestro dotnet-maestro bot commented Jan 16, 2024

This pull request updates the following dependencies

From https://github.com/nuget/nuget.client

  • Subscription: 65a0be8f-6793-4703-df8e-08dc11e0730b
  • Build: 6.10.0.12
  • Date Produced: January 23, 2024 2:10:40 AM UTC
  • Commit: e4899ee48ff3d7787ee345f546c818ce6b962807
  • Branch: dev

…6.10.0.5

Microsoft.Build.NuGetSdkResolver , NuGet.Build.Tasks , NuGet.Build.Tasks.Console , NuGet.Build.Tasks.Pack , NuGet.CommandLine.XPlat , NuGet.Commands , NuGet.Common , NuGet.Configuration , NuGet.Credentials , NuGet.DependencyResolver.Core , NuGet.Frameworks , NuGet.LibraryModel , NuGet.Packaging , NuGet.ProjectModel , NuGet.Protocol , NuGet.Versioning
 From Version 6.9.0-rc.74 -> To Version 6.10.0-preview.1.5
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-CodeFlow untriaged Request triage from a team member labels Jan 16, 2024
@v-wuzhai
Copy link
Member

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@v-wuzhai v-wuzhai requested a review from a team January 17, 2024 09:50
…6.10.0.5

Microsoft.Build.NuGetSdkResolver , NuGet.Build.Tasks , NuGet.Build.Tasks.Console , NuGet.Build.Tasks.Pack , NuGet.CommandLine.XPlat , NuGet.Commands , NuGet.Common , NuGet.Configuration , NuGet.Credentials , NuGet.DependencyResolver.Core , NuGet.Frameworks , NuGet.LibraryModel , NuGet.Packaging , NuGet.ProjectModel , NuGet.Protocol , NuGet.Versioning
 From Version 6.9.0-rc.74 -> To Version 6.10.0-preview.1.5
@marcpopMSFT
Copy link
Member

@dotnet/nuget-team did you enable a new enforcement for CPM? I don't want to use package source mapping for the tests so is there a property to disable this check only in the tests?
There are 19 package sources defined in your configuration. When using central package management, please map your package sources with package source mapping (https://aka.ms/nuget-package-source-mapping) or specify a single package source.

@jeffkl
Copy link
Contributor

jeffkl commented Jan 17, 2024

CPM is now enabled by default if Directory.Packages.props exists and was imported where as before you also had to set ManagePackageVersionsCentrally=true. Some people checked in an empty Directory.Packages.props to disable it for functional tests but you'll also need to set ManagePackageVersionsCentrally now:

<Project>
  <PropertyGroup>
    <ManagePackageVersionsCentrally>false</ManagePackageVersionsCentrally>
  </PropertyGroup>
</Project>

You can also run functional tests from directories outside of the repo if possible so that those tests don't import the root Directory.Build.props, Directory.Build.targets, Directory.Packages.props, etc.

@marcpopMSFT
Copy link
Member

CPM was already enabled for that test project and I can't disable it without unwinding a bunch of package references. That particular project appears to build and test at the same time from what I can tell so that means the tests themselves pick up the D.B.props. I can see if I can figure out how to make that change for the test.

However, is this a new change in 17.10? If so, that's going to be potentially painful for customers and would violate the principal of no new warnings in minor releases. CC @baronfel

@baronfel
Copy link
Member

Yeah this is a pretty big behavioral change - ideally there would be some kind of gradual on-ramp. How many folks do you think are in the triggering scenario today? Is it possible to detect and warn for a release (or until .NET 9) and give a chance for fixing in a non-breaking way?

@jeffkl
Copy link
Contributor

jeffkl commented Jan 17, 2024

There were no warnings added, just that if a Directory.Packages.props was imported then CPM is enabled without having to additionally set ManagePackageVersionsCentrally to true. My guess is that only repos that are using MSBuild project tests which will walk up the directory structure looking for Directory.Build.props/Directory.Packages.props/etc will have to set this to false. I have a few repos that I run tests outside of the repo just for this reason, I don't like it when tests are importing build logic from my repo.

That said, I'm just guessing as to the problem based on the warning message pasted above. This is the only recent change that came to mind that might explain what's going on: NuGet/NuGet.Client#5572

If this test was working before and now it isn't, I'd imagine just adding <ManagePackageVersionsCentrally>false</ManagePackageVersionsCentrally> to the Directory.Packages.props that that test uses would be enough.

@marcpopMSFT
Copy link
Member

Digging into this more, the test project builds in this folder and picks up a directory.packages.props from the root folder:
DirectoryPackagesPropsPath = **D:\a_work\1\s**Directory.Packages.props

We build the test project into a root\artifacts folder and run the tests from there.
D:\a_work\1\s\artifacts\tmp\Release\dotnet-new.IntegrationTests\FeaturesSupport\console-6-null\20240117142933865\MyProject\console.csproj

I'm not sure the impact of rerouting the tests to a completely different folder (as I believe the build machines don't let me use the full drive). This seems like it would be a fairly common situation as often times tests get run from their build output folder and usually that folder would be under the root node.

I'm surprised the tests aren't picking up the root D.B.props which suppresses this warning. They must be finding one somewhere further up the chain that doesn't chain in the root one. I kind of don't like this warning in general as why wouldn't I want to use CPM without package source mapping? I would expect even someone who wants both would enable CPM first as a stepping stone to PSM.

Either way, I expect this to potentially cause a lot of customer noise...

@jeffkl
Copy link
Contributor

jeffkl commented Jan 17, 2024

I'm not very familiar with this repo, so I'll need help figuring out how to fix this. I see places where its disabling the import of Directory.Build.props:

D:\dotnet\sdk>findstr /spic:"importDirectory" *
eng\common\internal\Tools.csproj:    <ImportDirectoryBuildTargets>false</ImportDirectoryBuildTargets>
src\Tasks\Microsoft.NET.Build.Tasks\targets\GenerateDeps\GenerateDeps.proj:    <ImportDirectoryBuildProps>false</ImportDirectoryBuildProps>
src\Tasks\Microsoft.NET.Build.Tasks\targets\GenerateDeps\GenerateDeps.proj:    <ImportDirectoryBuildTargets>false</ImportDirectoryBuildTargets>
src\Tests\Microsoft.DotNet.PackageInstall.Tests\Microsoft.DotNet.PackageInstall.Tests.csproj:    <MSBuild BuildInParallel="False" Projects="SampleGlobalTool/consoledemo.csproj" Targets="Restore" Properties="Configuration=Release;BaseOutputPath=$(testAssetSourceRoot)/bin/;BaseIntermediateOutputPath=$(testAssetSourceRoot)/obj/;ImportDirectoryBuildProps=false;ImportDirectoryBuildTargets=false;ForceRestoreToEvaluateSeparately=1" RemoveProperties="TargetFramework">
src\Tests\Microsoft.DotNet.PackageInstall.Tests\Microsoft.DotNet.PackageInstall.Tests.csproj:    <MSBuild BuildInParallel="False" Projects="SampleGlobalTool/consoledemo.csproj" Targets="Build;Publish" Properties="Configuration=Release;BaseOutputPath=$(testAssetSourceRoot)/bin/;BaseIntermediateOutputPath=$(testAssetSourceRoot)/obj/;ImportDirectoryBuildProps=false;ImportDirectoryBuildTargets=false" RemoveProperties="TargetFramework">
src\Tests\Microsoft.DotNet.PackageInstall.Tests\Microsoft.DotNet.PackageInstall.Tests.csproj:    <MSBuild BuildInParallel="False" Projects="SampleGlobalTool/consoledemo.csproj" Targets="pack" Properties="Configuration=Release;NuspecFile=includepublish.nuspec;NuspecBasePath=$(testAssetSourceRoot);PackageOutputPath=$(OutputPath)TestAssetLocalNugetFeed;BaseIntermediateOutputPath=$(testAssetSourceRoot)/obj/;ImportDirectoryBuildProps=false;ImportDirectoryBuildTargets=false" RemoveProperties="TargetFramework">
src\Tests\Microsoft.DotNet.PackageInstall.Tests\Microsoft.DotNet.PackageInstall.Tests.csproj:    <MSBuild BuildInParallel="False" Projects="SampleGlobalToolWithPreview/consoledemo.csproj" Targets="Restore" Properties="Configuration=Release;BaseOutputPath=$(testAssetSourceRoot)/bin/;BaseIntermediateOutputPath=$(testAssetSourceRoot)/obj/;ImportDirectoryBuildProps=false;ImportDirectoryBuildTargets=false;ForceRestoreToEvaluateSeparately=1" RemoveProperties="TargetFramework">
src\Tests\Microsoft.DotNet.PackageInstall.Tests\Microsoft.DotNet.PackageInstall.Tests.csproj:    <MSBuild BuildInParallel="False" Projects="SampleGlobalToolWithPreview/consoledemo.csproj" Targets="Build;Publish" Properties="Configuration=Release;BaseOutputPath=$(testAssetSourceRoot)/bin/;BaseIntermediateOutputPath=$(testAssetSourceRoot)/obj/;ImportDirectoryBuildProps=false;ImportDirectoryBuildTargets=false" RemoveProperties="TargetFramework">
src\Tests\Microsoft.DotNet.PackageInstall.Tests\Microsoft.DotNet.PackageInstall.Tests.csproj:    <MSBuild BuildInParallel="False" Projects="SampleGlobalToolWithPreview/consoledemo.csproj" Targets="pack" Properties="Configuration=Release;NuspecFile=includepublish.nuspec;NuspecBasePath=$(testAssetSourceRoot);PackageOutputPath=$(OutputPath)TestAssetLocalNugetFeed;BaseIntermediateOutputPath=$(testAssetSourceRoot)/obj/;ImportDirectoryBuildProps=false;ImportDirectoryBuildTargets=false" RemoveProperties="TargetFramework">
src\Tests\Microsoft.DotNet.PackageInstall.Tests\Microsoft.DotNet.PackageInstall.Tests.csproj:    <MSBuild BuildInParallel="False" Projects="SampleGlobalToolWithDifferentCasing/ConsoleDemoWithCasing.csproj" Targets="Restore" Properties="Configuration=Release;BaseOutputPath=$(testAssetSourceRoot)/bin/;BaseIntermediateOutputPath=$(testAssetSourceRoot)/obj/;ImportDirectoryBuildProps=false;ImportDirectoryBuildTargets=false;ForceRestoreToEvaluateSeparately=1" RemoveProperties="TargetFramework">
src\Tests\Microsoft.DotNet.PackageInstall.Tests\Microsoft.DotNet.PackageInstall.Tests.csproj:    <MSBuild BuildInParallel="False" Projects="SampleGlobalToolWithDifferentCasing/ConsoleDemoWithCasing.csproj" Targets="Build;Publish" Properties="Configuration=Release;BaseOutputPath=$(testAssetSourceRoot)/bin/;BaseIntermediateOutputPath=$(testAssetSourceRoot)/obj/;ImportDirectoryBuildProps=false;ImportDirectoryBuildTargets=false" RemoveProperties="TargetFramework">
src\Tests\Microsoft.DotNet.PackageInstall.Tests\Microsoft.DotNet.PackageInstall.Tests.csproj:    <MSBuild BuildInParallel="False" Projects="SampleGlobalToolWithDifferentCasing/ConsoleDemoWithCasing.csproj" Targets="pack" Properties="Configuration=Release;NuspecFile=includepublish.nuspec;NuspecBasePath=$(testAssetSourceRoot);PackageOutputPath=$(OutputPath)TestAssetLocalNugetFeed;BaseIntermediateOutputPath=$(testAssetSourceRoot)/obj/;ImportDirectoryBuildProps=false;ImportDirectoryBuildTargets=false" RemoveProperties="TargetFramework">
src\Tests\Microsoft.DotNet.PackageInstall.Tests\Microsoft.DotNet.PackageInstall.Tests.csproj:    <MSBuild BuildInParallel="False" Projects="SampleGlobalToolWithShim/consoledemo.csproj" Targets="Restore" Properties="Configuration=Release;BaseOutputPath=$(testAssetSourceRoot)/bin/;BaseIntermediateOutputPath=$(testAssetSourceRoot)/obj/;ImportDirectoryBuildProps=false;ImportDirectoryBuildTargets=false;ForceRestoreToEvaluateSeparately=1" RemoveProperties="TargetFramework">
src\Tests\Microsoft.DotNet.PackageInstall.Tests\Microsoft.DotNet.PackageInstall.Tests.csproj:    <MSBuild BuildInParallel="False" Projects="SampleGlobalToolWithShim/consoledemo.csproj" Targets="Build;Publish" Properties="Configuration=Release;BaseOutputPath=$(testAssetSourceRoot)/bin/;BaseIntermediateOutputPath=$(testAssetSourceRoot)/obj/;ImportDirectoryBuildProps=false;ImportDirectoryBuildTargets=false" RemoveProperties="TargetFramework">
src\Tests\Microsoft.DotNet.PackageInstall.Tests\Microsoft.DotNet.PackageInstall.Tests.csproj:    <MSBuild BuildInParallel="False" Projects="SampleGlobalToolWithShim/consoledemo.csproj" Targets="pack" Properties="Configuration=Release;NuspecFile=includepublish.nuspec;NuspecBasePath=$(testAssetSourceRoot);PackageOutputPath=$(OutputPath)TestAssetLocalNugetFeed;BaseIntermediateOutputPath=$(testAssetSourceRoot)/obj/;ImportDirectoryBuildProps=false;ImportDirectoryBuildTargets=false" RemoveProperties="TargetFramework">
src\Tests\Microsoft.NET.Build.Tests\ArtifactsOutputPathTests.cs:                return command.WithEnvironmentVariable("ImportDirectoryBuildProps", "false");

Either way, I expect this to potentially cause a lot of customer noise...

As far as I know, the only time you'll never hit something like this is if your repository runs tests that involve evaluating MSBuild projects on-the-fly from the repo itself and are using CPM but you don't explicitly disable CPM. I don't think that's very common from my experience.

dotnet-maestro bot and others added 2 commits January 18, 2024 14:01
…6.10.0.7

Microsoft.Build.NuGetSdkResolver , NuGet.Build.Tasks , NuGet.Build.Tasks.Console , NuGet.Build.Tasks.Pack , NuGet.CommandLine.XPlat , NuGet.Commands , NuGet.Common , NuGet.Configuration , NuGet.Credentials , NuGet.DependencyResolver.Core , NuGet.Frameworks , NuGet.LibraryModel , NuGet.Packaging , NuGet.ProjectModel , NuGet.Protocol , NuGet.Versioning
 From Version 6.9.0-rc.74 -> To Version 6.10.0-preview.1.7
…6.10.0.8

Microsoft.Build.NuGetSdkResolver , NuGet.Build.Tasks , NuGet.Build.Tasks.Console , NuGet.Build.Tasks.Pack , NuGet.CommandLine.XPlat , NuGet.Commands , NuGet.Common , NuGet.Configuration , NuGet.Credentials , NuGet.DependencyResolver.Core , NuGet.Frameworks , NuGet.LibraryModel , NuGet.Packaging , NuGet.ProjectModel , NuGet.Protocol , NuGet.Versioning
 From Version 6.9.0-rc.74 -> To Version 6.10.0-preview.1.8
@marcpopMSFT
Copy link
Member

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

…6.10.0.8

Microsoft.Build.NuGetSdkResolver , NuGet.Build.Tasks , NuGet.Build.Tasks.Console , NuGet.Build.Tasks.Pack , NuGet.CommandLine.XPlat , NuGet.Commands , NuGet.Common , NuGet.Configuration , NuGet.Credentials , NuGet.DependencyResolver.Core , NuGet.Frameworks , NuGet.LibraryModel , NuGet.Packaging , NuGet.ProjectModel , NuGet.Protocol , NuGet.Versioning
 From Version 6.9.0-rc.74 -> To Version 6.10.0-preview.1.8
…6.10.0.9

Microsoft.Build.NuGetSdkResolver , NuGet.Build.Tasks , NuGet.Build.Tasks.Console , NuGet.Build.Tasks.Pack , NuGet.CommandLine.XPlat , NuGet.Commands , NuGet.Common , NuGet.Configuration , NuGet.Credentials , NuGet.DependencyResolver.Core , NuGet.Frameworks , NuGet.LibraryModel , NuGet.Packaging , NuGet.ProjectModel , NuGet.Protocol , NuGet.Versioning
 From Version 6.9.0-rc.74 -> To Version 6.10.0-preview.1.9
…6.10.0.9

Microsoft.Build.NuGetSdkResolver , NuGet.Build.Tasks , NuGet.Build.Tasks.Console , NuGet.Build.Tasks.Pack , NuGet.CommandLine.XPlat , NuGet.Commands , NuGet.Common , NuGet.Configuration , NuGet.Credentials , NuGet.DependencyResolver.Core , NuGet.Frameworks , NuGet.LibraryModel , NuGet.Packaging , NuGet.ProjectModel , NuGet.Protocol , NuGet.Versioning
 From Version 6.9.0-rc.74 -> To Version 6.10.0-preview.1.9
@marcpopMSFT
Copy link
Member

@dotnet/domestic-cat I'm not entirely sure why this nuget update is failing an alias test only on Ubuntu:
�[m�[37m /datadisks/disk1/work/9FB80922/w/B69109F0/e/testExecutionDirectory/CanBuildProje---32D5EEC0_2/Project/Project.cs(9,13): error CS0118: 'First.A' is a namespace but is used like a type [/datadisks/disk1/work/9FB80922/w/B69109F0/e/testExecutionDirectory/CanBuildProje---32D5EEC0_2/Project/Project.csproj]

Unclear to me why the nuget update would even affect that. Thoughts?

…6.10.0.9

Microsoft.Build.NuGetSdkResolver , NuGet.Build.Tasks , NuGet.Build.Tasks.Console , NuGet.Build.Tasks.Pack , NuGet.CommandLine.XPlat , NuGet.Commands , NuGet.Common , NuGet.Configuration , NuGet.Credentials , NuGet.DependencyResolver.Core , NuGet.Frameworks , NuGet.LibraryModel , NuGet.Packaging , NuGet.ProjectModel , NuGet.Protocol , NuGet.Versioning
 From Version 6.9.0-rc.74 -> To Version 6.10.0-preview.1.9
…6.10.0.12

Microsoft.Build.NuGetSdkResolver , NuGet.Build.Tasks , NuGet.Build.Tasks.Console , NuGet.Build.Tasks.Pack , NuGet.CommandLine.XPlat , NuGet.Commands , NuGet.Common , NuGet.Configuration , NuGet.Credentials , NuGet.DependencyResolver.Core , NuGet.Frameworks , NuGet.LibraryModel , NuGet.Packaging , NuGet.ProjectModel , NuGet.Protocol , NuGet.Versioning
 From Version 6.9.0-rc.74 -> To Version 6.10.0-preview.1.12
@MiYanni
Copy link
Member

MiYanni commented Jan 24, 2024

So, one of these pipeline runs actually succeeded:
image

I'm thinking it is just, somehow, an inconsistent test. I'll just keep re-running it.

@MiYanni MiYanni merged commit 8382d65 into release/8.0.3xx Jan 24, 2024
20 checks passed
@MiYanni MiYanni deleted the darc-release/8.0.3xx-cd00584b-4f3d-447a-9b52-8a9c1693bb92 branch January 24, 2024 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-CodeFlow untriaged Request triage from a team member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants