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 SDK to 23523.1 #4606

Merged
merged 7 commits into from
Nov 8, 2023
Merged

Update SDK to 23523.1 #4606

merged 7 commits into from
Nov 8, 2023

Conversation

amcasey
Copy link
Member

@amcasey amcasey commented Oct 23, 2023

Regular BuildOps update

Microsoft Reviewers: Open in CodeFlow

@ghost ghost assigned amcasey Oct 23, 2023
@amcasey
Copy link
Member Author

amcasey commented Oct 23, 2023

@wtgodbe should aspnet-build be a required reviewer in this repo too?

@wtgodbe
Copy link
Member

wtgodbe commented Oct 23, 2023

@joperezr how do you normally handle review requests in this repo? I see there's no Codeowners file - I'd be happy to be a required reviewer on the things build-ops does in Extensions (namely SDK updates)

@RussKie
Copy link
Member

RussKie commented Oct 23, 2023

If the build is green - merge it :)
If not - try to fix it.

@RussKie
Copy link
Member

RussKie commented Oct 23, 2023

This SDK is bugged:

PS D:\Development\dotnet-extensions> dotnet tool restore --verbosity minimal
Unhandled exception: System.AggregateException: One or more errors occurred. (The process cannot access the file 'C:\Users\user\AppData\Local\Temp\84179bdb-1cff-4a90-ae4c-9f501d7c1b32\project.assets.json' because it is being used by another process.) (The process cannot access the file 'C:\Users\user\AppData\Local\Temp\84179bdb-1cff-4a90-ae4c-9f501d7c1b32\project.assets.json' because it is being used by another process.)
 ---> System.IO.IOException: The process cannot access the file 'C:\Users\user\AppData\Local\Temp\84179bdb-1cff-4a90-ae4c-9f501d7c1b32\project.assets.json' because it is being used by another process.
   at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
   at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
   at System.IO.Strategies.FileStreamHelpers.ChooseStrategyCore(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
   at NuGet.ProjectModel.LockFileFormat.Write(String filePath, LockFile lockFile)
   at Microsoft.DotNet.Cli.ToolPackage.ToolPackageDownloader.CreateAssetFile(PackageId packageId, NuGetVersion version, DirectoryPath packagesRootPath, DirectoryPath assetFileDirectory, String runtimeJsonGraph, String targetFramework)
   at Microsoft.DotNet.Cli.ToolPackage.ToolPackageDownloader.<>c__DisplayClass8_0.<InstallPackage>b__0()
   at Microsoft.DotNet.Cli.TransactionalAction.Run[T](Func`1 action, Action commit, Action rollback)
   at Microsoft.DotNet.Tools.Tool.Restore.ToolRestoreCommand.InstallPackages(ToolManifestPackage package, Nullable`1 configFile)
   at Microsoft.DotNet.Tools.Tool.Restore.ToolRestoreCommand.<>c__DisplayClass10_0.<Execute>b__0(ToolManifestPackage package)
   at System.Linq.Parallel.SelectQueryOperator`2.SelectQueryOperatorResults.GetElement(Int32 index)
   at System.Linq.Parallel.QueryResults`1.get_Item(Int32 index)
   at System.Linq.Parallel.PartitionedDataSource`1.ListContiguousIndexRangeEnumerator.MoveNext(T& currentElement, Int32& currentKey)
   at System.Linq.Parallel.StopAndGoSpoolingTask`2.SpoolingWork()
   at System.Linq.Parallel.SpoolingTaskBase.Work()
   at System.Linq.Parallel.QueryTask.BaseWork(Object unused)
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
   --- End of inner exception stack trace ---
   at System.Linq.Parallel.QueryTaskGroupState.QueryEnd(Boolean userInitiatedDispose)
   at System.Linq.Parallel.SpoolingTask.SpoolStopAndGo[TInputOutput,TIgnoreKey](QueryTaskGroupState groupState, PartitionedStream`2 partitions, SynchronousChannel`1[] channels, TaskScheduler taskScheduler)
   at System.Linq.Parallel.DefaultMergeHelper`2.System.Linq.Parallel.IMergeHelper<TInputOutput>.Execute()
   at System.Linq.Parallel.MergeExecutor`1.Execute()
   at System.Linq.Parallel.MergeExecutor`1.Execute[TKey](PartitionedStream`2 partitions, Boolean ignoreOutput, ParallelMergeOptions options, TaskScheduler taskScheduler, Boolean isOrdered, CancellationState cancellationState, Int32 queryId)
   at System.Linq.Parallel.PartitionedStreamMerger`1.Receive[TKey](PartitionedStream`2 partitionedStream)
   at System.Linq.Parallel.UnaryQueryOperator`2.UnaryQueryOperatorResults.GivePartitionedStream(IPartitionedStreamRecipient`1 recipient)
   at System.Linq.Parallel.QueryOperator`1.ExecuteAndGetResultsAsArray()
   at System.Linq.ParallelEnumerable.ToArray[TSource](ParallelQuery`1 source)
   at Microsoft.DotNet.Tools.Tool.Restore.ToolRestoreCommand.Execute()
   at System.CommandLine.Invocation.InvocationPipeline.Invoke(ParseResult parseResult)
   at Microsoft.DotNet.Cli.Program.ProcessArgs(String[] args, TimeSpan startupTime, ITelemetry telemetryClient)
 ---> (Inner Exception #1) System.IO.IOException: The process cannot access the file 'C:\Users\igveliko\AppData\Local\Temp\84179bdb-1cff-4a90-ae4c-9f501d7c1b32\project.assets.json' because it is being used by another process.
   at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
   at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
   at System.IO.Strategies.FileStreamHelpers.ChooseStrategyCore(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
   at NuGet.ProjectModel.LockFileFormat.Write(String filePath, LockFile lockFile)
   at Microsoft.DotNet.Cli.ToolPackage.ToolPackageDownloader.CreateAssetFile(PackageId packageId, NuGetVersion version, DirectoryPath packagesRootPath, DirectoryPath assetFileDirectory, String runtimeJsonGraph, String targetFramework)
   at Microsoft.DotNet.Cli.ToolPackage.ToolPackageDownloader.<>c__DisplayClass8_0.<InstallPackage>b__0()
   at Microsoft.DotNet.Cli.TransactionalAction.Run[T](Func`1 action, Action commit, Action rollback)
   at Microsoft.DotNet.Tools.Tool.Restore.ToolRestoreCommand.InstallPackages(ToolManifestPackage package, Nullable`1 configFile)
   at Microsoft.DotNet.Tools.Tool.Restore.ToolRestoreCommand.<>c__DisplayClass10_0.<Execute>b__0(ToolManifestPackage package)
   at System.Linq.Parallel.SelectQueryOperator`2.SelectQueryOperatorResults.GetElement(Int32 index)
   at System.Linq.Parallel.QueryResults`1.get_Item(Int32 index)
   at System.Linq.Parallel.PartitionedDataSource`1.ListContiguousIndexRangeEnumerator.MoveNext(T& currentElement, Int32& currentKey)
   at System.Linq.Parallel.StopAndGoSpoolingTask`2.SpoolingWork()
   at System.Linq.Parallel.SpoolingTaskBase.Work()
   at System.Linq.Parallel.QueryTask.BaseWork(Object unused)
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)<---

@RussKie
Copy link
Member

RussKie commented Oct 23, 2023

This failure is the one where multiple tools in a dotnet-tools.json file causes a concurrent access issue - was fixed in 8.0 by dotnet/sdk#35884. @JL03-Yue has that fix been ported to main yet?

@JamesNK
Copy link
Member

JamesNK commented Oct 26, 2023

I re-ran the build and it still fails.

Interestingly, dotnet/aspnetcore#51588 successfully passed in the dotnet/aspnetcore repo.

@JL03-Yue do you have an update on that fix? Will updating the SDK to a newer version fix this failure?

@wtgodbe
Copy link
Member

wtgodbe commented Oct 26, 2023

9.0.100-alpha.1.23523.1 doesn't have the fix, but the latest SDK does - we unblocked aspnetcore w/ an SDK from Tuesday

global.json Outdated Show resolved Hide resolved
global.json Outdated Show resolved Hide resolved
@JamesNK
Copy link
Member

JamesNK commented Oct 27, 2023

I updated this PR to use the same SDK version as ASP.NET Core. There is a new error:

D:\a\_work\1\s\src\Analyzers\Microsoft.Analyzers.Extra\Microsoft.Analyzers.Extra.csproj : error MSB4242: SDK Resolver Failure: "The SDK resolver "Microsoft.DotNet.MSBuildWorkloadSdkResolver" failed while attempting to resolve the SDK "Microsoft.NET.Sdk". Exception: "System.IO.FileNotFoundException: Could not load file or assembly 'System.Text.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified.
D:\a\_work\1\s\src\Analyzers\Microsoft.Analyzers.Extra\Microsoft.Analyzers.Extra.csproj : error MSB4242: File name: 'System.Text.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'
D:\a\_work\1\s\src\Analyzers\Microsoft.Analyzers.Extra\Microsoft.Analyzers.Extra.csproj : error MSB4242:    at Microsoft.NET.Sdk.WorkloadManifestReader.SdkDirectoryWorkloadManifestProvider.GlobalJsonReader.GetWorkloadVersionFromGlobalJson(String globalJsonPath)
D:\a\_work\1\s\src\Analyzers\Microsoft.Analyzers.Extra\Microsoft.Analyzers.Extra.csproj : error MSB4242:    at Microsoft.NET.Sdk.WorkloadManifestReader.SdkDirectoryWorkloadManifestProvider..ctor(String sdkRootPath, String sdkVersion, Func`2 getEnvironmentVariable, String userProfileDir, String globalJsonPath, String workloadSetVersion)
D:\a\_work\1\s\src\Analyzers\Microsoft.Analyzers.Extra\Microsoft.Analyzers.Extra.csproj : error MSB4242:    at Microsoft.NET.Sdk.WorkloadManifestReader.SdkDirectoryWorkloadManifestProvider..ctor(String sdkRootPath, String sdkVersion, String userProfileDir, String globalJsonPath)
D:\a\_work\1\s\src\Analyzers\Microsoft.Analyzers.Extra\Microsoft.Analyzers.Extra.csproj : error MSB4242:    at Microsoft.NET.Sdk.WorkloadMSBuildSdkResolver.CachingWorkloadResolver.Resolve(String sdkReferenceName, String dotnetRootPath, String sdkVersion, String userProfileDir, String globalJsonPath)
D:\a\_work\1\s\src\Analyzers\Microsoft.Analyzers.Extra\Microsoft.Analyzers.Extra.csproj : error MSB4242:    at Microsoft.NET.Sdk.WorkloadMSBuildSdkResolver.WorkloadSdkResolver.Resolve(SdkReference sdkReference, SdkResolverContext resolverContext, SdkResultFactory factory)
D:\a\_work\1\s\src\Analyzers\Microsoft.Analyzers.Extra\Microsoft.Analyzers.Extra.csproj : error MSB4242:    at Microsoft.Build.BackEnd.SdkResolution.SdkResolverService.TryResolveSdkUsingSpecifiedResolvers(IList`1 resolvers, Int32 submissionId, SdkReference sdk, LoggingContext loggingContext, ElementLocation sdkReferenceLocation, String solutionPath, String projectPath, Boolean interactive, Boolean isRunningInVisualStudio, SdkResult& sdkResult, IEnumerable`1& errors, IEnumerable`1& warnings)""

Could not load file or assembly 'System.Text.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified.

https://dev.azure.com/dnceng-public/public/_build/results?buildId=452640&view=logs&j=0bc77094-9fcd-5c38-f6e4-27d2ae131589&t=5eb51885-c505-5c55-9d72-61f5b1b42e84

@Tratcher
Copy link
Member

Tratcher commented Oct 27, 2023

FYI this overlaps with #4554 that needed updated SDKs for other fixes. We'll take whichever succeeds first.

@lewing
Copy link
Member

lewing commented Oct 27, 2023

@dotnet/domestic-cat strange error from the 9.0 sdk here

@joeloff
Copy link
Member

joeloff commented Oct 27, 2023

Why is the runtime version in global.json set to 8, but the SDK/arcade is 9.0?

@Tratcher
Copy link
Member

@joeloff we install both 8 and 9 runtimes for testing.

@joperezr
Copy link
Member

Why is the runtime version in global.json set to 8, but the SDK/arcade is 9.0?

We run tests against 8.0, and because we use the SDK for 9.0 we need to have a runtimes section that pulls in 8.0 runtime in order for the tests to run

@Tratcher
Copy link
Member

@dotnet/domestic-cat?

@amcasey
Copy link
Member Author

amcasey commented Nov 6, 2023

I would guess the SDK update is blocked by dotnet/sdk#36659.

@joeloff
Copy link
Member

joeloff commented Nov 6, 2023

I would guess the SDK update is blocked by dotnet/sdk#36659.

There's a number of main PRs blocked on the Arcade issue right now because of an incorrect subscription. Once that is fixed, things should improve. Arcade change is merged and I think the subscriptions were fixed too, but this now has to flow through the validation pipeline, etc. and make its way to SDK

@Tratcher
Copy link
Member

Tratcher commented Nov 7, 2023

@amcasey, we don't even get that far, we're still hitting Could not load file or assembly 'System.Text.Json, Version=9.0.0.0.

@amcasey
Copy link
Member Author

amcasey commented Nov 7, 2023

@Tratcher I can't tell from the thread - is the System.Text.Json error understood or does that still require investigation? It sounds like maybe we're just waiting for code flow?

@Tratcher
Copy link
Member

Tratcher commented Nov 7, 2023

No, the error is not understood and it's not clear how to make progress.

@amcasey
Copy link
Member Author

amcasey commented Nov 7, 2023

I ran this locally (reconstructed as best I could from the pipeline yaml plus the console logs) and it succeeded

powershell -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command ". '.\scripts\Slngen.ps1' -All -NoLaunch'"
[snip]
Loading project references...
Loaded 279 project(s) in 2,226ms
Generating Visual Studio solution "E:\dotnet.extensions\SDK.sln" ...

Edit: but I don't have powershell 7 - I'll try that
Edit 2: nope, powershell 7 works too

@wtgodbe
Copy link
Member

wtgodbe commented Nov 8, 2023

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@Tratcher Tratcher enabled auto-merge (squash) November 8, 2023 21:44
@Tratcher Tratcher merged commit dabc600 into main Nov 8, 2023
6 checks passed
@Tratcher Tratcher deleted the amcasey-patch-1 branch November 8, 2023 22:06
@ghost ghost added this to the 9.0-preview1 milestone Nov 8, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Dec 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants