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

Fix aka.ms URL in host's missing framework error #110513

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

am11
Copy link
Member

@am11 am11 commented Dec 9, 2024

When running app targeting a missing framework, text after To install missing framework, download: currently looks like:

  • fedora non-portable build: https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=9.0.0&arch=arm64&rid=fedora.41-arm64&os=fedora.41
    • redirects to https://dotnet.microsoft.com/en-us/download/dotnet/9.0/runtime?cid=getdotnetcore&arch=arm64 because rid=fedora... is unknown on akams side.
  • alpine portable build: https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=9.0.0&arch=arm64&rid=linux-musl-arm64&os=alpine.3.20
    • redirects to https://dotnet.microsoft.com/en-us/download/dotnet/9.0/runtime?cid=getdotnetcore&os=linux&arch=arm64 because rid=linux-musl.. starts with linux.
  • alpine non-portable build https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=9.0.0&arch=arm64&rid=alpine.3.21-arm64&os=alpine
    • redirects to https://dotnet.microsoft.com/en-us/download/dotnet/9.0/runtime?cid=getdotnetcore&arch=arm64 same as fedora non-portable (rid=alpine.. doesn't match anything on akams side)
  • osx https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=9.0.0&arch=arm64&rid=osx-arm64&os=osx.15
    • redirects to https://dotnet.microsoft.com/en-us/download/dotnet/9.0/runtime?cid=getdotnetcore&os=macos&arch=arm64 because rid=osx.. starts with osx and maps to macos in akams system.

This PR fixes these disparities by always using non-portable RID in rid= and removes os= parameter because it is simply ignored.

@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Dec 9, 2024
Copy link
Contributor

Tagging subscribers to this area: @vitek-karas, @agocke, @VSadov
See info in area-owners.md if you want to be subscribed.

@jkotas
Copy link
Member

jkotas commented Dec 9, 2024

removes os= parameter because it is simply ignored.

We should check that this parameter is not used for collecting usage statistics in the backend.

#define TARGET_OS "linux"
#else
// others are community supported platforms
#define TARGET_OS "community"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is faults everything that is not win/osx/linux into a single bucket. We will get worse usage statistics.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK, the real telemetry is collected by the SDK. If the backend is collecting statistics when the user is navigating to URL from the missing framework error message, I can list the community platforms here as well.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@richlander and @mairaw would know how all the query parameters get used in the backend.

Copy link
Contributor

@mairaw mairaw Dec 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is website telemetry collected by the aka.ms links too. We can probably fix the back-end service to resolve correctly if I know the missing cases and where they should go.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but I don't use specific values for telemetry just the source so you can make changes to the parameters if needed. but if we're missing some redirects, I'd love if the customer can get straight to the right download. Is this what drives the aka to show up in the first place?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if I know the missing cases and where they should go

We can list a few major ones, but the definition of non-portable RID is that anyone can put anything they want in there.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are portable system names independent of PortableBuild. In this context, the missing ones are desktop OS names: FreeBSD, NetBSD, illumos and Solaris.

Currently, the page redirects to cid=getdotnetcore&arch=.. without rid= or os=parts which makes sense because there is no Microsoft build for those. That's why I picked up community. If it helps the telemetry, I can replace "community" with base system names.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the only value I use for telemetry is the cid=getdotnetcore. The rest doesn't matter from an analytics perspective. It matters to the redirection service. We can add new cases if needed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should follow-up on that.

@richlander
Copy link
Member

I found the website code that is wrong. I'm pretty sure I wrote it. It can definitely be changed.

I could do a couple things:

  • special case linux-musl
  • Add known aliases for both linux and linux-musl, such as fedora and alpine, respectively

Sound good?

I think the best long-term thing to do would be to add another apphost parameter that is the non-portable RID.

@agocke
Copy link
Member

agocke commented Dec 10, 2024

Add known aliases for both linux and linux-musl, such as fedora and alpine, respectively

I'm worried about getting back on this treadmill, after we just got off.

@richlander
Copy link
Member

That's why I suggested a long-term solution.

@am11
Copy link
Member Author

am11 commented Dec 10, 2024

linux-bionic and linux-musl, as well as linuxfoo, all redirect to linux. The standing logic seems to be if StartsWith("linux") return "linux" (I think this is fine)

Also, the logic of resolving non-portable versioned RID in C++ is not 100% in sync. From the samples above: rid=alpine.3.21-arm64&os=alpine <- the box I was testing on had VERSION_ID=3.21.0_alpha20240923 in /etc/os-release, so the C++ implementation (os= arg) failed to parse 3.21. Not sure if it is worth chasing these non-portable cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Host community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants