From 96548b4722ebae483c2c7bd396995f2c633ded89 Mon Sep 17 00:00:00 2001 From: Parker Bibus Date: Mon, 4 May 2026 13:57:03 -0700 Subject: [PATCH] Rewrite framework dependency diff URLs to dotnet/dotnet (VMR) 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> --- build/regressions.blazor.config.yml | 24 +++++++++++++++++-- build/regressions.config.yml | 36 ++++++++++++++++++++++++++--- 2 files changed, 55 insertions(+), 5 deletions(-) diff --git a/build/regressions.blazor.config.yml b/build/regressions.blazor.config.yml index 3148b5c97..1ac31a7fa 100644 --- a/build/regressions.blazor.config.yml +++ b/build/regressions.blazor.config.yml @@ -68,7 +68,17 @@ templates: {%- if diff.RepositoryUrl == empty -%} `{{ diff.PreviousCommitHash | slice: 0, 7 }}...{{ diff.CurrentCommitHash | slice: 0, 7 }}` {%- else -%} - {{ diff.RepositoryUrl }}/compare/{{ diff.PreviousCommitHash }}...{{ diff.CurrentCommitHash }} + {%- assign repoUrl = diff.RepositoryUrl -%} + {%- comment -%} + Post-VMR (https://github.com/dotnet/dotnet), framework-level commits live in + dotnet/dotnet rather than the component repos. Rewrite the diff URL when the + dependency is one of the synthetic framework deps that Crank still records + with the legacy component-repo URL. + {%- endcomment -%} + {%- 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 }} {%- endif -%} {%- else -%} `{{ diff.PreviousCommitHash | slice: 0, 7 }}...{{ diff.CurrentCommitHash | slice: 0, 7 }}` @@ -115,7 +125,17 @@ templates: {%- if diff.RepositoryUrl == empty -%} `{{ diff.PreviousCommitHash | slice: 0, 7 }}...{{ diff.CurrentCommitHash | slice: 0, 7 }}` {%- else -%} - {{ diff.RepositoryUrl }}/compare/{{ diff.PreviousCommitHash }}...{{ diff.CurrentCommitHash }} + {%- assign repoUrl = diff.RepositoryUrl -%} + {%- comment -%} + Post-VMR (https://github.com/dotnet/dotnet), framework-level commits live in + dotnet/dotnet rather than the component repos. Rewrite the diff URL when the + dependency is one of the synthetic framework deps that Crank still records + with the legacy component-repo URL. + {%- endcomment -%} + {%- 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 }} {%- endif -%} {%- else -%} `{{ diff.PreviousCommitHash | slice: 0, 7 }}...{{ diff.CurrentCommitHash | slice: 0, 7 }}` diff --git a/build/regressions.config.yml b/build/regressions.config.yml index dc7f2ca03..2afe2a25a 100644 --- a/build/regressions.config.yml +++ b/build/regressions.config.yml @@ -205,7 +205,17 @@ templates: {%- if diff.RepositoryUrl == empty -%} `{{ diff.PreviousCommitHash | slice: 0, 7 }}...{{ diff.CurrentCommitHash | slice: 0, 7 }}` {%- else -%} - {{ diff.RepositoryUrl }}/compare/{{ diff.PreviousCommitHash }}...{{ diff.CurrentCommitHash }} + {%- assign repoUrl = diff.RepositoryUrl -%} + {%- comment -%} + Post-VMR (https://github.com/dotnet/dotnet), framework-level commits live in + dotnet/dotnet rather than the component repos. Rewrite the diff URL when the + dependency is one of the synthetic framework deps that Crank still records + with the legacy component-repo URL. + {%- endcomment -%} + {%- 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 }} {%- endif -%} {%- else -%} `{{ diff.PreviousCommitHash | slice: 0, 7 }}...{{ diff.CurrentCommitHash | slice: 0, 7 }}` @@ -253,7 +263,17 @@ templates: {%- if diff.RepositoryUrl == empty -%} `{{ diff.PreviousCommitHash | slice: 0, 7 }}...{{ diff.CurrentCommitHash | slice: 0, 7 }}` {%- else -%} - {{ diff.RepositoryUrl }}/compare/{{ diff.PreviousCommitHash }}...{{ diff.CurrentCommitHash }} + {%- assign repoUrl = diff.RepositoryUrl -%} + {%- comment -%} + Post-VMR (https://github.com/dotnet/dotnet), framework-level commits live in + dotnet/dotnet rather than the component repos. Rewrite the diff URL when the + dependency is one of the synthetic framework deps that Crank still records + with the legacy component-repo URL. + {%- endcomment -%} + {%- 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 }} {%- endif -%} {%- else -%} `{{ diff.PreviousCommitHash | slice: 0, 7 }}...{{ diff.CurrentCommitHash | slice: 0, 7 }}` @@ -300,7 +320,17 @@ templates: {%- if diff.RepositoryUrl == empty -%} `{{ diff.PreviousCommitHash | slice: 0, 7 }}...{{ diff.CurrentCommitHash | slice: 0, 7 }}` {%- else -%} - {{ diff.RepositoryUrl }}/compare/{{ diff.PreviousCommitHash }}...{{ diff.CurrentCommitHash }} + {%- assign repoUrl = diff.RepositoryUrl -%} + {%- comment -%} + Post-VMR (https://github.com/dotnet/dotnet), framework-level commits live in + dotnet/dotnet rather than the component repos. Rewrite the diff URL when the + dependency is one of the synthetic framework deps that Crank still records + with the legacy component-repo URL. + {%- endcomment -%} + {%- 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 }} {%- endif -%} {%- else -%} `{{ diff.PreviousCommitHash | slice: 0, 7 }}...{{ diff.CurrentCommitHash | slice: 0, 7 }}`