core icon indicating copy to clipboard operation
core copied to clipboard

Releases.Json Alike API Should Surface .NET Linux Feed Support Status

Open nagilson opened this issue 2 years ago • 0 comments

Intro

The https://github.com/dotnet/core/blob/main/release-notes/releases-index.json API is a wonderful thing. However, it doesn't currently allow users to request more detailed information about support statuses of .NET on Linux. At least to our knowledge.

That information is provided here: core/linux-support.md at main · dotnet/core · GitHub but it's not necessarily machine-readable.

Proposal

We should add the ability to determine the fully-specified versions of .NET that a distro and version currently supports via a machine readable API.

That would be some sort of mapping of a distro and distro version pair that points to a list of fully specified .NET SDK and Runtime versions that are supported by their internal feeds. The support status could be marked as being supported by the distro feed includes automatically (supportStatus=distro) or the ones that are only supported by https://packages.microsoft.com/ (supportStatus=microsoft). If a version is not listed, it would be assumed to have (supportStatus=unknown, which is a lesser way of saying 'not officially supported.')

Example: The API would service one data point that pairs:

Distro=Ubuntu
Version=22.04

with the

supportedVersions =
[

{type=sdk: Version=6.0.1xx, supportStatus=distro},

{type=sdk, version=7.0.1xx, supportStatus=distro},

{type=sdk, version=8.0.100-preview-5, supportStatus=microsoft} // this is an example and may not be currently true
]

with a support status of internal (as opposed to microsoft). xx would be replaced with the newest supported version per the actual support policy : (no x's, just may change at the time of this spec.)

The exact json format of this is not super relevant. (Though it is important, it involves multiple shareholders and is more of an implementation detail.) Probably we don't expand the releases.json API because that'd be a breaking change, and instead write a new api/sub-api layer.

Motivation

We have this information in the docs https://learn.microsoft.com/en-us/dotnet/core/install/linux-ubuntu but it's not in a machine readable format. This could also be leveraged to update the docs automatically.

We rely in some of our codebases to hard-code and manually update the support status for each distro and version of said distro. This is a terrible model for software. The need to create such an API surface has gained importance recently, please reach out to me to discuss if any questions arise.

cc @richlander @rbhanda @leecow @baronfel @marcpopMSFT @JL03-Yue follow-up: cc @joeloff @jamshedd

nagilson avatar May 23 '23 20:05 nagilson