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

[build] Use arcade dependency management tooling #729

Merged
merged 1 commit into from Apr 15, 2021

Conversation

pjcollins
Copy link
Member

Context: https://github.com/dotnet/arcade/blob/ea609b8e036359934332480de9336d98fcbb3f91/Documentation/Darc.md

The dotnet core engineering group has some dependency management tooling
(known as darc) that we'd like to adopt. Integrating this tooling in
to the build system will make it easier to stay up to date with the
latest .NET 6 SDK changes.

Many dotnet repos use a publishing workflow that will push build
artifact data to a central location known as the "Build Asset Registry".
This data includes a "Channel" association, which is the key to
dependency updating. Local updates and automatic update "Subscriptions"
compare the version files in a given repo against the product versions
available in the channel that you are interested in.

The darc tool looks for four different files in a repo when adding a
dependency or when checking for an update:

  • eng/Version.Details.xml
  • eng/Versions.props
  • nuget.config
  • global.json

Both of the Version files present in the eng folder are updated when
a new dependency is available.

To work with darc locally you'll need to install the global tool, join
the arcade-contrib GitHub team, and configure your auth settings.

To add a new dependency, use the darc add-dependency command:

darc add-dependency -n Microsoft.Dotnet.Sdk.Internal -t product -v 6.0.0-preview.2.21154.6 -r https://github.com/dotnet/installer

To update all dependencies, use the darc update-dependencies
command:

darc update-dependencies --channel ".NET 6"

To configure automatic updates, use the darc add-subscription
command to enroll a target repo/branch into updates from a particular
channel:

darc add-subscription --channel ".NET 6" --source-repo https://github.com/dotnet/installer --target-repo https://github.com/dotnet/maui --target-branch main --update-frequency everyWeek --standard-automerge

Once a subscription is configured, a pull request will be created
automatically by the dotnet Maestro bot when dependency updates are
available.

@rmarinho
Copy link
Member

Thanks @pjcollins , what about android sdk for macOS ? do we need to add a dependecy/version for that?

After this gets merged? we have to run those commands? so darc registers our repo ?

The update-depednecies is if we want to run locally? if we add-subscription we don't need to updated-dependecies manuallyy right?

Is this public so our users if they want to develop on this repo can they also use this ?

@jonathanpeppers
Copy link
Member

what about android sdk for macOS ? do we need to add a dependecy/version for that?

All Android packages share the same version number, so we can just use the Windows one.

Is this public so our users if they want to develop on this repo can they also use this ?

I would only expect MS employees will be running darc and configuring subscriptions. You need to join a special team in the dotnet org for it to work.

eng/Version.props is just a regular file, so contributors don't really see any change here. A bot will now update the file, while we used to do it manually.

Comment on lines +4 to 7
<MicrosoftDotnetSdkInternalPackageVersion>6.0.100-preview.3.21202.5</MicrosoftDotnetSdkInternalPackageVersion>
<MicrosoftAndroidSdkWindowsPackageVersion>11.0.200-preview.3.196</MicrosoftAndroidSdkWindowsPackageVersion>
<MicrosoftMacCatalystSdkPackageVersion>14.3.100-preview.3.471</MicrosoftMacCatalystSdkPackageVersion>
<MicrosoftiOSSdkPackageVersion>14.4.100-preview.3.1326</MicrosoftiOSSdkPackageVersion>
Copy link
Member

Choose a reason for hiding this comment

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

Does the README.md file mention how to find these names?

One day they might need to add $(MicrosoftmacOSSdkPackageVersion) to get the macOS workload, or maybe the Blazor WebAssembly workload?

Copy link
Member

Choose a reason for hiding this comment

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

Curious about the variable naming MicrosoftAndroidSdkWindowsPackageVersion ... why Windows?

Copy link
Member Author

Choose a reason for hiding this comment

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

The property name is generated based on the dependency name added to the Version.Details.xml file by my understanding, which needs to correspond to a NuGet package ID. Our Android SDKs have a host OS suffix -- I selected Windows here arbitrarily but all of our packs have the same version so it shouldn't matter which NuGet package ID you use here.

Comment on lines +3 to +6
<Dependency Name="Microsoft.Dotnet.Sdk.Internal" Version="6.0.100-preview.3.21202.5" CoherentParentDependency="Microsoft.Android.Sdk.Windows">
<Uri>https://github.com/dotnet/installer</Uri>
<Sha>aee38a6dd446b512b1ae510d80d2ed1c1f24e79a</Sha>
</Dependency>
Copy link
Member

Choose a reason for hiding this comment

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

Is this one configured with the "coherent dependency" feature?

We don't want them to bump to a newer dotnet/installer than what Android or iOS has. But it might complicate things because both iOS & Android could have a different dotnet/installer.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, the CoherentParentDependency attribute here should ensure that the Microsoft.Dotnet.Sdk.Internal dependency never moves ahead of what is in Android.

@pjcollins pjcollins marked this pull request as ready for review April 15, 2021 17:21
@pjcollins
Copy link
Member Author

@Redth we decided to land this as is, and do one more manual bump to P4 next week before setting up subscriptions. This is ready to go whenever you want to land it.

@rmarinho rmarinho merged commit 45dd0ed into dotnet:main Apr 15, 2021
tralivali1234 pushed a commit to tralivali1234/maui that referenced this pull request Apr 21, 2021
@Eilon Eilon added the area/infrastructure 🏗️ CI, Maestro / Coherency label Sep 30, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Dec 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/infrastructure 🏗️ CI, Maestro / Coherency
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants