Display subscription trigger outcome in darc - #6339
#6339Merged
dkurepa merged 11 commits intoJun 2, 2026
dotnet:maindotnet/arcade-services:mainfrom
dkurepa:dkurepa/DarcSubOutputdkurepa/arcade-services:dkurepa/DarcSubOutputCopy head branch name to clipboard
Merged
Display subscription trigger outcome in darc#6339dkurepa merged 11 commits intodotnet:maindotnet/arcade-services:mainfrom dkurepa:dkurepa/DarcSubOutputdkurepa/arcade-services:dkurepa/DarcSubOutputCopy head branch name to clipboard
dkurepa merged 11 commits into
dotnet:maindotnet/arcade-services:mainfrom
dkurepa:dkurepa/DarcSubOutputdkurepa/arcade-services:dkurepa/DarcSubOutputCopy head branch name to clipboard
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds support in darc for querying and displaying subscription trigger outcomes after triggering subscriptions, and centralizes PR URL “API → website” conversion logic into Maestro.Common for reuse across PCS components.
Changes:
- Add a new BAR/PCS client surface in Darc (
GetSubscriptionTriggerOutcomesAsync) and a--no-waitoption, with polling to print outcomes after triggering. - Move PR API-URL-to-web-URL conversion into
Maestro.Common.GitRepoUrlUtilsand update PCS dependency flow/messages/controllers to use it. - Relocate the PR URL conversion tests into a new
Maestro.Common.Testsproject and wire it into the solution.
Reviewed changes
Copilot reviewed 15 out of 16 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| test/ProductConstructionService/ProductConstructionService.Api.Tests/PullRequestUrlConversionTests.cs | Removes reflection-based controller private-method tests (moved to common utils tests). |
| test/Maestro/Maestro.Common.Tests/Maestro.Common.Tests.csproj | Adds new test project for Maestro.Common. |
| test/Maestro/Maestro.Common.Tests/GlobalUsings.cs | Adds NUnit global using for the new test project. |
| test/Maestro/Maestro.Common.Tests/GitRepoUrlUtilsTests.cs | Moves/extends URL conversion tests to cover new GitRepoUrlUtils APIs. |
| src/ProductConstructionService/ProductConstructionService.DependencyFlow/PullRequestUpdaters/PullRequestUpdater.cs | Displays user-facing PR URLs (web URLs) in outcome messages. |
| src/ProductConstructionService/ProductConstructionService.DependencyFlow/PullRequestUpdaters/DependencyPullRequestUpdater.cs | Returns accurate SubscriptionUpdateResult for “no updates” and prints web PR URLs. |
| src/ProductConstructionService/ProductConstructionService.DependencyFlow/PullRequestUpdaters/CodeFlowPullRequestUpdater.cs | Prints web PR URLs in user-facing messages. |
| src/ProductConstructionService/ProductConstructionService.Api/Api/v2020_02_20/Controllers/PullRequestController.cs | Replaces controller-local URL conversion with GitRepoUrlUtils and uses IsAzdoApiPrUrl. |
| src/ProductConstructionService/Microsoft.DotNet.ProductConstructionService.Client/Generated/ProductConstructionServiceApi.cs | Wires generated SubscriptionTriggerOutcomes client into the PCS client root. |
| src/Microsoft.DotNet.Darc/DarcLib/IBarApiClient.cs | Adds Darc-facing API to list recent subscription trigger outcomes. |
| src/Microsoft.DotNet.Darc/DarcLib/BarApiClient.cs | Implements the new outcome listing wrapper over PCS client. |
| src/Microsoft.DotNet.Darc/Darc/Options/TriggerSubscriptionsCommandLineOptions.cs | Adds --no-wait flag to skip waiting for outcomes. |
| src/Microsoft.DotNet.Darc/Darc/Operations/TriggerSubscriptionsOperation.cs | Adds polling/waiting logic to fetch and print trigger outcomes after triggering. |
| src/Maestro/Maestro.Data/BuildAssetRegistryContext.cs | Ensures SubscriptionOutcome.Date is read back as UTC to preserve correct offsets. |
| src/Maestro/Maestro.Common/GitRepoUrlUtils.cs | Centralizes PR API URL → web URL conversion and adds AzDO API PR URL detection. |
| arcade-services.slnx | Adds the new Maestro.Common.Tests project to the solution. |
Comment on lines
+63
to
+72
| // If we have the repo name, use it to replace the repo GUID in the URL | ||
| if (repoName != null) | ||
| { | ||
| WellKnownIds[match.Groups["repo"].Value] = orgName + "-" + repoName; | ||
| } | ||
|
|
||
| var org = ResolveWellKnownIds(match.Groups["org"].Value); | ||
| var project = ResolveWellKnownIds(match.Groups["project"].Value); | ||
| var repo = ResolveWellKnownIds(match.Groups["repo"].Value); | ||
| return $"https://dev.azure.com/{org}/{project}/_git/{repo}/pullrequest/{match.Groups["id"]}"; |
Member
Author
There was a problem hiding this comment.
will look into it. This file should be a CC of the original implementation so I didn't look into it too much
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
premun
reviewed
Jun 1, 2026
adamzip
reviewed
Jun 1, 2026
| using var cts = new CancellationTokenSource(OutcomeWaitTimeout); | ||
|
|
||
| int? expectedBuildId = _options.Build > 0 ? _options.Build : null; | ||
| await Task.WhenAll(subscriptions.Select(s => WaitForNewOutcomeAsync(s, expectedBuildId, triggerTime, cts.Token))); |
Contributor
There was a problem hiding this comment.
When several subscription id's are provided, do they all have to trigger the same build?
premun
approved these changes
Jun 2, 2026
adamzip
approved these changes
Jun 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#6189