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

Update "Build VS Bootstrapper" #9376

Merged

Conversation

tmeschter
Copy link
Contributor

@tmeschter tmeschter commented Jan 12, 2024

Related to AB#1939807.

To perform partial NGEN of our installed assemblies--where NGEN only pre-JITs the methods we need for a scenario, rather than every method--we need optimization data produced by OptProf runs. We run our own little test that produces this optimization data on every scheduled build of our main branch. This test is pretty straightforward--it loads a solution with a handful of projects in VS. We run the test out of our main branch so that it can incorporate our latest changes without the need for us to insert into VS. However, this means the test needs to install and run a build of VS that actually has those changes. We accomplish this with the MicroBuildBuildVSBootstrapper task. We give it a build channel and it uses the latest build from that channel as a baseline. We also point it at our locally-produced .vsman file describing our setup components, and it merges the two to produce a new VS installer (e.g. vs_enterprise.exe) that combines the two.

The channel we specify in this "Build VS Bootstrapper" task is "int.main" which tracks builds out of the VS "main" branch. This is generally what we want as most of our builds and insertions are from the dotnet/project-system "main" branch into the VS "main" branch. However, it is completely wrong when it comes to release/servicing branches. In the case of our "dev17.8.x" branch, for example, we're producing binaries that target the 17.8 release of VS but end up incorporating them into an installer based on VS "main", which is currently a 17.10 branch. This results in our package not loading properly, which in turn means the test fails and any optimization data we produce does not cover our assemblies. Without that data we get full NGEN of our assemblies at install-time.

Since the "dev17.8.x" branch is a 17.8 servicing branch, this commit updates us to target the "int.rel/d17.8" channel instead. This means the installer will be based on builds out of the VS "rel/d17.8" branch, which is what we want.

Microsoft Reviewers: Open in CodeFlow

To perform partial NGEN of our installed assemblies--where NGEN only pre-JITs the methods we need for a scenario, rather than every method--we need optimization data produced by OptProf runs.
We run our own little test that produces this optimization data on every scheduled build of our `main` branch.
This test is pretty straightforward--it loads a solution with a a handful of projects in VS.
We run the test out of our `main` branch so that it can incorporate our latest changes without the need for us to insert into VS.
However, this means the test needs to install and run a build of VS that actually has those changes.
We accomplish this with the `MicroBuildBuildVSBootstrapper` task. We give it a build channel and it uses the latest build from that channel as a baseline. We also point it at our locally-produced .vsman file describing our setup components, and it merges the two to produce a new VS installer (e.g. vs_enterprise.exe) that combines the two.

The channel we specify in this "Build VS Bootstrapper" task is "int.main" which tracks builds out of the VS "main" branch. This is generally what we want as most of our builds and insertions are from the dotnet/project-system "main" branch into the VS "main" branch. However, it is completely wrong when it comes to release/servicing branches. In the case of our "dev17.8.x" branch, for example, we're producing binaries that target the 17.8 release of VS but end up incorporating them into an installer based on VS "main", which is currently a 17.10 branch. This results in our package not loading properly, which in turn means the test fails and any optimization data we produce does not cover our assemblies. Without that data we get full NGEN of our assemblies at install-time.

Since the "dev17.8.x" branch is a 17.8 servicing branch, this commit updates us to target the "int.rel/d17.8" channel instead. This means the installer will be based on builds out of the VS "rel/d17.8" branch, which is what we want.
@tmeschter tmeschter requested a review from a team as a code owner January 12, 2024 21:16
@@ -133,7 +133,7 @@ jobs:
inputs:
bootstrapperCoreVersion: latest
vsMajorVersion: $(SetVisualStudioMinimumVersionVariable.VisualStudioMinimumVersion)
channelName: int.main
channelName: int.rel/d17.8
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm somewhat guessing at the channel name here; I couldn't find many examples.

Based on examples I've found elsewhere I think we need "int.d17.8" as the channel name rather than "int.rel/d17.8".
@tmeschter tmeschter merged commit 93c5a30 into dotnet:dev17.8.x Jan 12, 2024
5 checks passed
@drewnoakes
Copy link
Member

@tmeschter should we include this as a step on our branch check list?

@tmeschter
Copy link
Contributor Author

@drewnoakes Yeah, I had the same thought. I'm going to update that once I actually get this working again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants