Skip to content

Allow default branding to be set by the VMR orchestrator#3574

Merged
ViktorHofer merged 22 commits intomainfrom
DefineDefaultBrandingType
Dec 3, 2025
Merged

Allow default branding to be set by the VMR orchestrator#3574
ViktorHofer merged 22 commits intomainfrom
DefineDefaultBrandingType

Conversation

@ViktorHofer
Copy link
Member

Fixes #3345

@ViktorHofer ViktorHofer marked this pull request as ready for review December 2, 2025 10:46
@ViktorHofer ViktorHofer requested review from a team as code owners December 2, 2025 10:46
Copilot AI review requested due to automatic review settings December 2, 2025 10:46
Removed branding comment from Directory.Build.targets.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors the branding/versioning mechanism for the VMR (Virtual Monolithic Repository) to allow the orchestrator to set default branding values. The changes introduce a new property RepoDotNetFinalVersionKind that can be set to control how assets are branded, replacing the previous direct use of DotNetFinalVersionKind.

Key changes:

  • Introduced four branding modes: repodefault (uses repo defaults), unstable (repo-specified suffix), preview (.final suffix), and release (no suffix)
  • Refactored build scripts (PowerShell and Bash) to use the new RepoDotNetFinalVersionKind property instead of directly setting DotNetFinalVersionKind
  • Updated pipeline configuration to support the new branding options with clearer descriptions

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
repo-projects/Directory.Build.targets Implements the logic to map RepoDotNetFinalVersionKind values to DotNetFinalVersionKind MSBuild properties
eng/pipelines/templates/variables/vmr-build.yml Maps pipeline parameter values to branding types and fixes typos in parameter descriptions
eng/pipelines/templates/jobs/vmr-build.yml Conditionally sets the branding argument only when a branding type is specified
eng/pipelines/official.yml Updates the parameter values and descriptions with the new branding options
eng/build.ps1 Simplifies branding logic to use RepoDotNetFinalVersionKind property and updates help text
build.sh Removes the SetBranding function and simplifies branding handling to use RepoDotNetFinalVersionKind
eng/Versions.props Sets default RepoDotNetFinalVersionKind value and documents the allowed values
README.md Removes outdated RTM branding example from documentation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <[email protected]>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ViktorHofer
Copy link
Member Author

@mmitche the PR is now ready. I also added a clear notice for distro maintainers that explicitly passed -branding rtm in for .NET 10 as they will need to react:

~/git/dotnet$ ./build.sh -branding rtm
Unsupported branding type 'rtm'.
The allowed values are repodefault, unstable, preview or release.

IMPORTANT: If you previously passed in the '-branding rtm' argument for .NET 10, remove it entirely. The default is now set correctly (VMR branding defaults for release branch builds or otherwise repo branding defaults).

@ViktorHofer
Copy link
Member Author

ViktorHofer commented Dec 2, 2025

@ellahathaway regarding https://dev.azure.com/dnceng/internal/_workitems/edit/8757, distro maintainers don't need to pass that argument in anymore as the default is now correct. Someone would only want to pass this argument in explicitly when wanting to change the default (i.e. testing stable builds in the RC timeframe) which is quite uncommon. Do we want to send out another announcement or update the existing one? We should wait though until the backport PRs are merged into 10.0.1xx and 10.0.2xx.

@mthalman
Copy link
Member

mthalman commented Dec 2, 2025

We should wait though until the backport PRs are merged into 10.0.1xx and 10.0.2xx.

I don't think we should backport this to 10.0.1xx as that would be a breaking change.

Copy link
Member

@mthalman mthalman left a comment

Choose a reason for hiding this comment

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

It's not clear to me how repodefault actually will cause different behavior depending on where we're at in the release cycle. So when we're in servicing, how does repodefault know to use release branding?

@ViktorHofer
Copy link
Member Author

repodefault is the default behavior, when not stabilizing which means the repository decides the DotNetFinalVersionKind value. This is mainly used in the main branch and during RC1 before we switch to internal and stabilized builds.

