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

Move BuildRID lists to common props #55279

Closed
wants to merge 7 commits into from

Conversation

am11
Copy link
Member

@am11 am11 commented Jul 7, 2021

Platform matrix testing is in progress, but locally made sure that the artifacts/package directory tree on macOS is identical before and after this change.

This PR is simplifying the BuildRID part. It removes OfficialBuildRID and UnofficialBuildRID (not to be confused with very similar-looking OfficialBuildID which is a contract between runtime and arcade for versioning). Also fixes tizen/armel crossgen2 issue at the same time.

cc @ViktorHofer

@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label.

@ViktorHofer
Copy link
Member

@dotnet/runtime-infrastructure and @ericstj as I'm out the next two weeks, can you please help @am11 by reviewing and validating the change? We need official build validation for this change as well. Thanks

@am11 am11 force-pushed the feature/consolidations branch 2 times, most recently from d093d23 to 56ee8e3 Compare July 8, 2021 15:08
@am11
Copy link
Member Author

am11 commented Jul 8, 2021

Remaining failures are unrelated to the change (NuGet hangups, EventSource test failures). Marking it as ready for review.

@am11 am11 marked this pull request as ready for review July 8, 2021 18:21
Copy link
Member

@safern safern left a comment

Choose a reason for hiding this comment

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

Looks reasonable to me, but I would like either @hoyosjs or @jkoritzinsky to take another look as well.

Also, do we need to test this in an official build?

@hoyosjs
Copy link
Member

hoyosjs commented Jul 8, 2021

I'll review and kick off an internal build. We should also test this for sourcebuild.

@am11
Copy link
Member Author

am11 commented Jul 8, 2021

Thanks. There was a redundant exclusion I have just deleted (it won't change the outcome since RestoreBuildRID is used in a place where ExcludeFromBuildRID is not set).

@hoyosjs hoyosjs self-requested a review July 8, 2021 20:25
@am11
Copy link
Member Author

am11 commented Jul 9, 2021

@hoyosjs, was the internal build green?

We should also test this for sourcebuild.

I can see Build Linux x64 release SourceBuild is green in runtime-dev-innerloop.

@hoyosjs
Copy link
Member

hoyosjs commented Jul 10, 2021

I did a manual check with non-portable rids for sourcebuild and all looked ok. I also code reviewed and it looks fine. I kicked off one and will report when I see it finish.

@hoyosjs hoyosjs added the NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons) label Jul 10, 2021
@hoyosjs
Copy link
Member

hoyosjs commented Jul 10, 2021

Looks like there are some repeated assets.

