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

Add Installer project build skip functionality for servicing builds #2291

Merged
merged 1 commit into from
Jan 29, 2020

Conversation

dagood
Copy link
Member

@dagood dagood commented Jan 28, 2020

This ports servicing build infrastructure from Core-Setup 3.1 (https://github.com/dotnet/core-setup/issues/8735) that disables certain Installer projects as needed during product servicing.

I'm including a fix to make it work as expected for prerelease servicing releases, so details from #639 (comment) describe this particular implementation:

I think the right fix is [to have the settings apply unconditionally]

-  <ItemGroup Condition="'$(StabilizePackageVersion)' == 'true'">
+  <ItemGroup>
     <ProjectServicingConfiguration Include="Microsoft.NETCore.App.Ref" PatchVersion="0" />
     <ProjectServicingConfiguration Include="NETStandard.Library.Ref" PatchVersion="0" />
   </ItemGroup>

With this:

  • During master builds, patch version for Microsoft.NETCore.App is always 0, so it gets built.
  • When release/5.0 forks, patch stays 0, so it keeps getting built.
    • After releasing 5.0.0, version advances to 5.0.1, and optionally becomes 5.0.1-servicing-12345. This disables the targeting pack build due to the patch version not matching, as desired.
    • Enabling it is same as always, set PatchVersion="1" to make it match

This PR isn't intended to change the current build outputs at all.

I tested by increasing the PatchVersion prop and seeing the expected artifacts stop building. This was tested more back with dotnet/arcade#4318.

/cc @mmitche @nguerrera @dotnet/runtime-infrastructure

@dagood
Copy link
Member Author

dagood commented Jan 29, 2020

The "runtime (Libraries Test Run release mono Linux x64 Debug)" failures are unrelated and being worked on, merging through. #2316

@@ -3,14 +3,14 @@
<IsFrameworkPackage>true</IsFrameworkPackage>
<ShortFrameworkName>netstandard</ShortFrameworkName>
<ProductBrandPrefix>Microsoft .NET Standard</ProductBrandPrefix>

<ProductBandVersion>2.1</ProductBandVersion>
<ProductionVersion>$(ProductBandVersion).0</ProductionVersion>

Choose a reason for hiding this comment

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

Is this property not needed anymore? Was '0' used to specify patch version?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's needed, but it's calculated in the following target, so this is a minor refactor to improve clarity:

<!--
Arcade SDK versioning is defined by static properties in a targets file: work around this by
moving properties based on versioning into a target.
-->
<Target Name="GetProductVersions">
<PropertyGroup>
<IncludePreReleaseLabelInPackageVersion Condition="'$(DotNetFinalVersionKind)' != 'release'">true</IncludePreReleaseLabelInPackageVersion>
<IncludePreReleaseLabelInPackageVersion Condition="'$(SuppressFinalPackageVersion)' == 'true'">true</IncludePreReleaseLabelInPackageVersion>
<IncludePreReleaseLabelInPackageVersion Condition="'$(IsShipping)' != 'true'">true</IncludePreReleaseLabelInPackageVersion>
<IncludeBuildNumberInPackageVersion Condition="'$(StabilizePackageVersion)' != 'true'">true</IncludeBuildNumberInPackageVersion>
<IncludeBuildNumberInPackageVersion Condition="'$(SuppressFinalPackageVersion)' == 'true'">true</IncludeBuildNumberInPackageVersion>
<IncludeBuildNumberInPackageVersion Condition="'$(IsShipping)' != 'true'">true</IncludeBuildNumberInPackageVersion>
<ProductVersionSuffix Condition="'$(IncludePreReleaseLabelInPackageVersion)' == 'true'">-$(VersionSuffix)</ProductVersionSuffix>
<ProductBandVersion Condition="'$(ProductBandVersion)' == ''">$(MajorVersion).$(MinorVersion)</ProductBandVersion>
<ProductionVersion Condition="'$(ProductionVersion)' == ''">$(ProductBandVersion).$(PatchVersion)</ProductionVersion>
<ProductVersion>$(ProductionVersion)$(ProductVersionSuffix)</ProductVersion>

Yeah, .0 here was just the old, hard-to-find way the patch version was defined. Putting it in eng/Version.props makes it easier to rev versions to service the repo.

@ghost ghost locked as resolved and limited conversation to collaborators Dec 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants