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

Convert ref and runtime packs to use the SharedFramework SDK and Arcade's installer tooling #58612

Merged
merged 61 commits into from
Dec 6, 2024

Conversation

jkoritzinsky
Copy link
Member

@jkoritzinsky jkoritzinsky commented Oct 24, 2024

Convert ref and runtime packs to use the SharedFramework SDK and Arcade's installer tooling (for Linux installers)

Replace the custom infrastructure in ASP.NET Core for building shared frameworks, .debs, and .rpms with the Arcade infrastructure

Description

Replace the custom infrastructure in this repo with the Arcade infrastructure. This provides a number of benefits:

  • Crossgen2/R2R support is hooked up correctly through the SDK support
  • Construction of targeting and runtime packs uses standard tooling, so less for aspnetcore to maintain and free updates to "best practices" from Arcade
  • Support for building deb and rpm packages on any Linux distro

Fixes #48013
Fixes #49486
Fixes #58073
Contributes to dotnet/source-build#3986

Depends on dotnet/arcade#15200
Depends on an SDK with dotnet/sdk#44436 (#58862)
Depends on dotnet/runtime#109169
Replaces #58600
Depends on dotnet/arcade#15208
Depends on dotnet/arcade#15209
Depends on #58934

@jkoritzinsky jkoritzinsky added the blocked The work on this issue is blocked due to some dependency label Oct 24, 2024
@dotnet-issue-labeler dotnet-issue-labeler bot added the area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework label Oct 24, 2024
@wtgodbe
Copy link
Member

wtgodbe commented Oct 28, 2024

Whoa, awesome! Feel free to ping me on Teams if/when you want me to take a look

@@ -0,0 +1,66 @@
<Project Sdk="Microsoft.Build.Traversal">
<PropertyGroup>
Copy link
Member

Choose a reason for hiding this comment

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

What's the purpose of this proj?

Copy link
Member Author

Choose a reason for hiding this comment

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

This project builds an archive containing the .NET runtime and the ASP.NET Core runtime with the Composite ReadyToRun image (which is used in some of our docker images).

@wtgodbe
Copy link
Member

wtgodbe commented Nov 12, 2024

Can you run an internal build of this branch so we can inspect the produced SharedFx/Targeting packs packages/installers?

@jkoritzinsky
Copy link
Member Author

@ViktorHofer
Copy link
Member

According to the official build, the targeting pack project is built and published from multiple legs:

##[error].packages\microsoft.dotnet.arcade.sdk\10.0.0-beta.24560.1\tools\SdkTasks\PublishBuildAssets.proj(42,5): error : Repeated Package entry: 'Microsoft.AspNetCore.App.Ref' - '10.0.0-alpha.2.24562.3' 
D:\a\_work\1\s\.packages\microsoft.dotnet.arcade.sdk\10.0.0-beta.24560.1\tools\SdkTasks\PublishBuildAssets.proj(42,5): error : InvalidOperationException: Duplicate package entries are not allowed for publishing to BAR, as this can cause race conditions and unexpected behavior
D:\a\_work\1\s\.packages\microsoft.dotnet.arcade.sdk\10.0.0-beta.24560.1\tools\SdkTasks\PublishBuildAssets.proj(42,5): error :    at Microsoft.DotNet.Maestro.Tasks.PushMetadataToBuildAssetRegistry.MergeManifests(List`1 parsedManifests) in /_/src/Maestro/Microsoft.DotNet.Maestro.Tasks/src/PushMetadataToBuildAssetRegistry.cs:line 557
D:\a\_work\1\s\.packages\microsoft.dotnet.arcade.sdk\10.0.0-beta.24560.1\tools\SdkTasks\PublishBuildAssets.proj(42,5): error :    at Microsoft.DotNet.Maestro.Tasks.PushMetadataToBuildAssetRegistry.PushMetadataAsync(CancellationToken cancellationToken) in /_/src/Maestro/Microsoft.DotNet.Maestro.Tasks/src/PushMetadataToBuildAssetRegistry.cs:line 105
D:\a\_work\1\s\.packages\microsoft.dotnet.arcade.sdk\10.0.0-beta.24560.1\tools\SdkTasks\PublishBuildAssets.proj(42,5): error : 

@jkoritzinsky
Copy link
Member Author

Failures in the Linux x64 leg will be fixed by #58934

@dotnet-policy-service dotnet-policy-service bot added the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label Nov 21, 2024
@jkoritzinsky jkoritzinsky removed blocked The work on this issue is blocked due to some dependency pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun labels Dec 3, 2024
@jkoritzinsky jkoritzinsky requested a review from wtgodbe December 3, 2024 21:31
Copy link
Member

@wtgodbe wtgodbe left a comment

Choose a reason for hiding this comment

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

LGTM, the only other thing would be to confirm the manifest from an internal build of this branch matches the manifest from an internal build of main

@jkoritzinsky
Copy link
Member Author

I ran an official build and it looks fine. However, the manually-triggered official build does in-build signing instead of post-build, so comparing apples-to-apples is difficult. I think this is okay for merge, but let me know if you think more validation is necessary.

@jkoritzinsky
Copy link
Member Author

Fixed an issue with in-build signing, new official build at https://dev.azure.com/dnceng/internal/_build/results?buildId=2595419&view=results

@jkoritzinsky
Copy link
Member Author

@jkoritzinsky
Copy link
Member Author

@jkoritzinsky
Copy link
Member Author

Okay there's an ongoing infra issue that broke the official build. If this build produces the right installers for Linux arm64, we're good to merge (as that's the last thing I needed to validate).

@jkoritzinsky
Copy link
Member Author

ARM64 rpms are being produced, setting auto-merge.

@jkoritzinsky jkoritzinsky enabled auto-merge (squash) December 5, 2024 22:54
@jkoritzinsky jkoritzinsky merged commit 7949421 into dotnet:main Dec 6, 2024
27 checks passed
@dotnet-policy-service dotnet-policy-service bot added this to the 10.0-preview1 milestone Dec 6, 2024
@jkoritzinsky jkoritzinsky deleted the sfx-aspnetcore branch December 6, 2024 02:04
<!-- Precompile the shared framework with ReadyToRun. ReadyToRun is not currently supported on s390x or ppc64le or armv6 or loongarch64. -->
<PublishReadyToRun Condition=" '$(TargetArchitecture)' == 's390x' OR '$(TargetArchitecture)' == 'armv6' OR '$(TargetArchitecture)' == 'ppc64le' OR '$(TargetArchitecture)' == 'loongarch64' ">false</PublishReadyToRun>
<!-- VMR doesn't produce valid crossgen for the host/build machine https://github.com/dotnet/source-build/issues/3793 -->
<PublishReadyToRun Condition=" '$(DotNetBuild)' == 'true' AND '$(Crossbuild)' == 'true' ">false</PublishReadyToRun>
Copy link
Member

Choose a reason for hiding this comment

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

I was surprised to see this. Are you sure that this is still an issue?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes I believe that is still the case (to the point that I think I messed up this condition and we're seeing failures related to it in the Aspnet->SDK update).

I have some thoughts about it and I'll open an issue today to track fixing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework
Projects
None yet
4 participants