dotnet / source-build

A repository to track efforts to produce a source tarball of the .NET Core SDK and all its components
MIT License
266 stars 132 forks source link

SDK content differences - containers #3510

Closed NikolaMilosavljevic closed 4 months ago

NikolaMilosavljevic commented 1 year ago

Microsoft and source-built SDKs contain the following differences related to containers content and packages. There should be no unintentional differences.

All intentional differences should be captured in SDK diff exclusion file: https://github.com/dotnet/installer/blob/main/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/SdkDiffExclusions.txt

Files only present in Microsoft SDK:

./sdk/x.y.z/containerize.deps.json
./sdk/x.y.z/containerize.exe
./sdk/x.y.z/containerize.runtimeconfig.json
./sdk/x.y.z/Containers/containerize/*
./sdk/x.y.z/Containers/tasks/net472/*
./sdk/x.y.z/Containers/tasks/netx.y/Microsoft.VisualStudio.Setup.Configuration.Interop.dll
./sdk/x.y.z/Containers/tasks/netx.y/runtimes/*

Files only present in source-built SDK:

./sdk/x.y.z/Containers/tasks/netx.y/runtimes/*
NikolaMilosavljevic commented 1 year ago

These should be added to the exclusion list as they are related to netfx target.

omajid commented 1 year ago

Related issue: https://github.com/dotnet/sdk-container-builds/issues/440

It sounds like consideration will be made to exclude the containerize exe from linux builds (not just source-build) as it is intended only for VS support.

mthalman commented 1 year ago

I don't understand why containerize.exe and others are still showing up in the Linux tarball. This was supposed to be fixed by https://github.com/dotnet/sdk/pull/32895. I see that change has made its way to the installer repo in the main branch. And yet the tarball still has this. @baronfel, do you know why that is?

baronfel commented 1 year ago

Do y'all have a binlog I can look at? We thought we fixed this entirely by a) removing containerize from the source-build solution filter and b) removing the .Net Framework runtime outputs from our packaging project/redist stuff in dotnet/sdk#32895. I don't actually know how to do the installer/source-build build to get a binlog myself or else I'd just do that.

mthalman commented 1 year ago

This isn't a source-build thing. It's the Microsoft build of the SDK that is including this in the outputted Linux tarball. You can see containerize.exe in this latest build for example: https://dotnetbuilds.azureedge.net/public/Sdk/8.0.100-preview.6.23315.8/dotnet-sdk-8.0.100-preview.6.23315.8-linux-x64.tar.gz

baronfel commented 1 year ago

Oh, that would explain it - we conditioned the entire omit of containerize.exe on things like ExcludeFromSourceBuild and DotNetBuildFromSource == true. It sounds like a more correct approach would be to only include it on Windows builds of the SDK?

NikolaMilosavljevic commented 1 year ago

This is not a source-build issue - there are additional binaries in Microsoft-built SDK, that should not be present in Linux tarballs or installers.

@baronfel is there a different issue that is tracking this work for Microsoft-built SDK? https://github.com/dotnet/sdk/pull/33307 was apparently abandoned.

@MichaelSimons this likely won't make Preview 6. It's an issue tracking work by other teams in other repos.

baronfel commented 1 year ago

Yes that SDK PR got pulled and I've been trying to get Installer to build for me so I can try a similar approach there. I've been running into a bit of a wall even getting build.sh to run without errors though, so I haven't been able to fix the SDK layout generation yet.

MichaelSimons commented 1 year ago

@baronfel - What is the status of addressing the SDK side of this (e.g. https://github.com/dotnet/sdk/pull/33307)? Is there an issue tracking the sdk work?

baronfel commented 1 year ago

it's https://github.com/dotnet/installer/pull/16764 - but I have blocked on it and probably need to call in help from someone who actually knows what they're doing at this point

ellahathaway commented 4 months ago

I noticed that the sdk diffs described in this issue were removed in https://github.com/dotnet/sdk/pull/41131 (meaning that the exclusions are no longer relevant/don't apply to files in either the msft sdk or source-build sdk).

Given this, can this issue be closed?

MichaelSimons commented 4 months ago

I noticed that the sdk diffs described in this issue were removed in dotnet/sdk#41131 (meaning that the exclusions are no longer relevant/don't apply to files in either the msft sdk or source-build sdk).

Given this, can this issue be closed?

Wonder what caused the underlying change? Was it some of the UB work? e.g. perhaps the components got removed from the Microsoft Linux builds.

ellahathaway commented 4 months ago
./sdk/x.y.z/containerize.deps.json
./sdk/x.y.z/containerize.exe
./sdk/x.y.z/containerize.runtimeconfig.json

were removed by https://github.com/dotnet/sdk/pull/37316


./sdk/x.y.z/Containers/containerize/*

was removed by https://github.com/dotnet/sdk/pull/39290


./sdk/x.y.z/Containers/tasks/netx.y/Microsoft.VisualStudio.Setup.Configuration.Interop.dll

was removed by https://github.com/dotnet/sdk/pull/37315


./sdk/x.y.z/Containers/tasks/netx.y/runtimes/*

now contains the same files between SB and MSFT sdk