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

[release/7.0-staging] Microsoft.NETCore.Platforms: support adding rids with '-' in the base part. #86282

Merged

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented May 15, 2023

Backport of #84413 to release/7.0-staging

/cc @carlossanlop @tmds

Per @tmds

Currently when trying to add a rid like 'linux-musl-x64' the rid is not understood to be base = 'linux-musl', arch = 'x64'.
Instead the parser considers a potential optional qualifier. This causes the rid to be parsed as base = 'linux', arch = 'musl', and qualifier = 'x64'.
We know the rids being added won't have a qualifier. If we take this into account while parsing, we can parse the rid correctly.

Customer impact

#77508 was merged, but its installer counterpart (dotnet/installer#14816) was NAKed due to safety concerns. This revealed a limit with Microsoft.NETCore.Platforms parsing of RID. Thus, build of source-build on linux-musl platforms is currently broken. A few approches on installer side can be implemented as workarounds, but ideally the fix should be on runtime side.

This also unblocks dotnet/installer#13074.

Testing

  • unit tests in ci
  • manual build of runtime on Alpine Linux when OutputRid=linux-musl-x64 and Source

Risk

Low, there were limited changes in that code between release/6.0 and main.

cc @tmds @ayakael

tmds and others added 2 commits May 15, 2023 21:48
… part.

Currently when trying to add a rid like 'linux-musl-x64'
the rid is not understood to be base = 'linux-musl', arch = 'x64'.

Instead the parser considers a potential optional qualifier.
This causes the rid to be parsed as base = 'linux', arch = 'musl',
and qualifier = 'x64'.

We know the rids being added won't have a qualifier. If we take
this into account while parsing, we can parse the rid correctly.
…ection.cs

Co-authored-by: Eric StJohn <ericstj@microsoft.com>
@ghost
Copy link

ghost commented May 15, 2023

Tagging subscribers to this area: @dotnet/area-infrastructure-libraries
See info in area-owners.md if you want to be subscribed.

Issue Details

Backport of #84413 to release/7.0-staging

/cc @carlossanlop @tmds

Customer Impact

Testing

Risk

IMPORTANT: If this backport is for a servicing release, please verify that:

  • The PR target branch is release/X.0-staging, not release/X.0.

  • If the change touches code that ships in a NuGet package, you have added the necessary package authoring and gotten it explicitly reviewed.

Author: github-actions[bot]
Assignees: -
Labels:

area-Infrastructure-libraries

Milestone: -

@carlossanlop carlossanlop added the Servicing-consider Issue for next servicing release review label May 15, 2023
@carlossanlop carlossanlop self-assigned this May 15, 2023
@carlossanlop
Copy link
Member

This change requires Microsoft.NETCore.Platforms.csproj OOB package authoring changes but they aren't needed in this PR if we merge this other one for the June release, which already contains such changes: #84984

Copy link
Member

@wfurt wfurt left a comment

Choose a reason for hiding this comment

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

LGTM

@carlossanlop
Copy link
Member

I'm treating this as tell-mode since the affected cs file is a build task, so not customer facing. I notified Tactics anyway just so they were informed.

@carlossanlop carlossanlop added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels May 16, 2023
@carlossanlop carlossanlop merged commit edef3b9 into release/7.0-staging May 16, 2023
@carlossanlop carlossanlop deleted the backport/pr-84413-to-release/7.0-staging branch May 16, 2023 01:26
@ghost ghost locked as resolved and limited conversation to collaborators Jun 15, 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.

3 participants