Skip to content

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

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

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions src/native/corehost/hostmisc/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -450,18 +450,22 @@ pal::string_t get_download_url(const pal::char_t* framework_name, const pal::cha
url.append(_X("missing_runtime=true"));
}

#if defined(TARGET_WINDOWS)
#define TARGET_OS "win"
#elif defined(TARGET_OSX)
#define TARGET_OS "osx"
#elif defined(TARGET_LINUX) || defined(TARGET_ANDROID)
#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.

#endif

const pal::char_t* arch = get_current_arch_name();
url.append(_X("&arch="));
url.append(arch);
url.append(_X("&rid="));
url.append(get_runtime_id());

pal::string_t os = pal::get_current_os_rid_platform();
if (os.empty())
os = pal::get_current_os_fallback_rid();

url.append(_X("&os="));
url.append(os);
url.append(_STRINGIFY(TARGET_OS) _X("-") _STRINGIFY(CURRENT_ARCH_NAME));

return url;
}
Expand Down
Loading