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

Switch to new VMR control schema. #10883

Merged
merged 1 commit into from
Sep 13, 2024
Merged

Switch to new VMR control schema. #10883

merged 1 commit into from
Sep 13, 2024

Conversation

mmitche
Copy link
Member

@mmitche mmitche commented Sep 13, 2024

Now that razor is on .NET 9 arcade, it can switch over to the new control schema. For this repo, this is roughly:

  • DotNetBuildFromSource -> DotNetBuildSourceOnly - Building a source-only build.
  • DotnetBuildFromSourceFlavor == Product -> DotNetBuildOrchestrator == true - Building in the VMR, could be source-only or MS's build.
  • ArcadeBuildFromSource -> DotNetBuildRepo == true -> Indicates an outer repo build.

Now that razor is on .NET 9 arcade, it can switch over to the new control schema. For this repo, this is roughly:
- DotNetBuildFromSource -> DotNetBuildSourceOnly - Building a source-only build.
- DotnetBuildFromSourceFlavor == Product -> DotNetBuildOrchestrator == true - Building in the VMR, could be source-only or MS's build.
- ArcadeBuildFromSource -> DotNetBuildRepo == true -> Indicates an outer repo build.
@mmitche mmitche requested review from a team as code owners September 13, 2024 17:02
@jaredpar
Copy link
Member

Rather than three diff properties did we consider one propety with three diff values? Like '$(DotNetBuildKind) == 'SourceOnly'`

@mmitche
Copy link
Member Author

mmitche commented Sep 13, 2024

Rather than three diff properties did we consider one property with three diff values? Like '$(DotNetBuildKind) == 'SourceOnly'`

We did a bunch of evaluation of this when the control scheme was designed. There are far more than 3 combinations that are interesting, so we ended up with the following general schema:

  • There is a property that indicates the exclusive phase of the build, so that you can say that "X should happen only when this code runs in context of Y"
  • There are 3 properties that indicates an inclusive phases of the builds. These are "am I running under" type things. So running under the full VMR build (DotNetBuildOrchestrator), vs. isolated repo validation
  • DotNetBuildSourceOnly becomes a resource-restriction switch. When it's true, you should only use things that are compatible with source only builds. When it's false you can use anything you might use in an MS build.
  • DotNetBuild - Am I running in any flavor of a VMR build (avoids lots of ORs)

The point was to separate out the old DotNetBuildFromSource switch, which was frequently used as both a resource restriction and as an infra switch (how the build works) so that the VMR build could both in MS modes as well as source-only modes.

https://github.com/dotnet/arcade/blob/main/Documentation/UnifiedBuild/Unified-Build-Controls.md has a ton of details around this.

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.

4 participants