D:\a\1\s\.packages\microsoft.dotnet.arcade.sdk\6.0.0-beta.21330.2\tools\SdkTasks\PublishBuildAssets.proj(43,5): error : Repeated Asset entry: 'runtime.linux-arm.runtime.native.System.IO.Ports' - '6.0.0-preview.7.21360.2' 
##[error].packages\microsoft.dotnet.arcade.sdk\6.0.0-beta.21330.2\tools\SdkTasks\PublishBuildAssets.proj(43,5): error : Repeated Asset entry: 'runtime.linux-arm.runtime.native.System.IO.Ports' - '6.0.0-preview.7.21360.2' 
D:\a\1\s\.packages\microsoft.dotnet.arcade.sdk\6.0.0-beta.21330.2\tools\SdkTasks\PublishBuildAssets.proj(43,5): error : Repeated Asset entry: 'runtime.linux-arm64.runtime.native.System.IO.Ports' - '6.0.0-preview.7.21360.2' 
##[error].packages\microsoft.dotnet.arcade.sdk\6.0.0-beta.21330.2\tools\SdkTasks\PublishBuildAssets.proj(43,5): error : Repeated Asset entry: 'runtime.linux-arm64.runtime.native.System.IO.Ports' - '6.0.0-preview.7.21360.2' 
D:\a\1\s\.packages\microsoft.dotnet.arcade.sdk\6.0.0-beta.21330.2\tools\SdkTasks\PublishBuildAssets.proj(43,5): error : Repeated Asset entry: 'runtime.linux-musl-x64.runtime.native.System.IO.Ports' - '6.0.0-preview.7.21360.2' 
##[error].packages\microsoft.dotnet.arcade.sdk\6.0.0-beta.21330.2\tools\SdkTasks\PublishBuildAssets.proj(43,5): error : Repeated Asset entry: 'runtime.linux-musl-x64.runtime.native.System.IO.Ports' - '6.0.0-preview.7.21360.2' 
D:\a\1\s\.packages\microsoft.dotnet.arcade.sdk\6.0.0-beta.21330.2\tools\SdkTasks\PublishBuildAssets.proj(43,5): error : Repeated Asset entry: 'runtime.linux-x64.runtime.native.System.IO.Ports' - '6.0.0-preview.7.21360.2' 
##[error].packages\microsoft.dotnet.arcade.sdk\6.0.0-beta.21330.2\tools\SdkTasks\PublishBuildAssets.proj(43,5): error : Repeated Asset entry: 'runtime.linux-x64.runtime.native.System.IO.Ports' - '6.0.0-preview.7.21360.2' 
D:\a\1\s\.packages\microsoft.dotnet.arcade.sdk\6.0.0-beta.21330.2\tools\SdkTasks\PublishBuildAssets.proj(43,5): error : Repeated Asset entry: 'runtime.osx-x64.runtime.native.System.IO.Ports' - '6.0.0-preview.7.21360.2' 
##[error].packages\microsoft.dotnet.arcade.sdk\6.0.0-beta.21330.2\tools\SdkTasks\PublishBuildAssets.proj(43,5): error : Repeated Asset entry: 'runtime.osx-x64.runtime.native.System.IO.Ports' - '6.0.0-preview.7.21360.2' 
D:\a\1\s\.packages\microsoft.dotnet.arcade.sdk\6.0.0-beta.21330.2\tools\SdkTasks\PublishBuildAssets.proj(43,5): error : Repeated Asset entry: 'assets/symbols/runtime.linux-arm.runtime.native.System.IO.Ports.6.0.0-preview.7.21360.2.symbols.nupkg' - '6.0.0-preview.7.21360.2' 
##[error].packages\microsoft.dotnet.arcade.sdk\6.0.0-beta.21330.2\tools\SdkTasks\PublishBuildAssets.proj(43,5): error : Repeated Asset entry: 'assets/symbols/runtime.linux-arm.runtime.native.System.IO.Ports.6.0.0-preview.7.21360.2.symbols.nupkg' - '6.0.0-preview.7.21360.2' 
D:\a\1\s\.packages\microsoft.dotnet.arcade.sdk\6.0.0-beta.21330.2\tools\SdkTasks\PublishBuildAssets.proj(43,5): error : Repeated Asset entry: 'assets/symbols/runtime.linux-arm64.runtime.native.System.IO.Ports.6.0.0-preview.7.21360.2.symbols.nupkg' - '6.0.0-preview.7.21360.2' 
##[error].packages\microsoft.dotnet.arcade.sdk\6.0.0-beta.21330.2\tools\SdkTasks\PublishBuildAssets.proj(43,5): error : Repeated Asset entry: 'assets/symbols/runtime.linux-arm64.runtime.native.System.IO.Ports.6.0.0-preview.7.21360.2.symbols.nupkg' - '6.0.0-preview.7.21360.2' 
D:\a\1\s\.packages\microsoft.dotnet.arcade.sdk\6.0.0-beta.21330.2\tools\SdkTasks\PublishBuildAssets.proj(43,5): error : Repeated Asset entry: 'assets/symbols/runtime.linux-musl-x64.runtime.native.System.IO.Ports.6.0.0-preview.7.21360.2.symbols.nupkg' - '6.0.0-preview.7.21360.2' 
##[error].packages\microsoft.dotnet.arcade.sdk\6.0.0-beta.21330.2\tools\SdkTasks\PublishBuildAssets.proj(43,5): error : Repeated Asset entry: 'assets/symbols/runtime.linux-musl-x64.runtime.native.System.IO.Ports.6.0.0-preview.7.21360.2.symbols.nupkg' - '6.0.0-preview.7.21360.2' 
D:\a\1\s\.packages\microsoft.dotnet.arcade.sdk\6.0.0-beta.21330.2\tools\SdkTasks\PublishBuildAssets.proj(43,5): error : Repeated Asset entry: 'assets/symbols/runtime.linux-x64.runtime.native.System.IO.Ports.6.0.0-preview.7.21360.2.symbols.nupkg' - '6.0.0-preview.7.21360.2' 
##[error].packages\microsoft.dotnet.arcade.sdk\6.0.0-beta.21330.2\tools\SdkTasks\PublishBuildAssets.proj(43,5): error : Repeated Asset entry: 'assets/symbols/runtime.linux-x64.runtime.native.System.IO.Ports.6.0.0-preview.7.21360.2.symbols.nupkg' - '6.0.0-preview.7.21360.2' 
D:\a\1\s\.packages\microsoft.dotnet.arcade.sdk\6.0.0-beta.21330.2\tools\SdkTasks\PublishBuildAssets.proj(43,5): error : Repeated Asset entry: 'assets/symbols/runtime.osx-x64.runtime.native.System.IO.Ports.6.0.0-preview.7.21360.2.symbols.nupkg' - '6.0.0-preview.7.21360.2' 
##[error].packages\microsoft.dotnet.arcade.sdk\6.0.0-beta.21330.2\tools\SdkTasks\PublishBuildAssets.proj(43,5): error : Repeated Asset entry: 'assets/symbols/runtime.osx-x64.runtime.native.System.IO.Ports.6.0.0-preview.7.21360.2.symbols.nupkg' - '6.0.0-preview.7.21360.2'

