Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Display subscription trigger outcome in darc - #6339

#6339
Merged
dkurepa merged 11 commits into
dotnet:maindotnet/arcade-services:mainfrom
dkurepa:dkurepa/DarcSubOutputdkurepa/arcade-services:dkurepa/DarcSubOutputCopy head branch name to clipboard
Jun 2, 2026
Merged

Display subscription trigger outcome in darc#6339
dkurepa merged 11 commits into
dotnet:maindotnet/arcade-services:mainfrom
dkurepa:dkurepa/DarcSubOutputdkurepa/arcade-services:dkurepa/DarcSubOutputCopy head branch name to clipboard

Conversation

@dkurepa

@dkurepa dkurepa commented Jun 1, 2026

Copy link
Copy Markdown
Member

Copilot AI review requested due to automatic review settings June 1, 2026 07:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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-wait option, with polling to print outcomes after triggering.
  • Move PR API-URL-to-web-URL conversion into Maestro.Common.GitRepoUrlUtils and update PCS dependency flow/messages/controllers to use it.
  • Relocate the PR URL conversion tests into a new Maestro.Common.Tests project 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 thread src/Microsoft.DotNet.Darc/Darc/Operations/TriggerSubscriptionsOperation.cs Outdated
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"]}";

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This one sounds important

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

will look into it. This file should be a CC of the original implementation so I didn't look into it too much

dkurepa and others added 2 commits June 1, 2026 11:12
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Comment thread src/Maestro/Maestro.Common/GitRepoUrlUtils.cs
Comment thread src/Microsoft.DotNet.Darc/Darc/Operations/TriggerSubscriptionsOperation.cs Outdated
Comment thread src/Microsoft.DotNet.Darc/DarcLib/BarApiClient.cs Outdated
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)));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

When several subscription id's are provided, do they all have to trigger the same build?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

yes

@dkurepa
dkurepa merged commit a964fcc into dotnet:main Jun 2, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.