-
Notifications
You must be signed in to change notification settings - Fork 377
Migrate CreateBaselineUpdatePR
to Microsoft.DotNet.Baselines.Tasks
as MSBuild Task
#16033
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
Conversation
src/Microsoft.DotNet.Arcade.Sdk/tools/SdkTasks/CreateBaselineUpdatePR.proj
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this need to be in-built functionality inside the Arcade SDK or would it be sufficient to just use the package reference in consuming repos and get all the functionality via that?
Some scenarios can use a package reference in consuming repos, but others require running the task as a pipeline step. That’s why I added it to the Arcade SDK—so it can be easily invoked by the For example, in the license scanner pipeline, publishing the baselines PR has to happen in the pipeline, and cannot be integrated into the test's project file. This is because multiple license scanner jobs run in parallel, and their test results are merged to produce the updated baselines. In my opinion, putting this functionality in the Arcade SDK so that it can be invoked via |
src/Microsoft.DotNet.Baselines.Tasks/build/Microsoft.DotNet.Baselines.Tasks.targets
Outdated
Show resolved
Hide resolved
private readonly string _gitHubOrg; | ||
private readonly string _gitHubRepoName; | ||
private readonly GitHubClient _client; | ||
private const string BuildLink = "https://dev.azure.com/dnceng/internal/_build/results?buildId="; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this link be configurable? The default is fine but I wonder whether this should be overridable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tool is currently only used in internal dnceng builds, so I think the default is fine as-is. We can always make it configurable later if needed.
This PR migrates the
CreateBaselineUpdatePR
tool from the VMR to a new Arcade project, Microsoft.DotNet.Baselines.Tasks. It also refactors the tool from a command-line utility to a custom MSBuild task.The main advantage of this change is that it enables binlog generation when the task is invoked via the sdk-tasks script or included in a project (see dotnet/source-build#5055). Additionally, moving the tool out of the VMR broadens its usability, making it possible to leverage this tooling outside the VMR context. For example, it could be used to update repo-specific exclusions files during official repo-level builds—such as sign check exclusions, if SignCheck adds support for updating exclusions baselines.
Note that I do not want to remove the original VMR tooling yet. That will have to be done after a rebootstrap that includes these changes.