Skip to content

Rewrite framework dependency diff URLs to dotnet/dotnet (VMR)#2168

Merged
LoopedBard3 merged 3 commits into
aspnet:mainfrom
LoopedBard3:loopedbard3/regression-autofiling-flow
May 4, 2026
Merged

Rewrite framework dependency diff URLs to dotnet/dotnet (VMR)#2168
LoopedBard3 merged 3 commits into
aspnet:mainfrom
LoopedBard3:loopedbard3/regression-autofiling-flow

Conversation

@LoopedBard3
Copy link
Copy Markdown
Contributor

Why

The RegressionBot issues filed under dotnet/aspnetcore include a per-dependency Changes table whose diff links 404 for Microsoft.AspNetCore.App and Microsoft.NETCore.App. Concrete example: dotnet/aspnetcore#66568 shows three rows that share the same VMR commit hashes (0188adf...4c4e7f4):

Dependency Linked compare URL Works?
Microsoft.AspNetCore.Antiforgery.dll dotnet/dotnet/compare/0188adf...4c4e7f4 ✅ (already correct from VMR-stamped [AssemblyMetadata])
Microsoft.AspNetCore.App dotnet/aspnetcore/compare/0188adf...4c4e7f4
Microsoft.NETCore.App dotnet/runtime/compare/0188adf...4c4e7f4

After the move to the VMR (dotnet/dotnet), the .NET runtime and ASP.NET runtime are built from dotnet/dotnet, and the commit hashes Crank captures are dotnet/dotnet commits. The Crank agent (Microsoft.Crank.Agent/Startup.cs:3263, 3296) still hardcodes the legacy component-repo URLs (dotnet/aspnetcore, dotnet/runtime) for the synthetic Microsoft.AspNetCore.App and Microsoft.NETCore.App entries, so the rendered compare URLs are wrong.

What

Rewrite the URL at template-render time inside the Changes block of all five issue-body templates:

  • build/regressions.config.ymlrps, published-size, start-time
  • build/regressions.blazor.config.ymldownload-size, first-ui

The rewrite triggers when either:

  • the dependency name is one of Microsoft.AspNetCore.App / Microsoft.NETCore.App, or
  • the stored RepositoryUrl is one of the legacy component-repo URLs (https://github.com/dotnet/aspnetcore, https://github.com/dotnet/runtime).

Other dependencies (e.g. application-owned assemblies like Antiforgery.dll, or already-correct dotnet/dotnet entries from post-VMR assembly metadata) are left untouched.

{%- assign repoUrl = diff.RepositoryUrl -%}
{%- if diff.Names contains 'Microsoft.AspNetCore.App'
     or diff.Names contains 'Microsoft.NETCore.App'
     or repoUrl == 'https://github.com/dotnet/aspnetcore'
     or repoUrl == 'https://github.com/dotnet/runtime' -%}
    {%- assign repoUrl = 'https://github.com/dotnet/dotnet' -%}
{%- endif -%}
{{ repoUrl }}/compare/{{ diff.PreviousCommitHash }}...{{ diff.CurrentCommitHash }}

Validation

  • Both YAML configs parse (yaml.safe_load).
  • All affected templates parse and render through FluidParser against a synthetic 5-row regression covering: an application assembly with its own repo URL, an already-correct dotnet/dotnet assembly-metadata entry, the two synthetic framework deps with the wrong hardcoded URLs, and a hypothetical "other dep stamped with one of the legacy URLs" case.
  • Rendered output for each of the 5 affected templates: 0 leftover dotnet/aspnetcore / dotnet/runtime URLs, 4 correctly-attributed dotnet/dotnet URLs, 1 preserved aspnet/Benchmarks URL on the application assembly.

Scope / non-goals

  • Heals already-stored SQL data at render time, so when the bot updates an existing issue (e.g. to mark it recovered), the regenerated body is corrected too.
  • Doesn't fix the duplicate-runtime-assembly bug (Microsoft.AspNetCore.Antiforgery.dll showing up alongside the rolled-up Microsoft.AspNetCore.App) — that bug lives in the Crank agent's IsAspNetCoreDependency / IsNetCoreDependency predicates and is intentionally left for a future Crank-side change.
  • A Crank-side fix is deferred because there's in-flight work to add support for running benchmarks against individual ASP.NET Core builds (with the current VMR-sourced flow becoming an option). Once that lands, the right RepositoryUrl for Microsoft.AspNetCore.App / Microsoft.NETCore.App will become conditional on the build source rather than a hard flip — best to do that work together.

Rollout

The next scheduled run of build/regressionbot.yml (07:00/19:00 UTC) picks this up automatically — the pipeline rebuilds the bot from dotnet-crank@main and reads these YAMLs from the self checkout each run.

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

After the move to the VMR (dotnet/dotnet), the .NET runtime and ASP.NET
runtime are built from dotnet/dotnet, and the commit hashes Crank captures
are dotnet/dotnet commits. The Crank agent still hard-codes the old
component-repo URLs (dotnet/aspnetcore, dotnet/runtime) for the synthetic
Microsoft.AspNetCore.App and Microsoft.NETCore.App framework dependencies,
so the rendered compare URLs in regression issues 404 (e.g. issue
dotnet/aspnetcore#66568).

Rewrite the URL at template-render time inside the Changes block of all
five issue-body templates (rps, published-size, start-time in
regressions.config.yml; download-size, first-ui in regressions.blazor.config.yml).
The rewrite triggers when the dependency name is one of the two synthetic
framework names, or when the stored RepositoryUrl is one of the legacy
component-repo URLs. Other dependencies (e.g. application-owned assemblies
like Antiforgery.dll, or already-correct dotnet/dotnet entries from
post-VMR assembly metadata) are left untouched.

Verified by parsing both YAML configs through Fluid and rendering each
template against synthetic regressions covering all five diff cases:
0 leftover dotnet/aspnetcore or dotnet/runtime URLs, preserved
aspnet/Benchmarks URL on application assemblies, framework deps
correctly attributed to dotnet/dotnet.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates RegressionBot issue-body templates so dependency diff links for framework-level commits (e.g., Microsoft.AspNetCore.App / Microsoft.NETCore.App) point at the VMR (dotnet/dotnet) instead of legacy component repos, preventing 404 compare URLs in generated issues.

Changes:

  • Rewrites rendered compare URLs to https://github.com/dotnet/dotnet when dependency names indicate framework rollups or when RepositoryUrl is one of the legacy component repo URLs.
  • Applies the rewrite consistently across all affected “Changes” tables in the regression issue templates (rps, published-size, start-time, download-size, first-ui).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
build/regressions.config.yml Updates the rps/published-size/start-time issue templates to rewrite framework dependency compare links to dotnet/dotnet.
build/regressions.blazor.config.yml Updates the Blazor download-size/first-ui issue templates to rewrite framework dependency compare links to dotnet/dotnet.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@LoopedBard3 LoopedBard3 marked this pull request as ready for review May 4, 2026 21:36
Copy link
Copy Markdown
Contributor

@DrewScoggins DrewScoggins left a comment

Choose a reason for hiding this comment

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

LGTM. Assuming these are the only two templates that we need to update.

@LoopedBard3
Copy link
Copy Markdown
Contributor Author

Yup, these were the only ones I noticed to be updated.

@LoopedBard3 LoopedBard3 merged commit 6f252aa into aspnet:main May 4, 2026
2 checks passed
@LoopedBard3 LoopedBard3 deleted the loopedbard3/regression-autofiling-flow branch May 4, 2026 22:19
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.

3 participants