|
| 1 | +# Preview Branch Preparation Process |
| 2 | + |
| 3 | +This document outlines the process we go through during previews to prepare the branches for a workloads insertion. |
| 4 | + |
| 5 | +## Overview |
| 6 | + |
| 7 | +When preparing for a new preview release of .NET, we need to ensure that the workload-versions repository is properly configured to receive and flow dependencies from the correct sources. This involves updating Maestro subscriptions to point to the appropriate channels for the preview period. |
| 8 | + |
| 9 | +## Process Steps |
| 10 | + |
| 11 | +### 1. Change the Channel for the dotnet/dotnet Subscription |
| 12 | + |
| 13 | +The workload-versions repository receives dependencies from the `dotnet/dotnet` repository (the VMR - Virtual Monolithic Repository) through Maestro subscriptions. During preview periods, we need to update these subscriptions to point to the correct preview channel. |
| 14 | + |
| 15 | +#### Steps to Update the Subscription: |
| 16 | + |
| 17 | +1. **Identify the target preview channel** |
| 18 | + - Preview channels typically follow the pattern: `.NET <version> Preview <number>` |
| 19 | + - Example: `.NET 10 Preview 1`, `.NET 10 Preview 2`, etc. |
| 20 | + - You can list available channels using: `darc get-channels` |
| 21 | + |
| 22 | +2. **Find the current subscription** |
| 23 | + - List all subscriptions for the repository: |
| 24 | + ```bash |
| 25 | + darc get-subscriptions --target-repo workload-versions |
| 26 | + ``` |
| 27 | + - Identify the subscription from `dotnet/dotnet` (the VMR) |
| 28 | + |
| 29 | +3. **Update the subscription to the new preview channel** |
| 30 | + - Use the DARC tool to update the subscription: |
| 31 | + ```bash |
| 32 | + darc update-subscription --id <subscription-id> --channel "<channel-name>" |
| 33 | + ``` |
| 34 | + - Example: |
| 35 | + ```bash |
| 36 | + darc update-subscription --id 12345 --channel ".NET 10 Preview 2" |
| 37 | + ``` |
| 38 | + |
| 39 | +4. **Verify the subscription update** |
| 40 | + - Confirm the change was applied: |
| 41 | + ```bash |
| 42 | + darc get-subscription --id <subscription-id> |
| 43 | + ``` |
| 44 | + - Check that the `Channel` field shows the new preview channel |
| 45 | + |
| 46 | +5. **Monitor dependency flow** |
| 47 | + - After updating the subscription, monitor for new pull requests from Maestro |
| 48 | + - PRs will be automatically created when new builds are published to the preview channel |
| 49 | + - These PRs will update the `eng/Version.Details.xml` file with new dependency versions |
| 50 | + |
| 51 | +### 2. Update Branch Configuration |
| 52 | + |
| 53 | +Depending on the preview and SDK version you're preparing for, you may need to: |
| 54 | +
|
| 55 | +1. **Create or update the appropriate branch** |
| 56 | + - For example: `release/10.0.1xx-preview2` for .NET 10 Preview 2 SDK band 100 |
| 57 | + - Ensure the branch is created from the correct starting point |
| 58 | +
|
| 59 | +2. **Update Version.props** |
| 60 | + - Set the appropriate version features and patch levels for the preview |
| 61 | + - Update `VersionFeature` to match the SDK release band |
| 62 | + - Ensure `VersionPatch` is set correctly (typically 0 for a new preview) |
| 63 | +
|
| 64 | +3. **Configure channel publishing** |
| 65 | + - Ensure builds from this branch publish to the correct workloads feed |
| 66 | + - For .NET 10: `dotnet10-workloads` feed |
| 67 | + - Feed URL: `https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet10-workloads/nuget/v3/index.json` |
| 68 | +
|
| 69 | +## Reference Information |
| 70 | +
|
| 71 | +### Workloads Feeds by .NET Version |
| 72 | +
|
| 73 | +- dotnet8-workloads: https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet8-workloads/nuget/v3/index.json |
| 74 | +- dotnet9-workloads: https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet9-workloads/nuget/v3/index.json |
| 75 | +- dotnet10-workloads: https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet10-workloads/nuget/v3/index.json |
| 76 | +
|
| 77 | +### Useful DARC Commands |
| 78 | +
|
| 79 | +```bash |
| 80 | +# List all channels |
| 81 | +darc get-channels |
| 82 | +
|
| 83 | +# List subscriptions for this repository |
| 84 | +darc get-subscriptions --target-repo workload-versions |
| 85 | +
|
| 86 | +# Get details of a specific subscription |
| 87 | +darc get-subscription --id <subscription-id> |
| 88 | +
|
| 89 | +# Update a subscription's channel |
| 90 | +darc update-subscription --id <subscription-id> --channel "<channel-name>" |
| 91 | + |
| 92 | +# List available builds in a channel |
| 93 | +darc get-builds --channel "<channel-name>" |
| 94 | +``` |
| 95 | + |
| 96 | +### Documentation Links |
| 97 | + |
| 98 | +- [DARC Documentation](https://github.com/dotnet/arcade/blob/main/Documentation/Darc.md) |
| 99 | +- [Maestro/Dependency Flow Documentation](https://github.com/dotnet/arcade/blob/main/Documentation/DependencyFlowOnboarding.md) |
| 100 | +- [Release Process Documentation](release-process.md) |
| 101 | + |
| 102 | +## Common Issues and Troubleshooting |
| 103 | + |
| 104 | +### Subscription Not Updating |
| 105 | + |
| 106 | +If dependency PRs are not being created after updating the subscription: |
| 107 | + |
| 108 | +1. Verify the subscription channel is correct |
| 109 | +2. Check that builds are being published to the target channel |
| 110 | +3. Ensure the subscription is enabled (not disabled) |
| 111 | +4. Check Maestro for any errors in the subscription processing |
| 112 | + |
| 113 | +### Wrong Dependencies Flowing In |
| 114 | + |
| 115 | +If you're receiving dependencies from the wrong builds: |
| 116 | + |
| 117 | +1. Verify the subscription is pointing to the correct channel |
| 118 | +2. Check the channel's build sources |
| 119 | +3. Ensure you updated the correct subscription (there may be multiple) |
| 120 | + |
| 121 | +## Timeline Considerations |
| 122 | + |
| 123 | +- Subscription channel updates should be made **before** the first preview build is published |
| 124 | +- Allow time for the first dependency update PR to flow through and be merged |
| 125 | +- Coordinate with the dotnet/dotnet (VMR) team on preview build schedules |
| 126 | +- Plan for at least one full dependency flow cycle before declaring the branch ready for insertions |
0 commit comments