When stabilizing for previews, RepoDotNetFinalVersionKind will get set to preview and for GA and servicing, the value will be release. These are different options because a preview still has a branding suffix (.final) vs release which doesn't have one.

unstable will be used to force non-stable assets in release branches. #3345 has more details on that.

I don't think we should backport this to 10.0.1xx as that would be a breaking change.

I really think we should backport to 1xx. The breaking change will be clearly visible (the build fails) and the error message indicates how to react. I want to include this as part of many UX build entry point changes that we did up to .NET 10 so that distro partners don't need to condition based on 1xx vs 2xx/main. cc @tmds for input

@mthalman
Copy link
Member

mthalman commented Dec 2, 2025

cc @dotnet/distro-maintainers for visibility

@MichaelSimons
Copy link
Member

I don't think we should backport this to 10.0.1xx as that would be a breaking change.

I really think we should backport to 1xx. The breaking change will be clearly visible (the build fails) and the error message indicates how to react. I want to include this as part of many UX build entry point changes that we did up to .NET 10 so that distro partners don't need to condition based on 1xx vs 2xx/main. cc @tmds for input

@ViktorHofer - would it be feasible to support a migration? What I mean by that is for one servicing release we support both the new and old options so that folks can migrate at their convenience. Then the next servicing release we make the actual breaking change and remove the old options? I realize the transition period may be confusing with the option names but we could choose to support the old options as undocumented.

@ellahathaway
Copy link
Member

distro maintainers don't need to pass that argument in anymore as the default is now correct. Someone would only want to pass this argument in explicitly when wanting to change the default (i.e. testing stable builds in the RC timeframe) which is quite uncommon. Do we want to send out another announcement or update the existing one? We should wait though until the backport PRs are merged into 10.0.1xx and 10.0.2xx.

The announcement templates referenced in that work item served as a temporary workaround to address dotnet/release#1707 for the 10.0 GA release. As a result, the announcement templates were not permanently updated to include information about using the --branding argument. Since the long-term fix was implemented in dotnet/dotnet#3288, we now need to update the documentation accordingly. Once that's done, everything should be in order.

@ViktorHofer
Copy link
Member Author

ViktorHofer commented Dec 2, 2025

we now need to update the documentation accordingly. Once that's done, everything should be in order.

Ok. I was saying that with this change, distro partners don't need to pass --branding in anymore as the default is now correct. I think that means that we don't need to follow-up anywhere. This PR already updates the README.md

@omajid
Copy link
Member

omajid commented Dec 2, 2025

With my distro maintainer hat on, I never really understood the role of the branding argument. Requiring --branding rtm to build the right thing for 10.0 has been a bit surprising. I know some others were building wrong assets until they found about this argument and its purpose.

If this PR is switching to automatically building the right thing, then a big 👍 from me. I am even okay with the "build break" for 10.0 as this makes it easier to build the right thing correctly by default, and the error on using --branding rtm (the previous recommended value) seems clear and actionable.

@ViktorHofer
Copy link
Member Author

If this PR is switching to automatically building the right thing, then a big 👍 from me

Yes, that's what this PR does 👍 While there's still the --branding switch, you would only want to pass that in for i.e. manual builds (locally or as a pipeline parameter) to use a different branding than what's chosen as the default for the given branch/SHA.

@ViktorHofer ViktorHofer enabled auto-merge (squash) December 3, 2025 15:31
@ViktorHofer ViktorHofer disabled auto-merge December 3, 2025 19:33
@ViktorHofer ViktorHofer merged commit f59b33b into main Dec 3, 2025
8 of 11 checks passed
@ViktorHofer ViktorHofer deleted the DefineDefaultBrandingType branch December 3, 2025 19:33
ViktorHofer added a commit that referenced this pull request Dec 3, 2025
ViktorHofer added a commit that referenced this pull request Dec 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Consider Default RTM Branding in Release Build Entry-Point

7 participants