-
Notifications
You must be signed in to change notification settings - Fork 446
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/6.0.1xx] Eliminate runtime portable build #14816
[release/6.0.1xx] Eliminate runtime portable build #14816
Conversation
Of note, as is it currently fails for me with this error:
I found EDIT |
43eb8bb
to
7e0f96e
Compare
Of note that, as is, this works on Alpine's end. Checks seem to fail because of this:
|
On Alpine, the backport is implemented in this MR: https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/39604 Only failing check for us is |
What |
@tmds This did the trick for Alpine Linux on .net 6. I've yet to try this on .net7. |
Just like the 7.0 backport, my view is backporting the patches to the repos is a requirement for getting approval to merge this. |
Absolutely agreed, I'm waiting to get succesful checks before backporting. |
/azp run |
Commenter does not have sufficient privileges for PR 14816 in repo dotnet/installer |
The crossgen errors don't make sense to me @tmds Does this look weird to you, why would crossgen2 have exec error given them matching the arch they're building in? Edit: Right, of course, cause we need crossgen2 for x64. I just saw your up-to-date PR. |
I went ahead and backported everything now that checks are looking good
@MichaelSimons I suppose we should wait till everything is merged before merging this? |
Correct. If folks dis-approve of accepting them in servicing then we should not be accepting them in source-build. Additionally, every patch will cause a merge conflict when the changes flow in. |
b5a415d
to
983878f
Compare
Yup, that did it. Including your fix in this backport |
50278e3
to
1ce8836
Compare
Everything is in. Despite rebase, the runtime commit in |
The builds have started so I think we won't get the Version.Details.xml update until after the release. Due to the holidays we also have a tight schedule around the next release - would it cause you a lot of problems if we delayed this until January? |
Absolutely not, this can wait till January :) Thanks for all the work on y'all's side. |
3e5f360
to
c1d1072
Compare
Rebased and currently failing in |
When this is working and we want to merge it, it will require changes like this in order to fit in the servicing schedule. It's important that we don't break building with N-1 release artifacts. dotnet/source-build#3156 exists to add CI to test this scenario. |
c1d1072
to
1816a53
Compare
For convenience, here is the backported patch: From 2ff083707af48eb9c8ba87f268abccfde2ec2f33 Mon Sep 17 00:00:00 2001
From: Antoine Martin <dev@ayakael.net>
Date: Tue, 10 Jan 2023 07:39:45 -0500
Subject: [PATCH 1/1] Look for portable RID runtime packages by default
---
.../job/source-build-build-tarball.yml | 2 +-
.../tarball/content/repos/runtime.proj | 1 +
.../source-build-reference-packages.proj | 2 +-
...portable-runtime-packages-by-default.patch | 44 +++++++++++++++++++
4 files changed, 47 insertions(+), 2 deletions(-)
create mode 100644 src/SourceBuild/tarball/patches/runtime/0004-Look-for-portable-runtime-packages-by-default.patch
diff --git a/src/SourceBuild/Arcade/eng/common/templates/job/source-build-build-tarball.yml b/src/SourceBuild/Arcade/eng/common/templates/job/source-build-build-tarball.yml
index b7318d262..c3056f6bb 100644
--- a/src/SourceBuild/Arcade/eng/common/templates/job/source-build-build-tarball.yml
+++ b/src/SourceBuild/Arcade/eng/common/templates/job/source-build-build-tarball.yml
@@ -41,7 +41,7 @@ jobs:
- group: AzureDevOps-Artifact-Feeds-Pats
- ${{ if eq(parameters.usePreviousArtifacts, 'true') }}:
- name: additionalBuildArgs
- value: --with-sdk /tarball/.dotnet
+ value: --with-sdk /tarball/.dotnet -- /p:UseNonPortableIlasmPackageOverride=true
- name: tarballDir
${{ if eq(parameters.installerBuildResourceId, '') }}:
value: $(Build.SourcesDirectory)
diff --git a/src/SourceBuild/tarball/content/repos/runtime.proj b/src/SourceBuild/tarball/content/repos/runtime.proj
index 073cd8bc1..1ff14c4e0 100644
--- a/src/SourceBuild/tarball/content/repos/runtime.proj
+++ b/src/SourceBuild/tarball/content/repos/runtime.proj
@@ -23,6 +23,7 @@
<BuildCommandArgs>$(BuildCommandArgs) /p:RuntimeOS=$(RuntimeOS)</BuildCommandArgs>
<BuildCommandArgs>$(BuildCommandArgs) /p:BaseOS=$(BaseOS)</BuildCommandArgs>
<BuildCommandArgs>$(BuildCommandArgs) /p:SourceBuildNonPortable=true</BuildCommandArgs>
+ <BuildCommandArgs Condition="'$(UseNonPortableIlasmPackageOverride)' == 'true'">$(BuildCommandArgs) /p:UseNonPortableIlasmPackageOverride=true</BuildCommandArgs>
<BuildCommand>$(StandardSourceBuildCommand) $(BuildCommandArgs)</BuildCommand>
</PropertyGroup>
diff --git a/src/SourceBuild/tarball/content/repos/source-build-reference-packages.proj b/src/SourceBuild/tarball/content/repos/source-build-reference-packages.proj
index 9545b50e4..baa3dbdd3 100644
--- a/src/SourceBuild/tarball/content/repos/source-build-reference-packages.proj
+++ b/src/SourceBuild/tarball/content/repos/source-build-reference-packages.proj
@@ -3,7 +3,7 @@
<PropertyGroup>
<BuildCommandArgs>$(StandardSourceBuildArgs)</BuildCommandArgs>
- <BuildCommandArgs>$(BuildCommandArgs) /p:MicrosoftNetCoreIlasmPackageRuntimeId=$(NETCoreSdkRuntimeIdentifier)</BuildCommandArgs>
+ <BuildCommandArgs Condition="'$(UseNonPortableIlasmPackageOverride)' == 'true'">$(BuildCommandArgs) /p:MicrosoftNetCoreIlasmPackageRuntimeId=$(NETCoreSdkRuntimeIdentifier)</BuildCommandArgs>
<BuildCommand>$(StandardSourceBuildCommand) $(BuildCommandArgs)</BuildCommand>
<NuGetConfigFile>$(ProjectDirectory)NuGet.config</NuGetConfigFile>
diff --git a/src/SourceBuild/tarball/patches/runtime/0004-Look-for-portable-runtime-packages-by-default.patch b/src/SourceBuild/tarball/patches/runtime/0004-Look-for-portable-runtime-packages-by-default.patch
new file mode 100644
index 000000000..9a6e06ceb
--- /dev/null
+++ b/src/SourceBuild/tarball/patches/runtime/0004-Look-for-portable-runtime-packages-by-default.patch
@@ -0,0 +1,44 @@
+From c487c8658a657c30820ddaf2201fc509fec2d503 Mon Sep 17 00:00:00 2001
+From: Antoine Martin <dev@ayakael.net>
+Date: Tue, 10 Jan 2023 07:37:53 -0500
+Subject: [PATCH 1/1] Look for portable runtime packages by default
+
+Change the default behavior to look for portable RID runtime packages (like
+ilasm). If previous source-built artifacts contain non-portable runtime
+packages, build .NET source-build with the
+` -- /p:UseNonPortableIlasmPackageOverride=true` argument.
+
+This patch should not be in the release of .NET Source-build 6.0.114
+---
+ Directory.Build.targets | 2 +-
+ eng/SourceBuild.props | 1 +
+ 2 files changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/Directory.Build.targets b/Directory.Build.targets
+index 98967298c62..1b4d279bc5b 100644
+--- a/Directory.Build.targets
++++ b/Directory.Build.targets
+@@ -15,7 +15,7 @@
+ When .NET gets built from source, make the SDK aware there are bootstrap packages
+ for Microsoft.NETCore.App.Runtime.<rid> and Microsoft.NETCore.App.Crossgen2.<rid>.
+ -->
+- <ItemGroup Condition="'$(DotNetBuildFromSource)' == 'true'">
++ <ItemGroup Condition="'$(DotNetBuildFromSource)' == 'true' and '$(UseNonPortableIlasmPackageOverride)' == 'true'">
+ <KnownFrameworkReference Update="@(KnownFrameworkReference->WithMetadataValue('Identity', 'Microsoft.NETCore.App')->WithMetadataValue('TargetFramework', '$(NetCoreAppCurrent)'))">
+ <RuntimePackRuntimeIdentifiers>$(PackageRID)</RuntimePackRuntimeIdentifiers>
+ </KnownFrameworkReference>
+diff --git a/eng/SourceBuild.props b/eng/SourceBuild.props
+index fcbe9fa75e2..aa6f769a294 100644
+--- a/eng/SourceBuild.props
++++ b/eng/SourceBuild.props
+@@ -55,6 +55,7 @@
+ <InnerBuildArgs>$(InnerBuildArgs) /p:BuildDebPackage=false</InnerBuildArgs>
+ <InnerBuildArgs>$(InnerBuildArgs) /p:RuntimeOS=$(RuntimeOS)</InnerBuildArgs>
+ <InnerBuildArgs>$(InnerBuildArgs) /p:AdditionalRuntimeIdentifierParent=$(BaseOS)</InnerBuildArgs>
++ <InnerBuildArgs Condition="'$(UseNonPortableIlasmPackageOverride)' == 'true'">$(InnerBuildArgs) /p:UseNonPortableIlasmPackageOverride=true</InnerBuildArgs>
+ </PropertyGroup>
+ </Target>
+
+--
+2.36.3
+
--
2.36.3 Of note, I think I found the source of the error: Despite |
1816a53
to
b7a8602
Compare
Current failure is due to dotnet/source-build#3207 |
2a617fe
to
9446347
Compare
The issue seems fixed - it was due to a mismatch in override variables. The current failure with |
@crummel Is this too late for inclusion for next servicing now that checks pass? |
I'll review this quick and ask for approval if it looks good, I think end of day today is the deadline to get everything merged. |
I don't think we'll be able to get this in for February, I was talking about it with @MichaelSimons and there is additional work necessary after this goes in (the same changes we made in 7.0 after removing the portable build) so I think we'll have to hold off. I'll still review and get approval so we're ready to go as soon as the branches open up again. |
9446347
to
f345d4b
Compare
[Triage] We discussed this in the source-build planning meeting today and the consensus was that this was too risky to merge into 6.0 (LTS). This change had a number of side effects (some we foresaw and other we didn't). There is some uncertainty if the full set of required backports is known. Additionally we are still working through UX impact from this change. @ayakael - I appreciate your work on this and wish this was less risky so that we could accept the backport. |
Backport of #14549
Backport of #14647
Backport of #14938
Fixes dotnet/source-build#3071