Skip to content

Allow Hosting Bundle to be upgraded by MU #37966

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

Merged
merged 8 commits into from
Nov 5, 2021
Merged

Allow Hosting Bundle to be upgraded by MU #37966

merged 8 commits into from
Nov 5, 2021

Conversation

wtgodbe
Copy link
Member

@wtgodbe wtgodbe commented Nov 1, 2021

Adds an .msi, dotnet-hosting-options, which writes to the registry the value of the switches used when last installing the hosting bundle for a given Major.Minor version. Subsequent installs of that band of the hosting bundle will choose what the install in the following way:

  • If the user passes any switches on the command line, use exactly those (and write them to the registry, along with 0 for any switches not passed).
  • Else use what's in the registry, if there are values in the registry.
  • Else set all switches to 0 and write 0 to the registry for each switch

Need to backport this to all servicing branches. In December all customers who get this update thru MU will get a 1-time hit where, regardless of what they already had installed, the hosting bundle will install all components. We suspect most customers install everything anyways, and those who don't will be able to work around this by manually re-running the installer with whatever switches they passed the last time they installed the bundle manually. We should document that in our release notes (CC @rbhanda @danroth27).

6.0: #37967
5.0: #37968
3.1: #37969

Still working on 2.1

@wtgodbe wtgodbe requested review from joeloff, jamshedd and a team November 1, 2021 00:47
@dotnet dotnet deleted a comment from github-actions bot Nov 1, 2021
@dotnet dotnet deleted a comment from github-actions bot Nov 1, 2021
@dotnet dotnet deleted a comment from github-actions bot Nov 1, 2021
@dotnet dotnet deleted a comment from github-actions bot Nov 1, 2021
@dotnet dotnet deleted a comment from github-actions bot Nov 1, 2021
@dotnet dotnet deleted a comment from github-actions bot Nov 1, 2021
Copy link
Contributor

@dougbu dougbu left a comment

Choose a reason for hiding this comment

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

All comments from #37969 apply here

@dougbu
Copy link
Contributor

dougbu commented Nov 1, 2021

Side curiosity question: Why did this PR conflict w/ release/6.0 etc.❔

@wtgodbe
Copy link
Member Author

wtgodbe commented Nov 2, 2021

Conflict is due to the format of this ProjectReference in main:

<ProjectReference Include="..\SharedFrameworkBundle\SharedFrameworkBundle.wixproj"
Private="false"
ReferenceOutputAssembly="false"
SkipGetTargetFrameworkProperties="true" />

vs 6.0/older:

<ProjectReference Include="..\SharedFrameworkBundle\SharedFrameworkBundle.wixproj">
<Private>True</Private>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>

@dougbu
Copy link
Contributor

dougbu commented Nov 2, 2021

Conflict is due to the format of this ProjectReference in main:…

Backport #37338 if you like (the GitHub action didn't work for me last I checked ☹️)

Result="exists"
Variable="OPT_NO_SHAREDFX_Should_Be_Set"/>

<util:RegistrySearch Id="opt_no_runtime_should_be_set"
Copy link
Member

Choose a reason for hiding this comment

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

I think you can simplify this further using a preprocessor variable to hold the condition (since it's the same) and then using a foreach to generate a parameterized search, e.g.

<?define Options=OPT_NO_X86;OPT_NO_RUNTIME?>
    <?foreach Option in $(var.Options?>
    <util:RegistrySearch Id="$(var.Option)_should_be_set">
      
    </util:RegistrySearch>
    <?endforeach?>

Copy link
Member

@joeloff joeloff left a comment

Choose a reason for hiding this comment

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

Looks good, I left a final suggestion around code clean up to simplify maintenance in the future.

Variable="$(var.Option)_Should_Be_Set"/>
<?endforeach?>

<util:RegistrySearch Condition="OPT_NO_ANCM_Should_Be_Set"
Copy link
Member

Choose a reason for hiding this comment

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

Delete the conditions since you're generating them through the preprocessor

@danroth27
Copy link
Member

We should document that in our release notes (CC @rbhanda @danroth27).

I'm not sure where specifically we should document this. @rbhanda?

@wtgodbe wtgodbe enabled auto-merge (squash) November 4, 2021 21:18
@wtgodbe wtgodbe disabled auto-merge November 4, 2021 22:00
@wtgodbe wtgodbe merged commit ba98a07 into main Nov 5, 2021
@wtgodbe wtgodbe deleted the wtgodbe/HostingMU branch November 5, 2021 00:18
@ghost ghost added this to the 7.0-preview1 milestone Nov 5, 2021
@amcasey amcasey added area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions and removed area-runtime labels Aug 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants