dotnet / sdk

Core functionality needed to create .NET Core projects, that is shared between Visual Studio and CLI
https://dot.net/core
MIT License
2.72k stars 1.07k forks source link

Azure DevOps and GitHub Actions should warn when an old SDK is used #20250

Open richlander opened 3 years ago

richlander commented 3 years ago

In a recent incident, we found that users were running into troubles solely because they were using old SDKs. I suspect a lot of folks use old SDKs and don't move because they don't know they should.

The following is the log that one of the users shared. I've updated with the text that I think would be helpful to share.

Starting: Use .NET Core SDK 5.0.102
==============================================================================
Task         : Use .NET Core
Description  : Acquires a specific version of the .NET Core SDK from the internet or the local cache and adds it to the PATH. Use this task to change the version of .NET Core used in subsequent tasks. Additionally provides proxy support.
Version      : 2.191.0
Author       : Microsoft Corporation
Help         : https://aka.ms/AA4xgy0
==============================================================================
Tool to install: .NET Core sdk version 5.0.102.
Found version 5.0.102 in channel 5.0 for user specified version spec: 5.0.102
Version 5.0.102 no longer supported. You should move to 5.0.400.
Version 5.0.102 was not found in cache.
Getting URL to download .NET Core sdk version: 5.0.102.

This is the line I added: Version 5.0.102 no longer supported. You should move to 5.0.400.

We could change it in various ways, like prepending Warning: or even adding an aka.ms link the tells you which fixes are in 5.0.400. Here's an alternate idea.

Warning: version 5.0.102 no longer supported. You should move to 5.0.400.
Learn more about .NET 5 SDKs at https://someURL.

I realize that this fix need to go into the .NET task and action for Azure DevOps and GitHub Actions, respectively. We should decide on what we want here and then contact those teams. It is also likely that we are missing the information that would be needed in release.json to enable this flow.

dotnet-issue-labeler[bot] commented 3 years ago

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

joeloff commented 1 year ago

We do have the information available. The SDK version can be checked against all the SDKs of the latest .NET release for the major.minor. For example, if the user is running on 5.0.102, but the latest 5.0 release (5.0.17) only included the 5.0.408 and 5.0.214 SDKs, we can determine that the 1xx featureband is not being updated. It would only work in online scenarios to retrieve the information.