Skip to content

Commit 63ef3ae

Browse files
authored
Update maestro docs. Added a note about dotnet default values. (#2458)
1 parent 0d3f72b commit 63ef3ae

File tree

1 file changed

+107
-66
lines changed

1 file changed

+107
-66
lines changed
+107-66
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,72 @@
11
# Overview
2-
Dependencies between WindowsAppSDK components are handled by Maestro, a dependency manager
3-
developed by dotnet as part of the [Arcade Build System](https://github.com/dotnet/arcade).
4-
ProjectReunion uses the only other instance of maestro (we are the second to use this) and our
5-
instance is mostly decoupled from the Arcade build system. Maestro can make pull requests [example](https://dev.azure.com/microsoft/ProjectReunion/_git/ProjectReunionInternal/pullrequest/6073284)
6-
to update the versions of each dependency which is setup via the concept of [branches, channels, and subscriptions](https://github.com/dotnet/arcade/blob/main/Documentation/BranchesChannelsAndSubscriptions.md). The dependencies for the branch are expressed in version.details.xml; for more information on how it works, please take a look at [DependencyDescriptionFormat](https://github.com/dotnet/arcade/blob/main/Documentation/DependencyDescriptionFormat.md).
2+
Dependencies between WindowsAppSDK components are handled by Maestro, a
3+
dependency manager developed by dotnet as part of the [Arcade Build
4+
System](https://github.com/dotnet/arcade). ProjectReunion uses the only other
5+
instance of maestro (we are the second to use this) and our instance is mostly
6+
decoupled from the Arcade build system.
7+
8+
Maestro can make pull requests
9+
[example](https://dev.azure.com/microsoft/ProjectReunion/_git/ProjectReunionInternal/pullrequest/6073284)
10+
to update the versions of each dependency which is setup via the concept of
11+
[branches, channels, and subscriptions](https://github.com/dotnet/arcade/blob/main/Documentation/BranchesChannelsAndSubscriptions.md).
12+
The dependencies for the branch are expressed in version.details.xml; for more
13+
information on how it works, please take a look at
14+
[DependencyDescriptionFormat](https://github.com/dotnet/arcade/blob/main/Documentation/DependencyDescriptionFormat.md).
715

816
## Differences between WindowsAppSDK's Maestro and DotNet's Maestro
917
**Arcade Build System**
10-
In DotNet, the arcade build system and Maestro are tightly coupled. However in WinAppSDK, the arcade build
11-
system is not availble for use. Each of our repositories have their own unique ways to build and hence
12-
using Maestro in WinAppSDK involves making post calls to WinAppSDK's Maestro.
13-
Templates such as eng\common\AzurePipelinesTemplates\Maestro-PublishBuildToMaestro-Steps.yml are provided
14-
to facilitate posting builds to Maestro so that Maestro can notify dependencies of the incoming version updates.
18+
In DotNet, the arcade build system and Maestro are tightly coupled. However in
19+
WinAppSDK, the arcade build system is not availble for use. Each of our
20+
repositories have their own unique ways to build and hence using Maestro in
21+
WinAppSDK involves making post calls to WinAppSDK's Maestro. Templates such as
22+
eng\common\AzurePipelinesTemplates\Maestro-PublishBuildToMaestro-Steps.yml are
23+
provided to facilitate posting builds to Maestro so that Maestro can notify
24+
dependencies of the incoming version updates.
1525

1626
**Eng\Common**
17-
The eng/common directory is a directory that all of dotnet's repositories share and is maintaned
18-
automatically through Maestro updates. Updates on the toolset dependency 'Microsoft.DotNet.Arcade.Sdk'
19-
triggers the update of eng/common and the eng/common of the repository in uri that is referenced in the
27+
The eng/common directory is a directory that all of dotnet's repositories share
28+
and is maintaned automatically through Maestro updates. Updates on the toolset
29+
dependency 'Microsoft.DotNet.Arcade.Sdk' triggers the update of eng/common and
30+
the eng/common of the repository in uri that is referenced in the
2031
version.details.xml entry for 'Microsoft.DotNet.Arcade.Sdk' is used.
2132

22-
WindowsAppSDK's Maestro also makes use of eng/common but the contents in this directory are completely
23-
different from that of dotnets. We use eng/common to store our yml templates and scripts that facilitates
24-
the functions of Maestro between our repositories such as publishing to maestro or building WindowsAppSDk
25-
for integration testing purposes. Furthermore, instead of 'Microsoft.DotNet.Arcade.Sdk',
26-
WinAppSDK's Maestro looks for 'Microsoft.WinAppSDK.EngCommon' to see whether eng/common needs to be updated.
27-
28-
To bring in updates to Eng/Common, an entry for 'Microsoft.WinAppSDK.EngCommon' is needed in the
29-
msbuild-sdks section of global.json at the root level directory and also version.details.xml
30-
in ToolsetDependencies section where the uri will point to the ProjectReunionInternal repository.
31-
Detail information in **Steps to onboard new repository to WindowsAppSDK Maestro**
32-
33-
To makes updates to Eng/Common, please do not make them in the non parent repo. Our parent repo for eng/common
34-
is the ProjectReunionInternal repository.
35-
To publish changes, please run the Maestro-UpdateEngCommon pipeline on the main branch.
33+
WindowsAppSDK's Maestro also makes use of eng/common but the contents in this
34+
directory are completely different from that of dotnets. We use eng/common to
35+
store our yml templates and scripts that facilitates the functions of Maestro
36+
between our repositories such as publishing to maestro or building WindowsAppSDk
37+
for integration testing purposes. Furthermore, instead of
38+
'Microsoft.DotNet.Arcade.Sdk', WinAppSDK's Maestro looks for
39+
'Microsoft.WinAppSDK.EngCommon' to see whether eng/common needs to be updated.
40+
41+
To bring in updates to Eng/Common, an entry for 'Microsoft.WinAppSDK.EngCommon'
42+
is needed in the msbuild-sdks section of global.json at the root level directory
43+
and also version.details.xml in ToolsetDependencies section where the uri will
44+
point to the ProjectReunionInternal repository. Detail information in **Steps to
45+
onboard new repository to WindowsAppSDK Maestro**
46+
47+
To makes updates to Eng/Common, please do not make them in the non parent repo.
48+
Our parent repo for eng/common is the ProjectReunionInternal repository. To
49+
publish changes, please run the Maestro-UpdateEngCommon pipeline on the main
50+
branch.
3651

3752
**Coherency Updates are Disabled**
38-
Coherency updates requires Maestro to travel down levels in the dependency tree.
39-
Since our instance of Maestro does not have permissions to every single repository that the
40-
original Maestro have and our instance of Maestro is onboarded to one of dotnet's
41-
repositories where the original Maestro is onboarded as well with many layers of dependencies,
42-
it becomes infeasible and unmaintainable for our Maestro to have the same level of access to
43-
many different repositories as DotNet's Maestro. Hence Coherency Updates are disabled.
53+
Coherency updates requires Maestro to travel down levels in the dependency tree.
54+
Since our instance of Maestro does not have permissions to every single
55+
repository that the original Maestro have and our instance of Maestro is
56+
onboarded to one of dotnet's repositories where the original Maestro is
57+
onboarded as well with many layers of dependencies, it becomes infeasible and
58+
unmaintainable for our Maestro to have the same level of access to many
59+
different repositories as DotNet's Maestro. Hence Coherency Updates are
60+
disabled.
4461

4562
## Steps to start using and configuring branches, channels, and subscriptions
46-
Join the contributer group for https://github.com/orgs/microsoft/teams/project-reunion.
47-
You'll need this to login to https://reunion-maestro-prod.westus2.cloudapp.azure.com
48-
Make sure you can login into this address before starting the next steps.
63+
Join the contributer group for
64+
https://github.com/orgs/microsoft/teams/project-reunion. You'll need this to
65+
login to https://reunion-maestro-prod.westus2.cloudapp.azure.com Make sure you
66+
can login into this address before starting the next steps.
4967

50-
**Install darc client**
51-
The darc client is a command line tool that lets you configure channels, branches, and subscriptions
68+
**Install darc client** The darc client is a command line tool that lets you
69+
configure channels, branches, and subscriptions
5270

5371
To setup a darc client,
5472
1) Clone the following repo: https://github.com/dotnet/arcade
@@ -65,26 +83,43 @@ You may need to restart your command window if this is the first dotnet tool you
6583
You can invoke the tool using the following command: darc
6684
Tool 'microsoft.dotnet.darc' (version '1.1.0-beta.19081.1') was successfully installed.
6785
```
68-
After your darc client is installed, you should be able to launch darc by simply typing in 'darc'
69-
in your command line.
70-
If not, you may need to restart.
71-
72-
3) Call 'darc authenticate' with your darc client
73-
This will open up a notepad where you'll be able to set build_asset_registry_base_uri and provide
74-
three different PATs (BAR, Github, AzureDevOps).
75-
Each respective PAT is required to make configuration changes to AzureDevOps or Github repo
86+
After your darc client is installed, you should be able to launch darc by simply
87+
typing in 'darc' in your command line. If not, you may need to restart.
88+
89+
NOTE: many of the default values you see next when using the darc commands are
90+
dotnet related. Please ignore or replace those values with our own such as for
91+
the build_asset_registry_base_uri
92+
93+
3) Call 'darc authenticate' with your darc client This will open up a notepad
94+
where you'll be able to set build_asset_registry_base_uri and provide three
95+
different PATs (BAR, Github, AzureDevOps). Each respective PAT is required to
96+
make configuration changes to AzureDevOps or Github repo
97+
98+
For GitHub:
99+
The PAT can be retrived from "Personal access tokens" section on the
100+
Developer settings in GitHUB There is an extra step where you must configure SSO
101+
especially for the "Microsoft" organization so that you can make maestro config
102+
changes for the Foundation repositories. This will prevent 403 (Forbidden)
103+
errors from occuring when using the token.
104+
105+
For AzureDevOps:
106+
The PAT can be retrived from "Personal access tokens" section on
107+
the settings dropdown menu. NOTE: To make maestro config changes on azure devops
108+
repositories, you'll need the corresponding PAT from the correct organization
109+
that the repositories are under.
110+
76111
For BAR:
77112
Create a new tokens at https://reunion-maestro-prod.westus2.cloudapp.azure.com/Account/Tokens
78113
Copy the new token and paste it to bar_password
79114

80-
build_asset_registry_base_uri will be pointed at the dotnet's maestro uri. We want this to point to
81-
WindowsAppSDK's Maestro Uri.
115+
build_asset_registry_base_uri will be pointed at the dotnet's maestro uri. We
116+
want this to point to WindowsAppSDK's Maestro Uri.
82117
build_asset_registry_base_uri=https://reunion-maestro-prod.westus2.cloudapp.azure.com/
83118

84-
Once these steps are done and you are ready to use the darc client to configure your branches,
85-
channels, and subscriptions.
86-
You may refer https://github.com/dotnet/arcade/blob/main/Documentation/Darc.md for more in-depth
87-
information on how to use it.
119+
Once these steps are done and you are ready to use the darc client to configure
120+
your branches, channels, and subscriptions. You may refer
121+
https://github.com/dotnet/arcade/blob/main/Documentation/Darc.md for more
122+
in-depth information on how to use it.
88123

89124
## Steps to onboard new repository to WindowsAppSDK Maestro
90125
Initial onboarding requirements
@@ -93,12 +128,14 @@ These can be done in any particular order.
93128
** Basic requirements **
94129
Add (or copy) the Versions.props and Version.Details.xml files to your eng\ folder.
95130

96-
Get access to ProjectReunionInternal feed and any other feeds that the repository restores NuGet packages
97-
from. ProjectReunionInternal feed is the main feed that WindowsAppSDK repositories uses to restore packages from.
131+
Get access to ProjectReunionInternal feed and any other feeds that the
132+
repository restores NuGet packages from. ProjectReunionInternal feed is the main
133+
feed that WindowsAppSDK repositories uses to restore packages from.
98134

99135
** Eng/Common Onboarding **
100-
Copy the contents of eng\common from ProjectReunionInternal to the root of the repository keeping the same folder paths.
101-
This folder contains reunion's template that publishes the build to Maestro: Maestro-PublishBuildToMaestro.yml
136+
Copy the contents of eng\common from ProjectReunionInternal to the root of the
137+
repository keeping the same folder paths. This folder contains reunion's
138+
template that publishes the build to Maestro: Maestro-PublishBuildToMaestro.yml
102139

103140
To get automatic updates to eng/common
104141
Add global.json to root level directory with the following contents.
@@ -112,8 +149,8 @@ Add global.json to root level directory with the following contents.
112149
}
113150
}
114151
```
115-
Add Microsoft.WindowsAppSDK.EngCommon dependency to ToolsetDependencies where the uri is the link to
116-
ProjectReunionInternal repo
152+
Add Microsoft.WindowsAppSDK.EngCommon dependency to ToolsetDependencies where
153+
the uri is the link to ProjectReunionInternal repo
117154
```
118155
<ToolsetDependencies>
119156
<Dependency Name="Microsoft.WinAppSDK.EngCommon" Version="1.0.0-20211213.0-CI">
@@ -127,17 +164,20 @@ ProjectReunionInternal repo
127164
Install the github App https://github.com/apps/reunion-maestro on your org/repository
128165

129166
** AzureDevOps Repositories **
130-
Give reunion-maestro-bot@microsoft.com contributers permissions.
131-
For automatic completion, in branch securities, "ByPass Policies when completing pull requests" should be allowed.
132-
133-
If the azure devops repositories is in a new organization that has not been onboarded, please contact the
134-
ProjectReunionES team to onboard the org to the Maestro service.
135-
This involves adding a new entry in the WindowsAppSDK's equivalent of
167+
Give reunion-maestro-bot@microsoft.com contributers permissions. For automatic
168+
completion, in branch securities, "ByPass Policies when completing pull
169+
requests" should be allowed.
170+
171+
If the azure devops repositories is in a new organization that has not been
172+
onboarded, please contact the ProjectReunionES team to onboard the org to the
173+
Maestro service. This involves adding a new entry in the WindowsAppSDK's
174+
equivalent of
136175
https://github.com/dotnet/arcade-services/blob/main/src/Maestro/SubscriptionActorService/.config/settings.json
137176
with the PAT from reunion-maestro-bot@microsoft.com
138177

139178
## Creating subscriptions with automatic completions ##
140-
When adding a new subscription, please include the Merge Policies below with all the ignoreChecks
179+
When adding a new subscription, please include the Merge Policies below with all
180+
the ignoreChecks
141181
```
142182
Merge Policies:
143183
- Name: AllChecksSuccessful
@@ -149,5 +189,6 @@ Merge Policies:
149189
- Comment requirements
150190
- Work item linking
151191
```
152-
Note: At least one required check on the pull request must run successfully for Maestro to auto complete.
192+
Note: At least one required check on the pull request must run successfully for
193+
Maestro to auto complete.
153194

0 commit comments

Comments
 (0)