@am11
Copy link
Member Author

am11 commented Jul 10, 2021

Can we run that target locally or is it something only run on official build? If there is no secure argument involved please paste the command, I can try to investigate it locally.

@hoyosjs
Copy link
Member

hoyosjs commented Jul 10, 2021

It means that two different legs produced it. Currently trying to see which two legs produced the same package.

@hoyosjs
Copy link
Member

hoyosjs commented Jul 10, 2021

Looks like Libraries Build Linux x64 Release is producing it and at the same time Build Linux x64 release AllSubsets_Mono leg and Build Linux x64 release AllSubsets_Mono_LLVMJIT are also producing it and that caused the error - and similarly for all other repeated packages.

The command line for the libraries

  • ./build.sh -subset libs -rc release -configuration Release -ci -arch x64 -framework net6.0 /p:OfficialBuildId=20210710.2

And for the allsubsets one:

  • ./build.sh -ci -arch x64 -os Linux -s mono+libs+host+packs+mono.mscordbi -c Release /p:OfficialBuildId=20210710.2 /p:CrossBuild=false /p:MonoLLVMUseCxx11Abi=false

Another difference, we are now suddenly producing these that we weren't:

    <Package Id="runtime.osx-arm64.Microsoft.NETCore.ILAsm" Version="6.0.0-preview.7.21360.2" />
    <Package Id="runtime.osx-arm64.Microsoft.NETCore.ILDAsm" Version="6.0.0-preview.7.21360.2" />
    <Package Id="runtime.osx-arm64.Microsoft.NETCore.TestHost" Version="6.0.0-preview.7.21360.2" />

@@ -4,7 +4,7 @@
<SkipPackageFileCheck>true</SkipPackageFileCheck>
<SkipValidatePackage>true</SkipValidatePackage>
</PropertyGroup>
<ItemGroup Condition="'$(PackageTargetRuntime)' == 'linux-arm' or '$(PackageTargetRuntime)' == 'linux-arm64' or '$(PackageTargetRuntime)' == 'linux-x64' or '$(PackageTargetRuntime)' == 'osx-x64' or '$(PackageTargetRuntime)' == 'freebsd-x64'">
<ItemGroup Condition="'$(PackageTargetRuntime)' != '' and !$(PackageTargetRuntime.ToLowerInvariant.StartsWith('win'))">
Copy link
Member

Choose a reason for hiding this comment

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

This somehow didn't consider ARM64 before. It also now considers linux-musl variants when it didn't before.

Copy link
Member Author

@am11 am11 Jul 10, 2021

Choose a reason for hiding this comment

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

ARM64 is present before and after the change. linux-musl is not (that restriction does not seem intentional either). I think this is not causing the validation error. I think the issue is that we have three ways of including pkgproj, one from src/libraries/libraries-packages, one from .proj file and then again from Directory.Build.props. We should try to simplify it, so transition to SDK/dotnet-pack in future become easier.

In this PR, I have changed complex whitelisting to "require a flat list and exclude" mechanism.

Copy link
Member

Choose a reason for hiding this comment

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

osx-arm64 I mean

Copy link
Member

Choose a reason for hiding this comment

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

I am not saying I am against it. I am just saying we might start seeing assets we didn't see before. I'll all for a single list of support and then projects that need can opt out.

</OfficialBuildRID>
</ItemGroup>
<ItemGroup Condition="$(SupportedPackageOSGroups.Contains(';OSX;'))">
<OfficialBuildRID Include="osx-x64" />
Copy link
Member

Choose a reason for hiding this comment

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

Probably this is why we didn't have arm64 ILAsm

@hoyosjs
Copy link
Member

hoyosjs commented Jul 12, 2021

I still see some manifest differences. I'll try later.

@hoyosjs
Copy link
Member

hoyosjs commented Jul 13, 2021

I checked this again and the following packages are missing now compared to tip of main:

<Package Id="runtime.linux-arm.runtime.native.System.IO.Ports" Version="6.0.0-preview.7.21362.14" />
<Package Id="runtime.linux-arm64.runtime.native.System.IO.Ports" Version="6.0.0-preview.7.21362.14" />
<Package Id="runtime.linux-x64.runtime.native.System.IO.Ports" Version="6.0.0-preview.7.21362.14" />
<Package Id="runtime.osx-arm64.Microsoft.NETCore.ILAsm" Version="6.0.0-preview.7.21362.14" />
<Package Id="runtime.osx-arm64.Microsoft.NETCore.ILDAsm" Version="6.0.0-preview.7.21362.14" />
<Package Id="runtime.osx-arm64.Microsoft.NETCore.TestHost" Version="6.0.0-preview.7.21362.14" />
<Package Id="runtime.osx-x64.runtime.native.System.IO.Ports" Version="6.0.0-preview.7.21362.14" />

but they are referenced by the metapackage runtime.native.System.IO.Ports, and a bunch of unofficial rids that we don't produce packages for:

image

Meanwhile this is the dep list for the one in main:

image

This would probably break things. Also @ericstj not sure who owns ports, but shouldn't the package also exist in main for ARM64 osx? Although to be fair, the musl variants seem not to have one so it might be OK?

@am11 am11 closed this Jul 13, 2021
@am11
Copy link
Member Author

am11 commented Jul 13, 2021

Lets start it at some other point, since I don't have time to further work on it. Changing one flag breaks some superfluous check somewhere which we can't locally reproduce, seems like we first need to fix CI to cover all sanity checks before doing refactoring.

@am11 am11 deleted the feature/consolidations branch July 13, 2021 09:09
@hoyosjs
Copy link
Member

hoyosjs commented Jul 13, 2021

Yeah, this is pretty sad. But there's some place where things are more coupled than we realize. In this case the official build even was green and so was CI - so we are even missing some deeper validation.

@ericstj
Copy link
Member

ericstj commented Jul 13, 2021

Also @ericstj Eric St. John FTE not sure who owns ports, but shouldn't the package also exist in main for ARM64 osx? Although to be fair, the musl variants seem not to have one so it might be OK?

@krwq @wfurt and originally worked on it, I think this falls under @dotnet/area-system-io.

@wfurt
Copy link
Member

wfurt commented Jul 13, 2021

as far as I remember we did the extra IO.Ports packages so one can consume them on older versions. While consistency is nice I'm not sure there is real demand since the Serial port is not available for quite a while and it should work when used with current runtime. In some cases like ARM macOS the older versions did not even function on that platform.

@ericstj
Copy link
Member

ericstj commented Jul 13, 2021

as far as I remember we did the extra IO.Ports packages so one can consume them on older versions

It seems to be used on all frameworks, unix runtimes today, which would include OSX ARM64:

<Compile Include="$(CommonPath)Interop\Unix\System.IO.Ports.Native\Interop.Termios.cs"
Link="Common\Interop\Unix\System.IO.Ports.Native\Interop.Termios.cs"/>
<Compile Include="$(CommonPath)Interop\Unix\System.IO.Ports.Native\Interop.Serial.cs"
Link="Common\Interop\Unix\System.IO.Ports.Native\Interop.Serial.cs"/>

It'd be great if that could be removed on latest frameworks.

@clamp03
Copy link
Member

clamp03 commented Jul 16, 2021

@am11 Tizen/armel build is still broken. If you don't mind, could I make a new PR to fix Tizen/armel crossgen2 issue based on this PR?

@am11
Copy link
Member Author

am11 commented Jul 16, 2021

@clamp03, I am very sorry. I totally forgot about Tizen fix. 🤦
Opened a PR with just those parts: #55789.

@ghost ghost locked as resolved and limited conversation to collaborators Aug 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants