From 5aee1f6e780a82f723e4da64f3ba25847832b0dc Mon Sep 17 00:00:00 2001 From: Steve Sanderson Date: Wed, 26 Jun 2024 15:55:52 +0100 Subject: [PATCH 01/20] Limit MaxItemCount in Virtualize --- .../Web/src/Virtualization/Virtualize.cs | 57 ++++++++++++++++--- .../test/E2ETest/Tests/VirtualizationTest.cs | 19 +++++++ .../test/testassets/BasicTestApp/Index.razor | 1 + .../VirtualizationMaxItemCount.razor | 48 ++++++++++++++++ 4 files changed, 117 insertions(+), 8 deletions(-) create mode 100644 src/Components/test/testassets/BasicTestApp/VirtualizationMaxItemCount.razor diff --git a/src/Components/Web/src/Virtualization/Virtualize.cs b/src/Components/Web/src/Virtualization/Virtualize.cs index 61f22da4a73a..b0873be320cd 100644 --- a/src/Components/Web/src/Virtualization/Virtualize.cs +++ b/src/Components/Web/src/Virtualization/Virtualize.cs @@ -25,6 +25,14 @@ public sealed class Virtualize : ComponentBase, IVirtualizeJsCallbacks, I private int _visibleItemCapacity; + // If the client reports a viewport so large that it could show more than MaxItemCount items, + // we keep track of the "unused" capacity, which is the amount of blank space we want to leave + // at the bottom of the viewport (as a number of items). If we didn't leave this blank space, + // then the bottom spacer would always stay visible and the client would request more items in an + // infinite (but asynchronous) loop, as it would believe there are more items to render and + // enough space to render them into. + private int _unusedItemCapacity; + private int _itemCount; private int _loadedItemsStartIndex; @@ -118,6 +126,22 @@ public sealed class Virtualize : ComponentBase, IVirtualizeJsCallbacks, I [Parameter] public string SpacerElement { get; set; } = "div"; + /* + This API will be added in .NET 9 but cannot be added in a .NET 8 or earlier patch, + as we can't change public API in patches. + + /// + /// Gets or sets the maximum number of items that will be rendered, even if the client reports + /// that its viewport is large enough to show more. The default value is 100. + /// + /// This should only be used as a safeguard against excessive memory usage or large data loads. + /// Do not set this to a smaller number than you expect to fit on a realistic-sized window, because + /// that will leave a blank gap below and the user may not be able to see the rest of the content. + /// + [Parameter] + public int MaxItemCount { get; set; } = 100; + */ + /// /// Instructs the component to re-request data from its . /// This is useful if external data may have changed. There is no need to call this @@ -264,18 +288,23 @@ protected override void BuildRenderTree(RenderTreeBuilder builder) var itemsAfter = Math.Max(0, _itemCount - _visibleItemCapacity - _itemsBefore); builder.OpenElement(7, SpacerElement); - builder.AddAttribute(8, "style", GetSpacerStyle(itemsAfter)); + builder.AddAttribute(8, "style", GetSpacerStyle(itemsAfter, _unusedItemCapacity)); builder.AddElementReferenceCapture(9, elementReference => _spacerAfter = elementReference); builder.CloseElement(); } + private string GetSpacerStyle(int itemsInSpacer, int numItemsGapAbove) + => numItemsGapAbove == 0 + ? GetSpacerStyle(itemsInSpacer) + : $"height: {(itemsInSpacer * _itemSize).ToString(CultureInfo.InvariantCulture)}px; flex-shrink: 0; transform: translateY({(numItemsGapAbove * _itemSize).ToString(CultureInfo.InvariantCulture)}px);"; + private string GetSpacerStyle(int itemsInSpacer) => $"height: {(itemsInSpacer * _itemSize).ToString(CultureInfo.InvariantCulture)}px; flex-shrink: 0;"; void IVirtualizeJsCallbacks.OnBeforeSpacerVisible(float spacerSize, float spacerSeparation, float containerSize) { - CalcualteItemDistribution(spacerSize, spacerSeparation, containerSize, out var itemsBefore, out var visibleItemCapacity); + CalcualteItemDistribution(spacerSize, spacerSeparation, containerSize, out var itemsBefore, out var visibleItemCapacity, out var unusedItemCapacity); // Since we know the before spacer is now visible, we absolutely have to slide the window up // by at least one element. If we're not doing that, the previous item size info we had must @@ -286,12 +315,12 @@ void IVirtualizeJsCallbacks.OnBeforeSpacerVisible(float spacerSize, float spacer itemsBefore--; } - UpdateItemDistribution(itemsBefore, visibleItemCapacity); + UpdateItemDistribution(itemsBefore, visibleItemCapacity, unusedItemCapacity); } void IVirtualizeJsCallbacks.OnAfterSpacerVisible(float spacerSize, float spacerSeparation, float containerSize) { - CalcualteItemDistribution(spacerSize, spacerSeparation, containerSize, out var itemsAfter, out var visibleItemCapacity); + CalcualteItemDistribution(spacerSize, spacerSeparation, containerSize, out var itemsAfter, out var visibleItemCapacity, out var unusedItemCapacity); var itemsBefore = Math.Max(0, _itemCount - itemsAfter - visibleItemCapacity); @@ -304,7 +333,7 @@ void IVirtualizeJsCallbacks.OnAfterSpacerVisible(float spacerSize, float spacerS itemsBefore++; } - UpdateItemDistribution(itemsBefore, visibleItemCapacity); + UpdateItemDistribution(itemsBefore, visibleItemCapacity, unusedItemCapacity); } private void CalcualteItemDistribution( @@ -312,7 +341,8 @@ private void CalcualteItemDistribution( float spacerSeparation, float containerSize, out int itemsInSpacer, - out int visibleItemCapacity) + out int visibleItemCapacity, + out int unusedItemCapacity) { if (_lastRenderedItemCount > 0) { @@ -326,11 +356,21 @@ private void CalcualteItemDistribution( _itemSize = ItemSize; } + // This AppContext data exists as a stopgap for .NET 8 and earlier, since this is being added in a patch + // where we can't add new public API. + var maxItemCount = AppContext.GetData("Microsoft.AspNetCore.Components.Web.Virtualization.Virtualize.MaxItemCount") switch + { + int val => val, // In .NET 9, this will be Math.Min(val, MaxItemCount) + _ => 1000 // In .NET 9, this will be MaxItemCount + }; + itemsInSpacer = Math.Max(0, (int)Math.Floor(spacerSize / _itemSize) - OverscanCount); visibleItemCapacity = (int)Math.Ceiling(containerSize / _itemSize) + 2 * OverscanCount; + unusedItemCapacity = Math.Max(0, visibleItemCapacity - maxItemCount); + visibleItemCapacity -= unusedItemCapacity; } - private void UpdateItemDistribution(int itemsBefore, int visibleItemCapacity) + private void UpdateItemDistribution(int itemsBefore, int visibleItemCapacity, int unusedItemCapacity) { // If the itemcount just changed to a lower number, and we're already scrolled past the end of the new // reduced set of items, clamp the scroll position to the new maximum @@ -340,10 +380,11 @@ private void UpdateItemDistribution(int itemsBefore, int visibleItemCapacity) } // If anything about the offset changed, re-render - if (itemsBefore != _itemsBefore || visibleItemCapacity != _visibleItemCapacity) + if (itemsBefore != _itemsBefore || visibleItemCapacity != _visibleItemCapacity || unusedItemCapacity != _unusedItemCapacity) { _itemsBefore = itemsBefore; _visibleItemCapacity = visibleItemCapacity; + _unusedItemCapacity = unusedItemCapacity; var refreshTask = RefreshDataCoreAsync(renderOnSuccess: true); if (!refreshTask.IsCompleted) diff --git a/src/Components/test/E2ETest/Tests/VirtualizationTest.cs b/src/Components/test/E2ETest/Tests/VirtualizationTest.cs index 46e55d6318a8..a84bb1212f61 100644 --- a/src/Components/test/E2ETest/Tests/VirtualizationTest.cs +++ b/src/Components/test/E2ETest/Tests/VirtualizationTest.cs @@ -262,6 +262,25 @@ public void CanRenderHtmlTable() Assert.Contains(expectedInitialSpacerStyle, bottomSpacer.GetAttribute("style")); } + [Fact] + public void CanLimitMaxItemsRendered() + { + Browser.MountTestComponent(); + + // Despite having a 600px tall scroll area and 30px high items (600/30=20), + // we only render 10 items due to the MaxItemCount setting + var scrollArea = Browser.Exists(By.Id("virtualize-scroll-area")); + var getItems = () => scrollArea.FindElements(By.ClassName("my-item")); + Browser.Equal(10, () => getItems().Count); + Browser.Equal("Id: 0; Name: Thing 0", () => getItems().First().Text); + + // Scrolling still works and loads new data, though there's no guarantee about + // exactly how many items will show up at any one time + Browser.ExecuteJavaScript("document.getElementById('virtualize-scroll-area').scrollTop = 300;"); + Browser.NotEqual("Id: 0; Name: Thing 0", () => getItems().First().Text); + Browser.True(() => getItems().Count > 3 && getItems().Count <= 10); + } + [Fact] public void CanMutateDataInPlace_Sync() { diff --git a/src/Components/test/testassets/BasicTestApp/Index.razor b/src/Components/test/testassets/BasicTestApp/Index.razor index d0382fbdc547..fabbf037e349 100644 --- a/src/Components/test/testassets/BasicTestApp/Index.razor +++ b/src/Components/test/testassets/BasicTestApp/Index.razor @@ -108,6 +108,7 @@ + diff --git a/src/Components/test/testassets/BasicTestApp/VirtualizationMaxItemCount.razor b/src/Components/test/testassets/BasicTestApp/VirtualizationMaxItemCount.razor new file mode 100644 index 000000000000..3c3d793829f0 --- /dev/null +++ b/src/Components/test/testassets/BasicTestApp/VirtualizationMaxItemCount.razor @@ -0,0 +1,48 @@ +@implements IDisposable +

+ MaxItemCount is a safeguard against the client reporting a giant viewport and causing the server to perform a + correspondingly giant data load and then tracking a lot of render state. +

+ +

+ If MaxItemCount is exceeded (which it never should be for a well-behaved client), we don't offer any guarantees + that the behavior will be nice for the end user. We just guarantee to limit the .NET-side workload. As such this + E2E test deliberately does a bad thing of setting MaxItemCount to a low value for test purposes. Applications + should not do this. +

+ +
+ @* In .NET 8 and earlier, the E2E test uses an AppContext.SetData call to set MaxItemCount *@ + @* In .NET 9 onwards, it's a Virtualize component parameter *@ + +
+ Id: @context.Id; Name: @context.Name +
+
+
+ +@code { + protected override void OnInitialized() + { + // This relies on Xunit's default behavior of running tests in the same collection sequentially, + // not in parallel. From .NET 9 onwards this can be removed in favour of a Virtualize parameter. + AppContext.SetData("Microsoft.AspNetCore.Components.Web.Virtualization.Virtualize.MaxItemCount", 10); + } + + private async ValueTask> GetItems(ItemsProviderRequest request) + { + const int numThings = 100000; + + await Task.Delay(100); + return new ItemsProviderResult( + Enumerable.Range(request.StartIndex, request.Count).Select(i => new MyThing(i, $"Thing {i}")), + numThings); + } + + record MyThing(int Id, string Name); + + public void Dispose() + { + AppContext.SetData("Microsoft.AspNetCore.Components.Web.Virtualization.Virtualize.MaxItemCount", null); + } +} From 61f9a2848ae0fa128c27cd2b5b603b5ae47d69ac Mon Sep 17 00:00:00 2001 From: vseanreesermsft <78103370+vseanreesermsft@users.noreply.github.com> Date: Tue, 2 Jul 2024 13:32:28 -0700 Subject: [PATCH 02/20] Update branding to 8.0.8 (#56577) --- eng/Versions.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/Versions.props b/eng/Versions.props index 37cdd2d80e04..be98f33f4169 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -8,7 +8,7 @@ 8 0 - 7 + 8 false From 3ffafee69a429d1ab35a9794377742c462b76446 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20K=C3=B6plinger?= Date: Tue, 2 Jul 2024 22:33:25 +0200 Subject: [PATCH 03/20] [release/8.0] Bump to macos-12 build image (#56270) * Bump to macos-12 build image AzDO will remove macos-11 in about two weeks: https://learn.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops&tabs=yaml#recent-updates * Update xcode --- .azure/pipelines/jobs/default-build.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.azure/pipelines/jobs/default-build.yml b/.azure/pipelines/jobs/default-build.yml index 8a8755e69335..af28d284351f 100644 --- a/.azure/pipelines/jobs/default-build.yml +++ b/.azure/pipelines/jobs/default-build.yml @@ -107,7 +107,7 @@ jobs: # See https://github.com/dotnet/arcade/blob/master/Documentation/ChoosingAMachinePool.md pool: ${{ if eq(parameters.agentOs, 'macOS') }}: - vmImage: macOS-11 + vmImage: macOS-12 ${{ if eq(parameters.agentOs, 'Linux') }}: ${{ if eq(parameters.useHostedUbuntu, true) }}: vmImage: ubuntu-20.04 @@ -167,8 +167,8 @@ jobs: - script: df -h displayName: Disk size - ${{ if eq(parameters.agentOs, 'macOS') }}: - - script: sudo xcode-select -s /Applications/Xcode_12.5.1.app/Contents/Developer - displayName: Use XCode 12.5.1 + - script: sudo xcode-select -s /Applications/Xcode_14.2.0.app/Contents/Developer + displayName: Use XCode 14.2.0 - checkout: self clean: true - ${{ if and(eq(parameters.agentOs, 'Windows'), eq(parameters.isAzDOTestingJob, true)) }}: @@ -329,7 +329,7 @@ jobs: pool: ${{ if eq(parameters.agentOs, 'macOS') }}: name: Azure Pipelines - image: macOS-11 + image: macOS-12 os: macOS ${{ if eq(parameters.agentOs, 'Linux') }}: name: $(DncEngInternalBuildPool) @@ -393,8 +393,8 @@ jobs: - script: df -h displayName: Disk size - ${{ if eq(parameters.agentOs, 'macOS') }}: - - script: sudo xcode-select -s /Applications/Xcode_12.5.1.app/Contents/Developer - displayName: Use XCode 12.5.1 + - script: sudo xcode-select -s /Applications/Xcode_14.2.0.app/Contents/Developer + displayName: Use XCode 14.2.0 - checkout: self clean: true - ${{ if and(eq(parameters.agentOs, 'Windows'), eq(parameters.isAzDOTestingJob, true)) }}: From ada17d6b04a17be64b4a772e92ddb2ba0389bdad Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 2 Jul 2024 13:49:05 -0700 Subject: [PATCH 04/20] Quarantine CanLaunchPhotinoWebViewAndClickButton (#56300) For some reason retry isn't working for this test? Or it's still failing a lot even with a retry. Co-authored-by: Brennan --- src/Components/WebView/test/E2ETest/WebViewManagerE2ETests.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Components/WebView/test/E2ETest/WebViewManagerE2ETests.cs b/src/Components/WebView/test/E2ETest/WebViewManagerE2ETests.cs index 0f944bb5795d..65fb5cac99f6 100644 --- a/src/Components/WebView/test/E2ETest/WebViewManagerE2ETests.cs +++ b/src/Components/WebView/test/E2ETest/WebViewManagerE2ETests.cs @@ -19,6 +19,7 @@ public class WebViewManagerE2ETests(ITestOutputHelper output) [ConditionalFact] [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX, SkipReason = "On Helix/Ubuntu the native Photino assemblies can't be found, and on macOS it can't detect when the WebView is ready")] + [QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/50802")] public async Task CanLaunchPhotinoWebViewAndClickButton() { var photinoTestProgramExePath = typeof(WebViewManagerE2ETests).Assembly.Location; From a2c24f946dca29fe70ad4f720f83f3bb75001b6f Mon Sep 17 00:00:00 2001 From: Stephen Halter Date: Tue, 2 Jul 2024 13:49:13 -0700 Subject: [PATCH 05/20] [release/8.0] Don't require latest runtime patch for Blazor DevServer (#56181) * Don't require latest runtime patch for Blazor DevServer * Use exact runtime for non-servicing builds of Blazor DevServer * Publish to "trimmed" instead of "trimmed-or-threading" - This fixes a regression introduced by https://github.com/dotnet/aspnetcore/pull/54655 --- ...soft.AspNetCore.Components.WebAssembly.DevServer.csproj | 7 +++++-- .../DevServer/src/blazor-devserver.runtimeconfig.json.in | 2 +- .../Microsoft.AspNetCore.Components.E2ETests.csproj | 2 +- .../test/E2ETest/Tests/RemoteAuthenticationTest.cs | 4 ++-- .../test/E2ETest/Tests/WebAssemblyPrerenderedTest.cs | 2 +- 5 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/Components/WebAssembly/DevServer/src/Microsoft.AspNetCore.Components.WebAssembly.DevServer.csproj b/src/Components/WebAssembly/DevServer/src/Microsoft.AspNetCore.Components.WebAssembly.DevServer.csproj index 8267a699183b..ff17430a5092 100644 --- a/src/Components/WebAssembly/DevServer/src/Microsoft.AspNetCore.Components.WebAssembly.DevServer.csproj +++ b/src/Components/WebAssembly/DevServer/src/Microsoft.AspNetCore.Components.WebAssembly.DevServer.csproj @@ -36,8 +36,11 @@ - <_RuntimeConfigProperties> - SharedFxVersion=$(SharedFxVersion); + <_RuntimeConfigProperties Condition="'$(IsServicingBuild)' == 'true'"> + FrameworkVersion=$(AspNetCoreMajorMinorVersion).0; + + <_RuntimeConfigProperties Condition="'$(IsServicingBuild)' != 'true'"> + FrameworkVersion=$(SharedFxVersion); <_RuntimeConfigPath>$(OutputPath)blazor-devserver.runtimeconfig.json diff --git a/src/Components/WebAssembly/DevServer/src/blazor-devserver.runtimeconfig.json.in b/src/Components/WebAssembly/DevServer/src/blazor-devserver.runtimeconfig.json.in index a509538b85f4..5799aa6485a9 100644 --- a/src/Components/WebAssembly/DevServer/src/blazor-devserver.runtimeconfig.json.in +++ b/src/Components/WebAssembly/DevServer/src/blazor-devserver.runtimeconfig.json.in @@ -3,7 +3,7 @@ "tfm": "net8.0", "framework": { "name": "Microsoft.AspNetCore.App", - "version": "${SharedFxVersion}" + "version": "${FrameworkVersion}" }, "rollForwardOnNoCandidateFx": 2 } diff --git a/src/Components/test/E2ETest/Microsoft.AspNetCore.Components.E2ETests.csproj b/src/Components/test/E2ETest/Microsoft.AspNetCore.Components.E2ETests.csproj index b8ad7c0303a4..dd3462e10abf 100644 --- a/src/Components/test/E2ETest/Microsoft.AspNetCore.Components.E2ETests.csproj +++ b/src/Components/test/E2ETest/Microsoft.AspNetCore.Components.E2ETests.csproj @@ -89,7 +89,7 @@ + Properties="BuildProjectReferences=false;TestTrimmedOrMultithreadingApps=true;PublishDir=$(MSBuildThisFileDirectory)$(OutputPath)trimmed\Components.TestServer\;" /> diff --git a/src/Components/test/E2ETest/Tests/RemoteAuthenticationTest.cs b/src/Components/test/E2ETest/Tests/RemoteAuthenticationTest.cs index 6915b0915198..525f8f774c37 100644 --- a/src/Components/test/E2ETest/Tests/RemoteAuthenticationTest.cs +++ b/src/Components/test/E2ETest/Tests/RemoteAuthenticationTest.cs @@ -21,7 +21,7 @@ public class RemoteAuthenticationTest : { public readonly bool TestTrimmedApps = typeof(ToggleExecutionModeServerFixture<>).Assembly .GetCustomAttributes() - .First(m => m.Key == "Microsoft.AspNetCore.E2ETesting.TestTrimmedOrMultithreadingApps") + .First(m => m.Key == "Microsoft.AspNetCore.E2ETesting.TestTrimmedApps") .Value == "true"; public RemoteAuthenticationTest( @@ -67,7 +67,7 @@ private static IHost BuildPublishedWebHost(string[] args) => private static string GetPublishedContentRoot(Assembly assembly) { - var contentRoot = Path.Combine(AppContext.BaseDirectory, "trimmed-or-threading", assembly.GetName().Name); + var contentRoot = Path.Combine(AppContext.BaseDirectory, "trimmed", assembly.GetName().Name); if (!Directory.Exists(contentRoot)) { diff --git a/src/Components/test/E2ETest/Tests/WebAssemblyPrerenderedTest.cs b/src/Components/test/E2ETest/Tests/WebAssemblyPrerenderedTest.cs index 1b108484b9db..9007e18ab483 100644 --- a/src/Components/test/E2ETest/Tests/WebAssemblyPrerenderedTest.cs +++ b/src/Components/test/E2ETest/Tests/WebAssemblyPrerenderedTest.cs @@ -56,7 +56,7 @@ private void WaitUntilLoaded() private static string GetPublishedContentRoot(Assembly assembly) { - var contentRoot = Path.Combine(AppContext.BaseDirectory, "trimmed-or-threading", assembly.GetName().Name); + var contentRoot = Path.Combine(AppContext.BaseDirectory, "trimmed", assembly.GetName().Name); if (!Directory.Exists(contentRoot)) { From 54df5358b60ce926651e0f0253f5c92a7fd4926c Mon Sep 17 00:00:00 2001 From: William Godbe Date: Mon, 8 Jul 2024 13:19:16 -0700 Subject: [PATCH 06/20] [release/8.0] Chain runtime .Msi's instead of .Exe's in hosting bundle (#56459) * Chain runtime .msi's instead of .exe's in Hosting Bundle * Fixup * Remove unneeded .msi codes * Remove more unneeded props * Feedback * Fix typo * Another typo --- .../WindowsHostingBundle/DotNetCore.wxs | 96 ++++++++++-------- .../WindowsHostingBundle/Product.targets | 99 ++++++++++--------- .../WindowsHostingBundle/SharedFramework.wxs | 50 ++-------- .../WindowsHostingBundle.wixproj | 37 +------ 4 files changed, 122 insertions(+), 160 deletions(-) diff --git a/src/Installers/Windows/WindowsHostingBundle/DotNetCore.wxs b/src/Installers/Windows/WindowsHostingBundle/DotNetCore.wxs index dab0deb92e35..932d6bab74de 100644 --- a/src/Installers/Windows/WindowsHostingBundle/DotNetCore.wxs +++ b/src/Installers/Windows/WindowsHostingBundle/DotNetCore.wxs @@ -2,62 +2,80 @@ - - - - - - - - + InstallCondition="(NativeMachine="$(var.NativeMachine_arm64)") AND (NOT OPT_NO_RUNTIME OR OPT_NO_RUNTIME="0")"> + - - + InstallCondition="VersionNT64 AND NOT (NativeMachine="$(var.NativeMachine_arm64)") AND (NOT OPT_NO_RUNTIME OR OPT_NO_RUNTIME="0")"> + - - + InstallCondition="(NOT OPT_NO_RUNTIME OR OPT_NO_RUNTIME="0") AND (NOT OPT_NO_X86 OR OPT_NO_X86="0")"> + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Installers/Windows/WindowsHostingBundle/Product.targets b/src/Installers/Windows/WindowsHostingBundle/Product.targets index 2fe40ebe38a6..3b1cf82c1076 100644 --- a/src/Installers/Windows/WindowsHostingBundle/Product.targets +++ b/src/Installers/Windows/WindowsHostingBundle/Product.targets @@ -7,21 +7,32 @@ - - - x64 + DotNetRedistLtsInstallerx64 - $(MicrosoftNETCoreAppRuntimeVersion) - - x86 + DotNetRedistLtsInstallerx86 - $(MicrosoftNETCoreAppRuntimeVersion) - - arm64 + DotNetRedistLtsInstallerarm64 - $(MicrosoftNETCoreAppRuntimeVersion) + + + DotNetRedistHostInstallerx64 + + + DotNetRedistHostInstallerx86 + + + DotNetRedistHostInstallerarm64 + + + DotNetRedistHostfxrInstallerx64 + + + DotNetRedistHostfxrInstallerx86 + + + DotNetRedistHostfxrInstallerarm64 @@ -32,14 +43,32 @@ - - dotnet-runtime-$(MicrosoftNETCoreAppRuntimeVersion)-win-x64.exe + + dotnet-runtime-$(MicrosoftNETCoreAppRuntimeVersion)-win-x64.msi + + + dotnet-runtime-$(MicrosoftNETCoreAppRuntimeVersion)-win-x86.msi + + + dotnet-runtime-$(MicrosoftNETCoreAppRuntimeVersion)-win-arm64.msi + + + dotnet-host-$(MicrosoftNETCoreAppRuntimeVersion)-win-x64.msi - - dotnet-runtime-$(MicrosoftNETCoreAppRuntimeVersion)-win-x86.exe + + dotnet-host-$(MicrosoftNETCoreAppRuntimeVersion)-win-x86.msi - - dotnet-runtime-$(MicrosoftNETCoreAppRuntimeVersion)-win-arm64.exe + + dotnet-host-$(MicrosoftNETCoreAppRuntimeVersion)-win-arm64.msi + + + dotnet-hostfxr-$(MicrosoftNETCoreAppRuntimeVersion)-win-x64.msi + + + dotnet-hostfxr-$(MicrosoftNETCoreAppRuntimeVersion)-win-x86.msi + + + dotnet-hostfxr-$(MicrosoftNETCoreAppRuntimeVersion)-win-arm64.msi @@ -74,42 +103,16 @@ - - - - - - DotNetRedistLtsInstallerProductVersion%(Platforms.Identity) - DotNetRedistLtsInstallerProductCode%(Platforms.Identity) - DotNetRedistLtsInstallerUpgradeCode%(Platforms.Identity) - - - - - - - - - - - - - - $(DefineConstants);DotNetRedistLtsInstallerx64=$(DotNetRedistLtsInstallerx64) - $(DefineConstants);DotNetRedistLtsInstallerProductVersionx64=$(DotNetRedistLtsInstallerProductVersionx64) - $(DefineConstants);DotNetRedistLtsInstallerProductCodex64=$(DotNetRedistLtsInstallerProductCodex64) - $(DefineConstants);DotNetRedistLtsInstallerUpgradeCodex64=$(DotNetRedistLtsInstallerUpgradeCodex64) $(DefineConstants);DotNetRedistLtsInstallerx86=$(DotNetRedistLtsInstallerx86) - $(DefineConstants);DotNetRedistLtsInstallerProductVersionx86=$(DotNetRedistLtsInstallerProductVersionx86) - $(DefineConstants);DotNetRedistLtsInstallerProductCodex86=$(DotNetRedistLtsInstallerProductCodex86) - $(DefineConstants);DotNetRedistLtsInstallerUpgradeCodex86=$(DotNetRedistLtsInstallerUpgradeCodex86) $(DefineConstants);DotNetRedistLtsInstallerarm64=$(DotNetRedistLtsInstallerarm64) - $(DefineConstants);DotNetRedistLtsInstallerProductVersionarm64=$(DotNetRedistLtsInstallerProductVersionarm64) - $(DefineConstants);DotNetRedistLtsInstallerProductCodearm64=$(DotNetRedistLtsInstallerProductCodearm64) - $(DefineConstants);DotNetRedistLtsInstallerUpgradeCodearm64=$(DotNetRedistLtsInstallerUpgradeCodearm64) + $(DefineConstants);DotNetRedistHostInstallerx64=$(DotNetRedistHostInstallerx64) + $(DefineConstants);DotNetRedistHostInstallerx86=$(DotNetRedistHostInstallerx86) + $(DefineConstants);DotNetRedistHostInstallerarm64=$(DotNetRedistHostInstallerarm64) + $(DefineConstants);DotNetRedistHostfxrInstallerx64=$(DotNetRedistHostfxrInstallerx64) + $(DefineConstants);DotNetRedistHostfxrInstallerx86=$(DotNetRedistHostfxrInstallerx86) + $(DefineConstants);DotNetRedistHostfxrInstallerarm64=$(DotNetRedistHostfxrInstallerarm64) diff --git a/src/Installers/Windows/WindowsHostingBundle/SharedFramework.wxs b/src/Installers/Windows/WindowsHostingBundle/SharedFramework.wxs index 7cd6db76c9fb..9523cd755f45 100644 --- a/src/Installers/Windows/WindowsHostingBundle/SharedFramework.wxs +++ b/src/Installers/Windows/WindowsHostingBundle/SharedFramework.wxs @@ -1,63 +1,33 @@ - - - - - - - + - - + InstallCondition="(NativeMachine="$(var.NativeMachine_arm64)") AND (NOT OPT_NO_SHAREDFX OR OPT_NO_SHAREDFX="0")"> + - - + InstallCondition="VersionNT64 AND NOT (NativeMachine="$(var.NativeMachine_arm64)") AND (NOT OPT_NO_SHAREDFX OR OPT_NO_SHAREDFX="0")"> + - - + InstallCondition="(NOT OPT_NO_SHAREDFX OR OPT_NO_SHAREDFX="0") AND (NOT OPT_NO_X86 OR OPT_NO_X86="0")"> + diff --git a/src/Installers/Windows/WindowsHostingBundle/WindowsHostingBundle.wixproj b/src/Installers/Windows/WindowsHostingBundle/WindowsHostingBundle.wixproj index f3b8e2fa1e6d..cfb32de2dc5d 100644 --- a/src/Installers/Windows/WindowsHostingBundle/WindowsHostingBundle.wixproj +++ b/src/Installers/Windows/WindowsHostingBundle/WindowsHostingBundle.wixproj @@ -60,7 +60,7 @@ True true - @@ -103,17 +103,17 @@ - + x64 SharedFxRedistInstallerx64 $(SharedFxPackageVersion) - + x86 SharedFxRedistInstallerx86 $(SharedFxPackageVersion) - + arm64 SharedFxRedistInstallerarm64 $(SharedFxPackageVersion) @@ -139,39 +139,10 @@ - - - SharedFxInstallerProductVersionx64 - SharedFxInstallerProductCodex64 - - - SharedFxInstallerProductVersionx86 - SharedFxInstallerProductCodex86 - - - SharedFxInstallerProductVersionarm64 - SharedFxInstallerProductCodearm64 - - - - - - - - - - - $(DefineConstants);SharedFxRedistInstallerx64=$(SharedFxRedistInstallerx64) - $(DefineConstants);SharedFxInstallerProductVersionx64=$(SharedFxInstallerProductVersionx64) - $(DefineConstants);SharedFxInstallerProductCodex64=$(SharedFxInstallerProductCodex64) $(DefineConstants);SharedFxRedistInstallerx86=$(SharedFxRedistInstallerx86) - $(DefineConstants);SharedFxInstallerProductVersionx86=$(SharedFxInstallerProductVersionx86) - $(DefineConstants);SharedFxInstallerProductCodex86=$(SharedFxInstallerProductCodex86) $(DefineConstants);SharedFxRedistInstallerarm64=$(SharedFxRedistInstallerarm64) - $(DefineConstants);SharedFxInstallerProductVersionarm64=$(SharedFxInstallerProductVersionarm64) - $(DefineConstants);SharedFxInstallerProductCodearm64=$(SharedFxInstallerProductCodearm64) From 123e69ce581cb33fd86c7cd2f8d4ba95e667885c Mon Sep 17 00:00:00 2001 From: Brennan Conroy Date: Mon, 8 Jul 2024 20:57:57 +0000 Subject: [PATCH 07/20] Merged PR 40657: Fix exit AcceptLoop in Http.Sys If an exception occurs during request processing we weren't exiting the accept loop which resulted in duplicating the accept loop. --- src/Servers/HttpSys/src/MessagePump.cs | 33 ++++++++++++++++---------- 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/src/Servers/HttpSys/src/MessagePump.cs b/src/Servers/HttpSys/src/MessagePump.cs index 5cf1c88f0b12..695c45d3b4e9 100644 --- a/src/Servers/HttpSys/src/MessagePump.cs +++ b/src/Servers/HttpSys/src/MessagePump.cs @@ -279,29 +279,38 @@ private async Task ExecuteAsync() continue; } - try + if (_preferInlineScheduling) { - if (_preferInlineScheduling) + try { await requestContext.ExecuteAsync(); } - else + catch (Exception ex) + { + // Request processing failed + // Log the error message, release throttle and move on + Log.RequestListenerProcessError(_messagePump._logger, ex); + } + } + else + { + try { // Queue another accept before we execute the request ThreadPool.UnsafeQueueUserWorkItem(this, preferLocal: false); // Use this thread to start the execution of the request (avoid the double threadpool dispatch) await requestContext.ExecuteAsync(); - - // We're done with this thread - return; } - } - catch (Exception ex) - { - // Request processing failed - // Log the error message, release throttle and move on - Log.RequestListenerProcessError(_messagePump._logger, ex); + catch (Exception ex) + { + // Request processing failed + // Log the error message, release throttle and move on + Log.RequestListenerProcessError(_messagePump._logger, ex); + } + + // We're done with this thread, accept loop was continued via ThreadPool.UnsafeQueueUserWorkItem + return; } } From ed3508f895a33b8ebcddc729f41c39a756c7499d Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Mon, 8 Jul 2024 14:48:47 -0700 Subject: [PATCH 08/20] [release/8.0] Switch to dSAS for internal runtimes (#56488) * Update arcade * Switch to dSAS for internal runtimes * Enable internal sources for source build * Fixup for publishing in arcade 8.0 * Fix spaciong --- .azure/pipelines/ci.yml | 2 +- .azure/pipelines/jobs/default-build.yml | 17 ++++++-- eng/Version.Details.xml | 20 ++++----- eng/Versions.props | 6 +-- eng/common/post-build/publish-using-darc.ps1 | 15 +++---- .../job/publish-build-assets.yml | 12 +++--- .../templates-official/job/source-build.yml | 8 ++++ .../job/source-index-stage1.yml | 16 +++---- .../templates-official/jobs/source-build.yml | 8 ++++ .../post-build/post-build.yml | 8 ++-- .../steps/enable-internal-runtimes.yml | 28 ++++++++++++ .../steps/get-delegation-sas.yml | 43 +++++++++++++++++++ .../steps/get-federated-access-token.yml | 28 ++++++++++++ .../templates/job/publish-build-assets.yml | 12 +++--- eng/common/templates/job/source-build.yml | 8 ++++ .../templates/job/source-index-stage1.yml | 11 ++--- eng/common/templates/jobs/source-build.yml | 8 ++++ .../templates/post-build/post-build.yml | 8 ++-- .../post-build/setup-maestro-vars.yml | 28 ++++++------ .../steps/enable-internal-runtimes.yml | 28 ++++++++++++ .../templates/steps/get-delegation-sas.yml | 43 +++++++++++++++++++ .../steps/get-federated-access-token.yml | 28 ++++++++++++ global.json | 4 +- 23 files changed, 316 insertions(+), 73 deletions(-) create mode 100644 eng/common/templates-official/steps/enable-internal-runtimes.yml create mode 100644 eng/common/templates-official/steps/get-delegation-sas.yml create mode 100644 eng/common/templates-official/steps/get-federated-access-token.yml create mode 100644 eng/common/templates/steps/enable-internal-runtimes.yml create mode 100644 eng/common/templates/steps/get-delegation-sas.yml create mode 100644 eng/common/templates/steps/get-federated-access-token.yml diff --git a/.azure/pipelines/ci.yml b/.azure/pipelines/ci.yml index b72915d1d416..80db7eea0830 100644 --- a/.azure/pipelines/ci.yml +++ b/.azure/pipelines/ci.yml @@ -101,7 +101,6 @@ variables: value: /bl:artifacts/log/Release/Build.Installers.binlog - name: WindowsArm64InstallersLogArgs value: /bl:artifacts/log/Release/Build.Installers.Arm64.binlog -- group: DotNetBuilds storage account read tokens - name: _InternalRuntimeDownloadArgs value: -RuntimeSourceFeed https://dotnetbuilds.blob.core.windows.net/internal -RuntimeSourceFeedKey $(dotnetbuilds-internal-container-read-token-base64) @@ -675,6 +674,7 @@ extends: # Source build - template: /eng/common/templates-official/job/source-build.yml@self parameters: + enableInternalSources: true platform: name: 'Managed' container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream9' diff --git a/.azure/pipelines/jobs/default-build.yml b/.azure/pipelines/jobs/default-build.yml index af28d284351f..0570bfc1d372 100644 --- a/.azure/pipelines/jobs/default-build.yml +++ b/.azure/pipelines/jobs/default-build.yml @@ -210,7 +210,6 @@ jobs: # Include the variables we always want. COMPlus_DbgEnableMiniDump: 1 COMPlus_DbgMiniDumpName: "$(System.DefaultWorkingDirectory)/dotnet-%d.%t.core" - DotNetBuildsInternalReadSasToken: $(dotnetbuilds-internal-container-read-token) # Expand provided `env:` properties, if any. ${{ if step.env }}: ${{ step.env }} @@ -222,14 +221,12 @@ jobs: env: COMPlus_DbgEnableMiniDump: 1 COMPlus_DbgMiniDumpName: "$(System.DefaultWorkingDirectory)/dotnet-%d.%t.core" - DotNetBuildsInternalReadSasToken: $(dotnetbuilds-internal-container-read-token) - ${{ if ne(parameters.agentOs, 'Windows') }}: - script: $(BuildDirectory)/build.sh --ci --nobl --configuration $(BuildConfiguration) $(BuildScriptArgs) displayName: Run build.sh env: COMPlus_DbgEnableMiniDump: 1 COMPlus_DbgMiniDumpName: "$(System.DefaultWorkingDirectory)/dotnet-%d.%t.core" - DotNetBuildsInternalReadSasToken: $(dotnetbuilds-internal-container-read-token) - ${{ parameters.afterBuild }} @@ -441,6 +438,20 @@ jobs: env: Token: $(dn-bot-dnceng-artifact-feeds-rw) + # Populates internal runtime SAS tokens. + - template: /eng/common/templates-official/steps/enable-internal-runtimes.yml + + # Populate dotnetbuilds-internal base64 sas tokens. + - template: /eng/common/templates-official/steps/get-delegation-sas.yml + parameters: + federatedServiceConnection: 'dotnetbuilds-internal-read' + outputVariableName: 'dotnetbuilds-internal-container-read-token' + expiryInHours: 1 + base64Encode: false + storageAccount: dotnetbuilds + container: internal + permissions: rl + # Add COMPlus_* environment variables to build steps. - ${{ if ne(parameters.steps, '')}}: - ${{ each step in parameters.steps }}: diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 029e9bf19b7c..37caaa8aa95e 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -376,26 +376,26 @@ https://github.com/dotnet/winforms abda8e3bfa78319363526b5a5f86863ec979940e - + https://github.com/dotnet/arcade - e6f70c7dd528f05cd28cec2a179d58c22e91d9ac + 8b879da4e449c48d99f3f642fc429379a64e8fe8 - + https://github.com/dotnet/arcade - e6f70c7dd528f05cd28cec2a179d58c22e91d9ac + 8b879da4e449c48d99f3f642fc429379a64e8fe8 - + https://github.com/dotnet/arcade - e6f70c7dd528f05cd28cec2a179d58c22e91d9ac + 8b879da4e449c48d99f3f642fc429379a64e8fe8 - + https://github.com/dotnet/arcade - e6f70c7dd528f05cd28cec2a179d58c22e91d9ac + 8b879da4e449c48d99f3f642fc429379a64e8fe8 - + https://github.com/dotnet/arcade - e6f70c7dd528f05cd28cec2a179d58c22e91d9ac + 8b879da4e449c48d99f3f642fc429379a64e8fe8 https://github.com/dotnet/extensions diff --git a/eng/Versions.props b/eng/Versions.props index be98f33f4169..6814e5be8609 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -162,9 +162,9 @@ 6.2.4 6.2.4 - 8.0.0-beta.24266.3 - 8.0.0-beta.24266.3 - 8.0.0-beta.24266.3 + 8.0.0-beta.24352.1 + 8.0.0-beta.24352.1 + 8.0.0-beta.24352.1 8.0.0-alpha.1.24269.1 diff --git a/eng/common/post-build/publish-using-darc.ps1 b/eng/common/post-build/publish-using-darc.ps1 index 5a3a32ea8d75..238945cb5ab4 100644 --- a/eng/common/post-build/publish-using-darc.ps1 +++ b/eng/common/post-build/publish-using-darc.ps1 @@ -2,7 +2,6 @@ param( [Parameter(Mandatory=$true)][int] $BuildId, [Parameter(Mandatory=$true)][int] $PublishingInfraVersion, [Parameter(Mandatory=$true)][string] $AzdoToken, - [Parameter(Mandatory=$true)][string] $MaestroToken, [Parameter(Mandatory=$false)][string] $MaestroApiEndPoint = 'https://maestro.dot.net', [Parameter(Mandatory=$true)][string] $WaitPublishingFinish, [Parameter(Mandatory=$false)][string] $ArtifactsPublishingAdditionalParameters, @@ -31,13 +30,13 @@ try { } & $darc add-build-to-channel ` - --id $buildId ` - --publishing-infra-version $PublishingInfraVersion ` - --default-channels ` - --source-branch main ` - --azdev-pat $AzdoToken ` - --bar-uri $MaestroApiEndPoint ` - --password $MaestroToken ` + --id $buildId ` + --publishing-infra-version $PublishingInfraVersion ` + --default-channels ` + --source-branch main ` + --azdev-pat "$AzdoToken" ` + --bar-uri "$MaestroApiEndPoint" ` + --ci ` @optionalParams if ($LastExitCode -ne 0) { diff --git a/eng/common/templates-official/job/publish-build-assets.yml b/eng/common/templates-official/job/publish-build-assets.yml index 589ac80a18b7..d01739c12857 100644 --- a/eng/common/templates-official/job/publish-build-assets.yml +++ b/eng/common/templates-official/job/publish-build-assets.yml @@ -76,13 +76,16 @@ jobs: - task: NuGetAuthenticate@1 - - task: PowerShell@2 + - task: AzureCLI@2 displayName: Publish Build Assets inputs: - filePath: eng\common\sdk-task.ps1 - arguments: -task PublishBuildAssets -restore -msbuildEngine dotnet + azureSubscription: "Darc: Maestro Production" + scriptType: ps + scriptLocation: scriptPath + scriptPath: $(Build.SourcesDirectory)/eng/common/sdk-task.ps1 + arguments: > + -task PublishBuildAssets -restore -msbuildEngine dotnet /p:ManifestsPath='$(Build.StagingDirectory)/Download/AssetManifests' - /p:BuildAssetRegistryToken=$(MaestroAccessToken) /p:MaestroApiEndpoint=https://maestro-prod.westus2.cloudapp.azure.com /p:PublishUsingPipelines=${{ parameters.publishUsingPipelines }} /p:OfficialBuildId=$(Build.BuildNumber) @@ -144,7 +147,6 @@ jobs: arguments: -BuildId $(BARBuildId) -PublishingInfraVersion 3 -AzdoToken '$(publishing-dnceng-devdiv-code-r-build-re)' - -MaestroToken '$(MaestroApiAccessToken)' -WaitPublishingFinish true -ArtifactsPublishingAdditionalParameters '${{ parameters.artifactsPublishingAdditionalParameters }}' -SymbolPublishingAdditionalParameters '${{ parameters.symbolPublishingAdditionalParameters }}' diff --git a/eng/common/templates-official/job/source-build.yml b/eng/common/templates-official/job/source-build.yml index f193dfbe2366..f983033bb028 100644 --- a/eng/common/templates-official/job/source-build.yml +++ b/eng/common/templates-official/job/source-build.yml @@ -31,6 +31,12 @@ parameters: # container and pool. platform: {} + # If set to true and running on a non-public project, + # Internal blob storage locations will be enabled. + # This is not enabled by default because many repositories do not need internal sources + # and do not need to have the required service connections approved in the pipeline. + enableInternalSources: false + jobs: - job: ${{ parameters.jobNamePrefix }}_${{ parameters.platform.name }} displayName: Source-Build (${{ parameters.platform.name }}) @@ -62,6 +68,8 @@ jobs: clean: all steps: + - ${{ if eq(parameters.enableInternalSources, true) }}: + - template: /eng/common/templates-official/steps/enable-internal-runtimes.yml - template: /eng/common/templates-official/steps/source-build.yml parameters: platform: ${{ parameters.platform }} diff --git a/eng/common/templates-official/job/source-index-stage1.yml b/eng/common/templates-official/job/source-index-stage1.yml index 43ee0c202fc7..60dfb6b2d1c0 100644 --- a/eng/common/templates-official/job/source-index-stage1.yml +++ b/eng/common/templates-official/job/source-index-stage1.yml @@ -23,7 +23,7 @@ jobs: value: ${{ parameters.sourceIndexPackageSource }} - name: BinlogPath value: ${{ parameters.binlogPath }} - - template: /eng/common/templates/variables/pool-providers.yml + - template: /eng/common/templates-official/variables/pool-providers.yml ${{ if ne(parameters.pool, '') }}: pool: ${{ parameters.pool }} @@ -34,7 +34,8 @@ jobs: demands: ImageOverride -equals windows.vs2019.amd64.open ${{ if eq(variables['System.TeamProject'], 'internal') }}: name: $(DncEngInternalBuildPool) - demands: ImageOverride -equals windows.vs2019.amd64 + image: windows.vs2022.amd64 + os: windows steps: - ${{ each preStep in parameters.preSteps }}: @@ -70,16 +71,13 @@ jobs: scriptType: 'ps' scriptLocation: 'inlineScript' inlineScript: | - echo "##vso[task.setvariable variable=ARM_CLIENT_ID]$env:servicePrincipalId" - echo "##vso[task.setvariable variable=ARM_ID_TOKEN]$env:idToken" - echo "##vso[task.setvariable variable=ARM_TENANT_ID]$env:tenantId" + echo "##vso[task.setvariable variable=ARM_CLIENT_ID;issecret=true]$env:servicePrincipalId" + echo "##vso[task.setvariable variable=ARM_ID_TOKEN;issecret=true]$env:idToken" + echo "##vso[task.setvariable variable=ARM_TENANT_ID;issecret=true]$env:tenantId" - script: | - echo "Client ID: $(ARM_CLIENT_ID)" - echo "ID Token: $(ARM_ID_TOKEN)" - echo "Tenant ID: $(ARM_TENANT_ID)" az login --service-principal -u $(ARM_CLIENT_ID) --tenant $(ARM_TENANT_ID) --allow-no-subscriptions --federated-token $(ARM_ID_TOKEN) displayName: "Login to Azure" - script: $(Agent.TempDirectory)/.source-index/tools/UploadIndexStage1 -i .source-index/stage1output -n $(Build.Repository.Name) -s netsourceindexstage1 -b stage1 - displayName: Upload stage1 artifacts to source index \ No newline at end of file + displayName: Upload stage1 artifacts to source index diff --git a/eng/common/templates-official/jobs/source-build.yml b/eng/common/templates-official/jobs/source-build.yml index 08e5db9bb116..5cf6a269c0b6 100644 --- a/eng/common/templates-official/jobs/source-build.yml +++ b/eng/common/templates-official/jobs/source-build.yml @@ -21,6 +21,12 @@ parameters: # one job runs on 'defaultManagedPlatform'. platforms: [] + # If set to true and running on a non-public project, + # Internal nuget and blob storage locations will be enabled. + # This is not enabled by default because many repositories do not need internal sources + # and do not need to have the required service connections approved in the pipeline. + enableInternalSources: false + jobs: - ${{ if ne(parameters.allCompletedJobId, '') }}: @@ -38,9 +44,11 @@ jobs: parameters: jobNamePrefix: ${{ parameters.jobNamePrefix }} platform: ${{ platform }} + enableInternalSources: ${{ parameters.enableInternalSources }} - ${{ if eq(length(parameters.platforms), 0) }}: - template: /eng/common/templates-official/job/source-build.yml parameters: jobNamePrefix: ${{ parameters.jobNamePrefix }} platform: ${{ parameters.defaultManagedPlatform }} + enableInternalSources: ${{ parameters.enableInternalSources }} diff --git a/eng/common/templates-official/post-build/post-build.yml b/eng/common/templates-official/post-build/post-build.yml index da1f40958b45..0dfa387e7b78 100644 --- a/eng/common/templates-official/post-build/post-build.yml +++ b/eng/common/templates-official/post-build/post-build.yml @@ -272,14 +272,16 @@ stages: - task: NuGetAuthenticate@1 - - task: PowerShell@2 + - task: AzureCLI@2 displayName: Publish Using Darc inputs: - filePath: $(Build.SourcesDirectory)/eng/common/post-build/publish-using-darc.ps1 + azureSubscription: "Darc: Maestro Production" + scriptType: ps + scriptLocation: scriptPath + scriptPath: $(Build.SourcesDirectory)/eng/common/post-build/publish-using-darc.ps1 arguments: -BuildId $(BARBuildId) -PublishingInfraVersion ${{ parameters.publishingInfraVersion }} -AzdoToken '$(publishing-dnceng-devdiv-code-r-build-re)' - -MaestroToken '$(MaestroApiAccessToken)' -WaitPublishingFinish true -ArtifactsPublishingAdditionalParameters '${{ parameters.artifactsPublishingAdditionalParameters }}' -SymbolPublishingAdditionalParameters '${{ parameters.symbolPublishingAdditionalParameters }}' diff --git a/eng/common/templates-official/steps/enable-internal-runtimes.yml b/eng/common/templates-official/steps/enable-internal-runtimes.yml new file mode 100644 index 000000000000..93a8394a666b --- /dev/null +++ b/eng/common/templates-official/steps/enable-internal-runtimes.yml @@ -0,0 +1,28 @@ +# Obtains internal runtime download credentials and populates the 'dotnetbuilds-internal-container-read-token-base64' +# variable with the base64-encoded SAS token, by default + +parameters: +- name: federatedServiceConnection + type: string + default: 'dotnetbuilds-internal-read' +- name: outputVariableName + type: string + default: 'dotnetbuilds-internal-container-read-token-base64' +- name: expiryInHours + type: number + default: 1 +- name: base64Encode + type: boolean + default: true + +steps: +- ${{ if ne(variables['System.TeamProject'], 'public') }}: + - template: /eng/common/templates-official/steps/get-delegation-sas.yml + parameters: + federatedServiceConnection: ${{ parameters.federatedServiceConnection }} + outputVariableName: ${{ parameters.outputVariableName }} + expiryInHours: ${{ parameters.expiryInHours }} + base64Encode: ${{ parameters.base64Encode }} + storageAccount: dotnetbuilds + container: internal + permissions: rl diff --git a/eng/common/templates-official/steps/get-delegation-sas.yml b/eng/common/templates-official/steps/get-delegation-sas.yml new file mode 100644 index 000000000000..c0e8f91317f0 --- /dev/null +++ b/eng/common/templates-official/steps/get-delegation-sas.yml @@ -0,0 +1,43 @@ +parameters: +- name: federatedServiceConnection + type: string +- name: outputVariableName + type: string +- name: expiryInHours + type: number + default: 1 +- name: base64Encode + type: boolean + default: false +- name: storageAccount + type: string +- name: container + type: string +- name: permissions + type: string + default: 'rl' + +steps: +- task: AzureCLI@2 + displayName: 'Generate delegation SAS Token for ${{ parameters.storageAccount }}/${{ parameters.container }}' + inputs: + azureSubscription: ${{ parameters.federatedServiceConnection }} + scriptType: 'pscore' + scriptLocation: 'inlineScript' + inlineScript: | + # Calculate the expiration of the SAS token and convert to UTC + $expiry = (Get-Date).AddHours(${{ parameters.expiryInHours }}).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ") + + $sas = az storage container generate-sas --account-name ${{ parameters.storageAccount }} --name ${{ parameters.container }} --permissions ${{ parameters.permissions }} --expiry $expiry --auth-mode login --as-user -o tsv + + if ($LASTEXITCODE -ne 0) { + Write-Error "Failed to generate SAS token." + exit 1 + } + + if ('${{ parameters.base64Encode }}' -eq 'true') { + $sas = [Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes($sas)) + } + + Write-Host "Setting '${{ parameters.outputVariableName }}' with the access token value" + Write-Host "##vso[task.setvariable variable=${{ parameters.outputVariableName }};issecret=true]$sas" diff --git a/eng/common/templates-official/steps/get-federated-access-token.yml b/eng/common/templates-official/steps/get-federated-access-token.yml new file mode 100644 index 000000000000..e3786cef6dfd --- /dev/null +++ b/eng/common/templates-official/steps/get-federated-access-token.yml @@ -0,0 +1,28 @@ +parameters: +- name: federatedServiceConnection + type: string +- name: outputVariableName + type: string +# Resource to get a token for. Common values include: +# - '499b84ac-1321-427f-aa17-267ca6975798' for Azure DevOps +# - 'https://storage.azure.com/' for storage +# Defaults to Azure DevOps +- name: resource + type: string + default: '499b84ac-1321-427f-aa17-267ca6975798' + +steps: +- task: AzureCLI@2 + displayName: 'Getting federated access token for feeds' + inputs: + azureSubscription: ${{ parameters.federatedServiceConnection }} + scriptType: 'pscore' + scriptLocation: 'inlineScript' + inlineScript: | + $accessToken = az account get-access-token --query accessToken --resource ${{ parameters.resource }} --output tsv + if ($LASTEXITCODE -ne 0) { + Write-Error "Failed to get access token for resource '${{ parameters.resource }}'" + exit 1 + } + Write-Host "Setting '${{ parameters.outputVariableName }}' with the access token value" + Write-Host "##vso[task.setvariable variable=${{ parameters.outputVariableName }};issecret=true]$accessToken" diff --git a/eng/common/templates/job/publish-build-assets.yml b/eng/common/templates/job/publish-build-assets.yml index 8ec0151def21..9fd69fa7c9b7 100644 --- a/eng/common/templates/job/publish-build-assets.yml +++ b/eng/common/templates/job/publish-build-assets.yml @@ -74,13 +74,16 @@ jobs: - task: NuGetAuthenticate@1 - - task: PowerShell@2 + - task: AzureCLI@2 displayName: Publish Build Assets inputs: - filePath: eng\common\sdk-task.ps1 - arguments: -task PublishBuildAssets -restore -msbuildEngine dotnet + azureSubscription: "Darc: Maestro Production" + scriptType: ps + scriptLocation: scriptPath + scriptPath: $(Build.SourcesDirectory)/eng/common/sdk-task.ps1 + arguments: > + -task PublishBuildAssets -restore -msbuildEngine dotnet /p:ManifestsPath='$(Build.StagingDirectory)/Download/AssetManifests' - /p:BuildAssetRegistryToken=$(MaestroAccessToken) /p:MaestroApiEndpoint=https://maestro.dot.net /p:PublishUsingPipelines=${{ parameters.publishUsingPipelines }} /p:OfficialBuildId=$(Build.BuildNumber) @@ -140,7 +143,6 @@ jobs: arguments: -BuildId $(BARBuildId) -PublishingInfraVersion 3 -AzdoToken '$(publishing-dnceng-devdiv-code-r-build-re)' - -MaestroToken '$(MaestroApiAccessToken)' -WaitPublishingFinish true -ArtifactsPublishingAdditionalParameters '${{ parameters.artifactsPublishingAdditionalParameters }}' -SymbolPublishingAdditionalParameters '${{ parameters.symbolPublishingAdditionalParameters }}' diff --git a/eng/common/templates/job/source-build.yml b/eng/common/templates/job/source-build.yml index 8a3deef2b727..c0ff472b697b 100644 --- a/eng/common/templates/job/source-build.yml +++ b/eng/common/templates/job/source-build.yml @@ -31,6 +31,12 @@ parameters: # container and pool. platform: {} + # If set to true and running on a non-public project, + # Internal blob storage locations will be enabled. + # This is not enabled by default because many repositories do not need internal sources + # and do not need to have the required service connections approved in the pipeline. + enableInternalSources: false + jobs: - job: ${{ parameters.jobNamePrefix }}_${{ parameters.platform.name }} displayName: Source-Build (${{ parameters.platform.name }}) @@ -61,6 +67,8 @@ jobs: clean: all steps: + - ${{ if eq(parameters.enableInternalSources, true) }}: + - template: /eng/common/templates/steps/enable-internal-runtimes.yml - template: /eng/common/templates/steps/source-build.yml parameters: platform: ${{ parameters.platform }} diff --git a/eng/common/templates/job/source-index-stage1.yml b/eng/common/templates/job/source-index-stage1.yml index 43ee0c202fc7..0b6bb89dc78a 100644 --- a/eng/common/templates/job/source-index-stage1.yml +++ b/eng/common/templates/job/source-index-stage1.yml @@ -70,16 +70,13 @@ jobs: scriptType: 'ps' scriptLocation: 'inlineScript' inlineScript: | - echo "##vso[task.setvariable variable=ARM_CLIENT_ID]$env:servicePrincipalId" - echo "##vso[task.setvariable variable=ARM_ID_TOKEN]$env:idToken" - echo "##vso[task.setvariable variable=ARM_TENANT_ID]$env:tenantId" + echo "##vso[task.setvariable variable=ARM_CLIENT_ID;issecret=true]$env:servicePrincipalId" + echo "##vso[task.setvariable variable=ARM_ID_TOKEN;issecret=true]$env:idToken" + echo "##vso[task.setvariable variable=ARM_TENANT_ID;issecret=true]$env:tenantId" - script: | - echo "Client ID: $(ARM_CLIENT_ID)" - echo "ID Token: $(ARM_ID_TOKEN)" - echo "Tenant ID: $(ARM_TENANT_ID)" az login --service-principal -u $(ARM_CLIENT_ID) --tenant $(ARM_TENANT_ID) --allow-no-subscriptions --federated-token $(ARM_ID_TOKEN) displayName: "Login to Azure" - script: $(Agent.TempDirectory)/.source-index/tools/UploadIndexStage1 -i .source-index/stage1output -n $(Build.Repository.Name) -s netsourceindexstage1 -b stage1 - displayName: Upload stage1 artifacts to source index \ No newline at end of file + displayName: Upload stage1 artifacts to source index diff --git a/eng/common/templates/jobs/source-build.yml b/eng/common/templates/jobs/source-build.yml index a15b07eb51d9..5f46bfa895c1 100644 --- a/eng/common/templates/jobs/source-build.yml +++ b/eng/common/templates/jobs/source-build.yml @@ -21,6 +21,12 @@ parameters: # one job runs on 'defaultManagedPlatform'. platforms: [] + # If set to true and running on a non-public project, + # Internal nuget and blob storage locations will be enabled. + # This is not enabled by default because many repositories do not need internal sources + # and do not need to have the required service connections approved in the pipeline. + enableInternalSources: false + jobs: - ${{ if ne(parameters.allCompletedJobId, '') }}: @@ -38,9 +44,11 @@ jobs: parameters: jobNamePrefix: ${{ parameters.jobNamePrefix }} platform: ${{ platform }} + enableInternalSources: ${{ parameters.enableInternalSources }} - ${{ if eq(length(parameters.platforms), 0) }}: - template: /eng/common/templates/job/source-build.yml parameters: jobNamePrefix: ${{ parameters.jobNamePrefix }} platform: ${{ parameters.defaultManagedPlatform }} + enableInternalSources: ${{ parameters.enableInternalSources }} diff --git a/eng/common/templates/post-build/post-build.yml b/eng/common/templates/post-build/post-build.yml index aba44a25a338..2db4933468fd 100644 --- a/eng/common/templates/post-build/post-build.yml +++ b/eng/common/templates/post-build/post-build.yml @@ -268,14 +268,16 @@ stages: - task: NuGetAuthenticate@1 - - task: PowerShell@2 + - task: AzureCLI@2 displayName: Publish Using Darc inputs: - filePath: $(Build.SourcesDirectory)/eng/common/post-build/publish-using-darc.ps1 + azureSubscription: "Darc: Maestro Production" + scriptType: ps + scriptLocation: scriptPath + scriptPath: $(Build.SourcesDirectory)/eng/common/post-build/publish-using-darc.ps1 arguments: -BuildId $(BARBuildId) -PublishingInfraVersion ${{ parameters.publishingInfraVersion }} -AzdoToken '$(publishing-dnceng-devdiv-code-r-build-re)' - -MaestroToken '$(MaestroApiAccessToken)' -WaitPublishingFinish true -ArtifactsPublishingAdditionalParameters '${{ parameters.artifactsPublishingAdditionalParameters }}' -SymbolPublishingAdditionalParameters '${{ parameters.symbolPublishingAdditionalParameters }}' diff --git a/eng/common/templates/post-build/setup-maestro-vars.yml b/eng/common/templates/post-build/setup-maestro-vars.yml index 0c87f149a4ad..64b9abc68504 100644 --- a/eng/common/templates/post-build/setup-maestro-vars.yml +++ b/eng/common/templates/post-build/setup-maestro-vars.yml @@ -11,13 +11,14 @@ steps: artifactName: ReleaseConfigs checkDownloadedFiles: true - - task: PowerShell@2 + - task: AzureCLI@2 name: setReleaseVars displayName: Set Release Configs Vars inputs: - targetType: inline - pwsh: true - script: | + azureSubscription: "Darc: Maestro Production" + scriptType: pscore + scriptLocation: inlineScript + inlineScript: | try { if (!$Env:PromoteToMaestroChannels -or $Env:PromoteToMaestroChannels.Trim() -eq '') { $Content = Get-Content $(Build.StagingDirectory)/ReleaseConfigs/ReleaseConfigs.txt @@ -31,15 +32,16 @@ steps: $AzureDevOpsBuildId = $Env:Build_BuildId } else { - $buildApiEndpoint = "${Env:MaestroApiEndPoint}/api/builds/${Env:BARBuildId}?api-version=${Env:MaestroApiVersion}" + . $(Build.SourcesDirectory)\eng\common\tools.ps1 + $darc = Get-Darc + $buildInfo = & $darc get-build ` + --id ${{ parameters.BARBuildId }} ` + --extended ` + --output-format json ` + --ci ` + | convertFrom-Json - $apiHeaders = New-Object 'System.Collections.Generic.Dictionary[[String],[String]]' - $apiHeaders.Add('Accept', 'application/json') - $apiHeaders.Add('Authorization',"Bearer ${Env:MAESTRO_API_TOKEN}") - - $buildInfo = try { Invoke-WebRequest -Method Get -Uri $buildApiEndpoint -Headers $apiHeaders | ConvertFrom-Json } catch { Write-Host "Error: $_" } - - $BarId = $Env:BARBuildId + $BarId = ${{ parameters.BARBuildId }} $Channels = $Env:PromoteToMaestroChannels -split "," $Channels = $Channels -join "][" $Channels = "[$Channels]" @@ -65,6 +67,4 @@ steps: exit 1 } env: - MAESTRO_API_TOKEN: $(MaestroApiAccessToken) - BARBuildId: ${{ parameters.BARBuildId }} PromoteToMaestroChannels: ${{ parameters.PromoteToChannelIds }} diff --git a/eng/common/templates/steps/enable-internal-runtimes.yml b/eng/common/templates/steps/enable-internal-runtimes.yml new file mode 100644 index 000000000000..54dc9416c519 --- /dev/null +++ b/eng/common/templates/steps/enable-internal-runtimes.yml @@ -0,0 +1,28 @@ +# Obtains internal runtime download credentials and populates the 'dotnetbuilds-internal-container-read-token-base64' +# variable with the base64-encoded SAS token, by default + +parameters: +- name: federatedServiceConnection + type: string + default: 'dotnetbuilds-internal-read' +- name: outputVariableName + type: string + default: 'dotnetbuilds-internal-container-read-token-base64' +- name: expiryInHours + type: number + default: 1 +- name: base64Encode + type: boolean + default: true + +steps: +- ${{ if ne(variables['System.TeamProject'], 'public') }}: + - template: /eng/common/templates/steps/get-delegation-sas.yml + parameters: + federatedServiceConnection: ${{ parameters.federatedServiceConnection }} + outputVariableName: ${{ parameters.outputVariableName }} + expiryInHours: ${{ parameters.expiryInHours }} + base64Encode: ${{ parameters.base64Encode }} + storageAccount: dotnetbuilds + container: internal + permissions: rl diff --git a/eng/common/templates/steps/get-delegation-sas.yml b/eng/common/templates/steps/get-delegation-sas.yml new file mode 100644 index 000000000000..c0e8f91317f0 --- /dev/null +++ b/eng/common/templates/steps/get-delegation-sas.yml @@ -0,0 +1,43 @@ +parameters: +- name: federatedServiceConnection + type: string +- name: outputVariableName + type: string +- name: expiryInHours + type: number + default: 1 +- name: base64Encode + type: boolean + default: false +- name: storageAccount + type: string +- name: container + type: string +- name: permissions + type: string + default: 'rl' + +steps: +- task: AzureCLI@2 + displayName: 'Generate delegation SAS Token for ${{ parameters.storageAccount }}/${{ parameters.container }}' + inputs: + azureSubscription: ${{ parameters.federatedServiceConnection }} + scriptType: 'pscore' + scriptLocation: 'inlineScript' + inlineScript: | + # Calculate the expiration of the SAS token and convert to UTC + $expiry = (Get-Date).AddHours(${{ parameters.expiryInHours }}).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ") + + $sas = az storage container generate-sas --account-name ${{ parameters.storageAccount }} --name ${{ parameters.container }} --permissions ${{ parameters.permissions }} --expiry $expiry --auth-mode login --as-user -o tsv + + if ($LASTEXITCODE -ne 0) { + Write-Error "Failed to generate SAS token." + exit 1 + } + + if ('${{ parameters.base64Encode }}' -eq 'true') { + $sas = [Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes($sas)) + } + + Write-Host "Setting '${{ parameters.outputVariableName }}' with the access token value" + Write-Host "##vso[task.setvariable variable=${{ parameters.outputVariableName }};issecret=true]$sas" diff --git a/eng/common/templates/steps/get-federated-access-token.yml b/eng/common/templates/steps/get-federated-access-token.yml new file mode 100644 index 000000000000..c8c49cc0e8f0 --- /dev/null +++ b/eng/common/templates/steps/get-federated-access-token.yml @@ -0,0 +1,28 @@ +parameters: +- name: federatedServiceConnection + type: string +- name: outputVariableName + type: string +# Resource to get a token for. Common values include: +# - '499b84ac-1321-427f-aa17-267ca6975798' for Azure DevOps +# - 'https://storage.azure.com/' for storage +# Defaults to Azure DevOps +- name: resource + type: string + default: '499b84ac-1321-427f-aa17-267ca6975798' + +steps: +- task: AzureCLI@2 + displayName: 'Getting federated access token for feeds' + inputs: + azureSubscription: ${{ parameters.federatedServiceConnection }} + scriptType: 'pscore' + scriptLocation: 'inlineScript' + inlineScript: | + $accessToken = az account get-access-token --query accessToken --resource ${{ parameters.resource }} --output tsv + if ($LASTEXITCODE -ne 0) { + Write-Error "Failed to get access token for resource '${{ parameters.resource }}'" + exit 1 + } + Write-Host "Setting '${{ parameters.outputVariableName }}' with the access token value" + Write-Host "##vso[task.setvariable variable=${{ parameters.outputVariableName }};issecret=true]$accessToken" \ No newline at end of file diff --git a/global.json b/global.json index bfd92fee2223..c89cadcdf55b 100644 --- a/global.json +++ b/global.json @@ -27,7 +27,7 @@ }, "msbuild-sdks": { "Yarn.MSBuild": "1.22.19", - "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.24266.3", - "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.24266.3" + "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.24352.1", + "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.24352.1" } } From f7fc1e7b265c7e2077a8bf9ca443432299964989 Mon Sep 17 00:00:00 2001 From: Mackinnon Buck Date: Tue, 9 Jul 2024 12:00:27 -0700 Subject: [PATCH 09/20] Update SDK and baseline --- eng/Baseline.Designer.props | 443 ++++++++++++++++++------------------ eng/Baseline.xml | 214 ++++++++--------- eng/Versions.props | 2 +- global.json | 4 +- 4 files changed, 332 insertions(+), 331 deletions(-) diff --git a/eng/Baseline.Designer.props b/eng/Baseline.Designer.props index a89151e8a015..b2617286135b 100644 --- a/eng/Baseline.Designer.props +++ b/eng/Baseline.Designer.props @@ -2,117 +2,117 @@ $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - 8.0.5 + 8.0.7 - 8.0.5 + 8.0.7 - 8.0.5 + 8.0.7 - 8.0.5 + 8.0.7 - 8.0.5 + 8.0.7 - 8.0.5 + 8.0.7 - 8.0.5 + 8.0.7 - 8.0.5 + 8.0.7 - 8.0.5 + 8.0.7 - 8.0.5 + 8.0.7 - 8.0.5 + 8.0.7 - 8.0.5 + 8.0.7 - 8.0.5 + 8.0.7 - 8.0.5 + 8.0.7 - 8.0.5 + 8.0.7 - 8.0.5 + 8.0.7 - 8.0.5 + 8.0.7 - 8.0.5 + 8.0.7 - 8.0.5 + 8.0.7 - 8.0.5 + 8.0.7 - 8.0.5 + 8.0.7 - 8.0.5 + 8.0.7 - + - 8.0.5 + 8.0.7 - 8.0.5 + 8.0.7 - 8.0.5 + 8.0.7 @@ -120,145 +120,146 @@ - 8.0.5 + 8.0.7 - + - + - + - 8.0.5 + 8.0.7 - + + - 8.0.5 + 8.0.7 - 8.0.5 + 8.0.7 - + - 8.0.5 + 8.0.7 - - + + - 8.0.5 + 8.0.7 - 8.0.5 + 8.0.7 - - + + - 8.0.5 + 8.0.7 - + - 8.0.5 + 8.0.7 - + - 8.0.5 + 8.0.7 - + - 8.0.5 + 8.0.7 - - + + - 8.0.5 + 8.0.7 - - - + + + - 8.0.5 + 8.0.7 - - - + + + - 8.0.5 + 8.0.7 - - + + - 8.0.5 + 8.0.7 - 8.0.5 + 8.0.7 - 8.0.5 + 8.0.7 - - - + + + - 8.0.5 + 8.0.7 @@ -267,51 +268,51 @@ - 8.0.5 + 8.0.7 - + - + - + - + - 8.0.5 + 8.0.7 - 8.0.5 + 8.0.7 - + - + - + - 8.0.5 + 8.0.7 - - + + @@ -321,8 +322,8 @@ - - + + @@ -330,8 +331,8 @@ - - + + @@ -342,58 +343,58 @@ - 8.0.5 + 8.0.7 - 8.0.5 + 8.0.7 - - + + - 8.0.5 + 8.0.7 - + - + - + - 8.0.5 + 8.0.7 - + - + - + - 8.0.5 + 8.0.7 - + - 8.0.5 + 8.0.7 @@ -402,7 +403,7 @@ - 8.0.5 + 8.0.7 @@ -410,71 +411,71 @@ - 8.0.5 + 8.0.7 - 8.0.5 + 8.0.7 - + - + - + - + - 8.0.5 + 8.0.7 - - + + - + - - + + - 8.0.5 + 8.0.7 - - + + - 8.0.5 + 8.0.7 - - + + - 8.0.5 + 8.0.7 @@ -490,52 +491,52 @@ - 8.0.5 + 8.0.7 - 8.0.5 + 8.0.7 - 8.0.5 + 8.0.7 - + - 8.0.5 + 8.0.7 - + - 8.0.5 + 8.0.7 - - + + - 8.0.5 + 8.0.7 - 8.0.5 + 8.0.7 @@ -544,54 +545,54 @@ - 8.0.5 + 8.0.7 - 8.0.5 + 8.0.7 - - + + - - + + - - + + - 8.0.5 + 8.0.7 - - + + - - + + - - + + - - + + @@ -599,83 +600,83 @@ - 8.0.5 + 8.0.7 - + - + - + - + - + - 8.0.5 + 8.0.7 - + - + - + - 8.0.5 + 8.0.7 - + - + - + - 8.0.5 + 8.0.7 - + - + - + - 8.0.5 + 8.0.7 - - - - + + + + - 8.0.5 + 8.0.7 @@ -684,64 +685,64 @@ - 8.0.5 + 8.0.7 - 8.0.5 + 8.0.7 - 8.0.5 + 8.0.7 - 8.0.5 + 8.0.7 - + - 8.0.5 + 8.0.7 - + - 8.0.5 + 8.0.7 - 8.0.5 + 8.0.7 - 8.0.5 + 8.0.7 - 8.0.5 + 8.0.7 - 8.0.5 + 8.0.7 - 8.0.5 + 8.0.7 - 8.0.5 + 8.0.7 @@ -763,7 +764,7 @@ - 8.0.5 + 8.0.7 @@ -785,7 +786,7 @@ - 8.0.5 + 8.0.7 @@ -801,23 +802,23 @@ - 8.0.5 + 8.0.7 - + - + - + @@ -825,24 +826,24 @@ - 8.0.5 + 8.0.7 - 8.0.5 + 8.0.7 - - - + + + - 8.0.5 + 8.0.7 - 8.0.5 + 8.0.7 @@ -852,7 +853,7 @@ - 8.0.5 + 8.0.7 @@ -861,73 +862,73 @@ - 8.0.5 + 8.0.7 - + - + - + - 8.0.5 + 8.0.7 - + - + - + - 8.0.5 + 8.0.7 - + - + - + - 8.0.5 + 8.0.7 - 8.0.5 + 8.0.7 @@ -956,11 +957,11 @@ - 8.0.5 + 8.0.7 - 8.0.5 + 8.0.7 @@ -978,18 +979,18 @@ - 8.0.5 + 8.0.7 - 8.0.5 + 8.0.7 - + - 8.0.5 + 8.0.7 diff --git a/eng/Baseline.xml b/eng/Baseline.xml index 7d886afd31fc..389370e6e631 100644 --- a/eng/Baseline.xml +++ b/eng/Baseline.xml @@ -1,113 +1,113 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/eng/Versions.props b/eng/Versions.props index 2faf5a56c9ca..1e7613c5fd39 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -11,7 +11,7 @@ 8 - false + true 7.1.2 *-* + + + + + + + + @@ -30,9 +38,17 @@ + + + + + + + + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 61a1664b6c8e..d5533777725d 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -376,26 +376,26 @@ https://github.com/dotnet/winforms abda8e3bfa78319363526b5a5f86863ec979940e - + https://github.com/dotnet/arcade - 8b879da4e449c48d99f3f642fc429379a64e8fe8 + c9efa535175049eb9cba06cae1f8c3d5dbe768a9 - + https://github.com/dotnet/arcade - 8b879da4e449c48d99f3f642fc429379a64e8fe8 + c9efa535175049eb9cba06cae1f8c3d5dbe768a9 - + https://github.com/dotnet/arcade - 8b879da4e449c48d99f3f642fc429379a64e8fe8 + c9efa535175049eb9cba06cae1f8c3d5dbe768a9 - + https://github.com/dotnet/arcade - 8b879da4e449c48d99f3f642fc429379a64e8fe8 + c9efa535175049eb9cba06cae1f8c3d5dbe768a9 - + https://github.com/dotnet/arcade - 8b879da4e449c48d99f3f642fc429379a64e8fe8 + c9efa535175049eb9cba06cae1f8c3d5dbe768a9 https://github.com/dotnet/extensions diff --git a/eng/Versions.props b/eng/Versions.props index 1e7613c5fd39..f8bf8015cbcd 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -162,9 +162,9 @@ 6.2.4 6.2.4 - 8.0.0-beta.24352.1 - 8.0.0-beta.24352.1 - 8.0.0-beta.24352.1 + 8.0.0-beta.24360.5 + 8.0.0-beta.24360.5 + 8.0.0-beta.24360.5 8.0.0-alpha.1.24269.1 diff --git a/eng/common/templates-official/job/publish-build-assets.yml b/eng/common/templates-official/job/publish-build-assets.yml index d01739c12857..ba3e7df81587 100644 --- a/eng/common/templates-official/job/publish-build-assets.yml +++ b/eng/common/templates-official/job/publish-build-assets.yml @@ -140,11 +140,14 @@ jobs: BARBuildId: ${{ parameters.BARBuildId }} PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} - - task: PowerShell@2 + - task: AzureCLI@2 displayName: Publish Using Darc inputs: - filePath: $(Build.SourcesDirectory)/eng/common/post-build/publish-using-darc.ps1 - arguments: -BuildId $(BARBuildId) + azureSubscription: "Darc: Maestro Production" + scriptType: ps + scriptLocation: scriptPath + scriptPath: $(Build.SourcesDirectory)/eng/common/post-build/publish-using-darc.ps1 + arguments: -BuildId $(BARBuildId) -PublishingInfraVersion 3 -AzdoToken '$(publishing-dnceng-devdiv-code-r-build-re)' -WaitPublishingFinish true diff --git a/eng/common/templates/job/publish-build-assets.yml b/eng/common/templates/job/publish-build-assets.yml index 9fd69fa7c9b7..57a41f0a3e13 100644 --- a/eng/common/templates/job/publish-build-assets.yml +++ b/eng/common/templates/job/publish-build-assets.yml @@ -136,11 +136,14 @@ jobs: BARBuildId: ${{ parameters.BARBuildId }} PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} - - task: PowerShell@2 + - task: AzureCLI@2 displayName: Publish Using Darc inputs: - filePath: $(Build.SourcesDirectory)/eng/common/post-build/publish-using-darc.ps1 - arguments: -BuildId $(BARBuildId) + azureSubscription: "Darc: Maestro Production" + scriptType: ps + scriptLocation: scriptPath + scriptPath: $(Build.SourcesDirectory)/eng/common/post-build/publish-using-darc.ps1 + arguments: -BuildId $(BARBuildId) -PublishingInfraVersion 3 -AzdoToken '$(publishing-dnceng-devdiv-code-r-build-re)' -WaitPublishingFinish true diff --git a/global.json b/global.json index c6aeefe7556d..e1447c5750a5 100644 --- a/global.json +++ b/global.json @@ -27,7 +27,7 @@ }, "msbuild-sdks": { "Yarn.MSBuild": "1.22.19", - "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.24352.1", - "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.24352.1" + "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.24360.5", + "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.24360.5" } } diff --git a/src/Components/test/E2ETest/ServerRenderingTests/FormHandlingTests/FormWithParentBindingContextTest.cs b/src/Components/test/E2ETest/ServerRenderingTests/FormHandlingTests/FormWithParentBindingContextTest.cs index 80423bd8e8d7..83592f562e1b 100644 --- a/src/Components/test/E2ETest/ServerRenderingTests/FormHandlingTests/FormWithParentBindingContextTest.cs +++ b/src/Components/test/E2ETest/ServerRenderingTests/FormHandlingTests/FormWithParentBindingContextTest.cs @@ -8,6 +8,7 @@ using Microsoft.AspNetCore.Components.E2ETest.Infrastructure; using Microsoft.AspNetCore.Components.E2ETest.Infrastructure.ServerFixtures; using Microsoft.AspNetCore.E2ETesting; +using Microsoft.AspNetCore.Testing; using OpenQA.Selenium; using TestServer; using Xunit.Abstractions; @@ -1250,6 +1251,7 @@ public void PostingFormWithErrorsDoesNotExceedMaximumErrors() } [Fact] + [QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/54447")] public void CanBindToFormWithFiles() { var profilePicture = TempFile.Create(_tempDirectory, "txt", "This is a profile picture."); @@ -1484,7 +1486,7 @@ public void EnhancedFormThatCallsNavigationManagerRefreshDoesNotPushHistoryEntry Browser.Navigate().Back(); Browser.Equal(startUrl, () => Browser.Url); } - + [Fact] public void EnhancedFormThatCallsNavigationManagerRefreshDoesNotPushHistoryEntry_Streaming() { From 0d18db83732b323e8c0ef12d8f5fd06ef2c54438 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Tue, 16 Jul 2024 14:26:15 +0000 Subject: [PATCH 11/20] Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20240715.2 (#56822) [release/8.0] Update dependencies from dotnet/source-build-reference-packages --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index d5533777725d..ea959324af92 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -338,9 +338,9 @@ 9a1c3e1b7f0c8763d4c96e593961a61a72679a7b - + https://github.com/dotnet/source-build-reference-packages - 6ed73280a6d70f7e7ac39c86f2abe8c10983f0bb + 8258018588e4435f92c8355b51c84c7084f36eae diff --git a/eng/Versions.props b/eng/Versions.props index f8bf8015cbcd..f2c7d1ac3b42 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -168,7 +168,7 @@ 8.0.0-alpha.1.24269.1 - 8.0.0-alpha.1.24257.2 + 8.0.0-alpha.1.24365.2 2.0.0-beta-23228-03 From 6497952ea5962ba6cc498b1299c848d3b17e6f8f Mon Sep 17 00:00:00 2001 From: DotNet-Bot Date: Tue, 16 Jul 2024 22:58:33 +0000 Subject: [PATCH 12/20] Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-runtime build 20240716.12 Microsoft.Extensions.HostFactoryResolver.Sources , Microsoft.Internal.Runtime.AspNetCore.Transport , Microsoft.NET.Runtime.MonoAOTCompiler.Task , Microsoft.NET.Runtime.WebAssembly.Sdk , Microsoft.NETCore.App.Ref , Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.browser-wasm , Microsoft.NETCore.App.Runtime.win-x64 , Microsoft.NETCore.BrowserDebugHost.Transport , Microsoft.NETCore.Platforms , System.Net.Http.WinHttpHandler , Microsoft.SourceBuild.Intermediate.runtime.linux-x64 From Version 8.0.7-servicing.24313.11 -> To Version 8.0.8-servicing.24366.12 --- NuGet.config | 2 ++ eng/Version.Details.xml | 44 ++++++++++++++++++++--------------------- eng/Versions.props | 22 ++++++++++----------- 3 files changed, 35 insertions(+), 33 deletions(-) diff --git a/NuGet.config b/NuGet.config index e573a662403a..7a09cc094ea8 100644 --- a/NuGet.config +++ b/NuGet.config @@ -18,6 +18,7 @@ + @@ -45,6 +46,7 @@ + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index ea959324af92..3ed9634b863d 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -121,9 +121,9 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime 5535e31a712343a63f5d7d796cd874e563e5ac14 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 2aade6beb02ea367fd97c4070a4198802fe61c03 + 08338fcaa5c9b9a8190abb99222fed12aaba956c https://dev.azure.com/dnceng/internal/_git/dotnet-runtime @@ -185,9 +185,9 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime 5535e31a712343a63f5d7d796cd874e563e5ac14 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 2aade6beb02ea367fd97c4070a4198802fe61c03 + 08338fcaa5c9b9a8190abb99222fed12aaba956c https://github.com/dotnet/source-build-externals @@ -223,9 +223,9 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime 5535e31a712343a63f5d7d796cd874e563e5ac14 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 2aade6beb02ea367fd97c4070a4198802fe61c03 + 08338fcaa5c9b9a8190abb99222fed12aaba956c https://dev.azure.com/dnceng/internal/_git/dotnet-runtime @@ -275,17 +275,17 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime 2aade6beb02ea367fd97c4070a4198802fe61c03 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 2aade6beb02ea367fd97c4070a4198802fe61c03 + 08338fcaa5c9b9a8190abb99222fed12aaba956c - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 2aade6beb02ea367fd97c4070a4198802fe61c03 + 08338fcaa5c9b9a8190abb99222fed12aaba956c - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 2aade6beb02ea367fd97c4070a4198802fe61c03 + 08338fcaa5c9b9a8190abb99222fed12aaba956c https://dev.azure.com/dnceng/internal/_git/dotnet-runtime @@ -316,22 +316,22 @@ Win-x64 is used here because we have picked an arbitrary runtime identifier to flow the version of the latest NETCore.App runtime. All Runtime.$rid packages should have the same version. --> - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 2aade6beb02ea367fd97c4070a4198802fe61c03 + 08338fcaa5c9b9a8190abb99222fed12aaba956c - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 2aade6beb02ea367fd97c4070a4198802fe61c03 + 08338fcaa5c9b9a8190abb99222fed12aaba956c - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 2aade6beb02ea367fd97c4070a4198802fe61c03 + 08338fcaa5c9b9a8190abb99222fed12aaba956c - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 2aade6beb02ea367fd97c4070a4198802fe61c03 + 08338fcaa5c9b9a8190abb99222fed12aaba956c https://github.com/dotnet/xdt @@ -368,9 +368,9 @@ - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 2aade6beb02ea367fd97c4070a4198802fe61c03 + 08338fcaa5c9b9a8190abb99222fed12aaba956c https://github.com/dotnet/winforms diff --git a/eng/Versions.props b/eng/Versions.props index f2c7d1ac3b42..63bae5298b39 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -67,12 +67,12 @@ 8.0.1 - 8.0.7 - 8.0.7 - 8.0.7 - 8.0.7 - 8.0.7 - 8.0.7-servicing.24313.11 + 8.0.8 + 8.0.8 + 8.0.8 + 8.0.8 + 8.0.8 + 8.0.8-servicing.24366.12 8.0.0 8.0.0 8.0.0 @@ -93,7 +93,7 @@ 8.0.0 8.0.0 8.0.0 - 8.0.7-servicing.24313.11 + 8.0.8-servicing.24366.12 8.0.0 8.0.0 8.0.0 @@ -109,7 +109,7 @@ 8.0.0 8.0.2 8.0.0 - 8.0.7-servicing.24313.11 + 8.0.8-servicing.24366.12 8.0.0 8.0.1 8.0.0 @@ -117,7 +117,7 @@ 8.0.0-rtm.23520.14 8.0.0 8.0.0 - 8.0.1 + 8.0.2 8.0.0 8.0.0 8.0.0 @@ -129,9 +129,9 @@ 8.0.0 8.0.0 8.0.0 - 8.0.7-servicing.24313.11 + 8.0.8-servicing.24366.12 - 8.0.7-servicing.24313.11 + 8.0.8-servicing.24366.12 8.0.0 8.0.1 From 00555a14f66fd3631d201abb6e3f82197584937f Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Wed, 17 Jul 2024 14:11:10 +0000 Subject: [PATCH 13/20] Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20240716.1 (#56849) [release/8.0] Update dependencies from dotnet/source-build-reference-packages --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index ea959324af92..094e1757a6f2 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -338,9 +338,9 @@ 9a1c3e1b7f0c8763d4c96e593961a61a72679a7b - + https://github.com/dotnet/source-build-reference-packages - 8258018588e4435f92c8355b51c84c7084f36eae + a489be6626823d2adcf396c9e6e72987a7229173 diff --git a/eng/Versions.props b/eng/Versions.props index f2c7d1ac3b42..d4e54e5f14e6 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -168,7 +168,7 @@ 8.0.0-alpha.1.24269.1 - 8.0.0-alpha.1.24365.2 + 8.0.0-alpha.1.24366.1 2.0.0-beta-23228-03 From b1fbaaab3f1c9fe17d22eda6c0425c2f2aa89674 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Wed, 17 Jul 2024 17:27:54 +0000 Subject: [PATCH 14/20] Update dependencies from https://github.com/dotnet/arcade build 20240717.1 (#56854) [release/8.0] Update dependencies from dotnet/arcade --- eng/Version.Details.xml | 20 +++++++++---------- eng/Versions.props | 6 +++--- eng/common/sdl/NuGet.config | 4 ++-- eng/common/sdl/execute-all-sdl-tools.ps1 | 4 +--- eng/common/sdl/init-sdl.ps1 | 8 -------- eng/common/sdl/sdl.ps1 | 4 +++- .../templates-official/steps/execute-sdl.yml | 2 -- .../steps/get-federated-access-token.yml | 14 ++++++++++++- eng/common/templates/steps/execute-sdl.yml | 7 ++++--- .../steps/get-federated-access-token.yml | 14 ++++++++++++- global.json | 4 ++-- 11 files changed, 51 insertions(+), 36 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 094e1757a6f2..8548b11d2cfc 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -376,26 +376,26 @@ https://github.com/dotnet/winforms abda8e3bfa78319363526b5a5f86863ec979940e - + https://github.com/dotnet/arcade - c9efa535175049eb9cba06cae1f8c3d5dbe768a9 + fa3d544b066661522f1ec5d5e8cfd461a29b0f8a - + https://github.com/dotnet/arcade - c9efa535175049eb9cba06cae1f8c3d5dbe768a9 + fa3d544b066661522f1ec5d5e8cfd461a29b0f8a - + https://github.com/dotnet/arcade - c9efa535175049eb9cba06cae1f8c3d5dbe768a9 + fa3d544b066661522f1ec5d5e8cfd461a29b0f8a - + https://github.com/dotnet/arcade - c9efa535175049eb9cba06cae1f8c3d5dbe768a9 + fa3d544b066661522f1ec5d5e8cfd461a29b0f8a - + https://github.com/dotnet/arcade - c9efa535175049eb9cba06cae1f8c3d5dbe768a9 + fa3d544b066661522f1ec5d5e8cfd461a29b0f8a https://github.com/dotnet/extensions diff --git a/eng/Versions.props b/eng/Versions.props index d4e54e5f14e6..0adeb2f534d7 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -162,9 +162,9 @@ 6.2.4 6.2.4 - 8.0.0-beta.24360.5 - 8.0.0-beta.24360.5 - 8.0.0-beta.24360.5 + 8.0.0-beta.24367.1 + 8.0.0-beta.24367.1 + 8.0.0-beta.24367.1 8.0.0-alpha.1.24269.1 diff --git a/eng/common/sdl/NuGet.config b/eng/common/sdl/NuGet.config index 3849bdb3cf51..5bfbb02ef043 100644 --- a/eng/common/sdl/NuGet.config +++ b/eng/common/sdl/NuGet.config @@ -5,11 +5,11 @@ - + - + diff --git a/eng/common/sdl/execute-all-sdl-tools.ps1 b/eng/common/sdl/execute-all-sdl-tools.ps1 index 4715d75e974d..81ded5b7f477 100644 --- a/eng/common/sdl/execute-all-sdl-tools.ps1 +++ b/eng/common/sdl/execute-all-sdl-tools.ps1 @@ -6,7 +6,6 @@ Param( [string] $BranchName=$env:BUILD_SOURCEBRANCH, # Optional: name of branch or version of gdn settings; defaults to master [string] $SourceDirectory=$env:BUILD_SOURCESDIRECTORY, # Required: the directory where source files are located [string] $ArtifactsDirectory = (Join-Path $env:BUILD_ARTIFACTSTAGINGDIRECTORY ('artifacts')), # Required: the directory where build artifacts are located - [string] $AzureDevOpsAccessToken, # Required: access token for dnceng; should be provided via KeyVault # Optional: list of SDL tools to run on source code. See 'configure-sdl-tool.ps1' for tools list # format. @@ -75,7 +74,7 @@ try { } Exec-BlockVerbosely { - & $(Join-Path $PSScriptRoot 'init-sdl.ps1') -GuardianCliLocation $guardianCliLocation -Repository $RepoName -BranchName $BranchName -WorkingDirectory $workingDirectory -AzureDevOpsAccessToken $AzureDevOpsAccessToken -GuardianLoggerLevel $GuardianLoggerLevel + & $(Join-Path $PSScriptRoot 'init-sdl.ps1') -GuardianCliLocation $guardianCliLocation -Repository $RepoName -BranchName $BranchName -WorkingDirectory $workingDirectory -GuardianLoggerLevel $GuardianLoggerLevel } $gdnFolder = Join-Path $workingDirectory '.gdn' @@ -104,7 +103,6 @@ try { -TargetDirectory $targetDirectory ` -GdnFolder $gdnFolder ` -ToolsList $tools ` - -AzureDevOpsAccessToken $AzureDevOpsAccessToken ` -GuardianLoggerLevel $GuardianLoggerLevel ` -CrScanAdditionalRunConfigParams $CrScanAdditionalRunConfigParams ` -PoliCheckAdditionalRunConfigParams $PoliCheckAdditionalRunConfigParams ` diff --git a/eng/common/sdl/init-sdl.ps1 b/eng/common/sdl/init-sdl.ps1 index 3ac1d92b3700..588ff8e22fbe 100644 --- a/eng/common/sdl/init-sdl.ps1 +++ b/eng/common/sdl/init-sdl.ps1 @@ -3,7 +3,6 @@ Param( [string] $Repository, [string] $BranchName='master', [string] $WorkingDirectory, - [string] $AzureDevOpsAccessToken, [string] $GuardianLoggerLevel='Standard' ) @@ -21,14 +20,7 @@ $ci = $true # Don't display the console progress UI - it's a huge perf hit $ProgressPreference = 'SilentlyContinue' -# Construct basic auth from AzDO access token; construct URI to the repository's gdn folder stored in that repository; construct location of zip file -$encodedPat = [Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes(":$AzureDevOpsAccessToken")) -$escapedRepository = [Uri]::EscapeDataString("/$Repository/$BranchName/.gdn") -$uri = "https://dev.azure.com/dnceng/internal/_apis/git/repositories/sdl-tool-cfg/Items?path=$escapedRepository&versionDescriptor[versionOptions]=0&`$format=zip&api-version=5.0" -$zipFile = "$WorkingDirectory/gdn.zip" - Add-Type -AssemblyName System.IO.Compression.FileSystem -$gdnFolder = (Join-Path $WorkingDirectory '.gdn') try { # if the folder does not exist, we'll do a guardian init and push it to the remote repository diff --git a/eng/common/sdl/sdl.ps1 b/eng/common/sdl/sdl.ps1 index 648c5068d7d6..7fe603fe995d 100644 --- a/eng/common/sdl/sdl.ps1 +++ b/eng/common/sdl/sdl.ps1 @@ -4,6 +4,8 @@ function Install-Gdn { [Parameter(Mandatory=$true)] [string]$Path, + [string]$Source = "https://pkgs.dev.azure.com/dnceng/_packaging/Guardian1ESPTUpstreamOrgFeed/nuget/v3/index.json", + # If omitted, install the latest version of Guardian, otherwise install that specific version. [string]$Version ) @@ -19,7 +21,7 @@ function Install-Gdn { $ci = $true . $PSScriptRoot\..\tools.ps1 - $argumentList = @("install", "Microsoft.Guardian.Cli", "-Source https://securitytools.pkgs.visualstudio.com/_packaging/Guardian/nuget/v3/index.json", "-OutputDirectory $Path", "-NonInteractive", "-NoCache") + $argumentList = @("install", "Microsoft.Guardian.Cli.win-x64", "-Source $Source", "-OutputDirectory $Path", "-NonInteractive", "-NoCache") if ($Version) { $argumentList += "-Version $Version" diff --git a/eng/common/templates-official/steps/execute-sdl.yml b/eng/common/templates-official/steps/execute-sdl.yml index 07426fde05d8..301d5c591ebd 100644 --- a/eng/common/templates-official/steps/execute-sdl.yml +++ b/eng/common/templates-official/steps/execute-sdl.yml @@ -9,8 +9,6 @@ parameters: steps: - task: NuGetAuthenticate@1 - inputs: - nuGetServiceConnections: GuardianConnect - task: NuGetToolInstaller@1 displayName: 'Install NuGet.exe' diff --git a/eng/common/templates-official/steps/get-federated-access-token.yml b/eng/common/templates-official/steps/get-federated-access-token.yml index e3786cef6dfd..55e33bd38f71 100644 --- a/eng/common/templates-official/steps/get-federated-access-token.yml +++ b/eng/common/templates-official/steps/get-federated-access-token.yml @@ -3,6 +3,12 @@ parameters: type: string - name: outputVariableName type: string +- name: stepName + type: string + default: 'getFederatedAccessToken' +- name: condition + type: string + default: '' # Resource to get a token for. Common values include: # - '499b84ac-1321-427f-aa17-267ca6975798' for Azure DevOps # - 'https://storage.azure.com/' for storage @@ -10,10 +16,16 @@ parameters: - name: resource type: string default: '499b84ac-1321-427f-aa17-267ca6975798' +- name: isStepOutputVariable + type: boolean + default: false steps: - task: AzureCLI@2 displayName: 'Getting federated access token for feeds' + name: ${{ parameters.stepName }} + ${{ if ne(parameters.condition, '') }}: + condition: ${{ parameters.condition }} inputs: azureSubscription: ${{ parameters.federatedServiceConnection }} scriptType: 'pscore' @@ -25,4 +37,4 @@ steps: exit 1 } Write-Host "Setting '${{ parameters.outputVariableName }}' with the access token value" - Write-Host "##vso[task.setvariable variable=${{ parameters.outputVariableName }};issecret=true]$accessToken" + Write-Host "##vso[task.setvariable variable=${{ parameters.outputVariableName }};issecret=true;isOutput=${{ parameters.isStepOutputVariable }}]$accessToken" \ No newline at end of file diff --git a/eng/common/templates/steps/execute-sdl.yml b/eng/common/templates/steps/execute-sdl.yml index 07426fde05d8..fe0ebf8c904e 100644 --- a/eng/common/templates/steps/execute-sdl.yml +++ b/eng/common/templates/steps/execute-sdl.yml @@ -9,8 +9,6 @@ parameters: steps: - task: NuGetAuthenticate@1 - inputs: - nuGetServiceConnections: GuardianConnect - task: NuGetToolInstaller@1 displayName: 'Install NuGet.exe' @@ -36,16 +34,19 @@ steps: displayName: Execute SDL (Overridden) continueOnError: ${{ parameters.sdlContinueOnError }} condition: ${{ parameters.condition }} + env: + GUARDIAN_DEFAULT_PACKAGE_SOURCE_SECRET: $(System.AccessToken) - ${{ if eq(parameters.overrideParameters, '') }}: - powershell: ${{ parameters.executeAllSdlToolsScript }} -GuardianCliLocation $(GuardianCliLocation) -NugetPackageDirectory $(Build.SourcesDirectory)\.packages - -AzureDevOpsAccessToken $(dn-bot-dotnet-build-rw-code-rw) ${{ parameters.additionalParameters }} displayName: Execute SDL continueOnError: ${{ parameters.sdlContinueOnError }} condition: ${{ parameters.condition }} + env: + GUARDIAN_DEFAULT_PACKAGE_SOURCE_SECRET: $(System.AccessToken) - ${{ if ne(parameters.publishGuardianDirectoryToPipeline, 'false') }}: # We want to publish the Guardian results and configuration for easy diagnosis. However, the diff --git a/eng/common/templates/steps/get-federated-access-token.yml b/eng/common/templates/steps/get-federated-access-token.yml index c8c49cc0e8f0..55e33bd38f71 100644 --- a/eng/common/templates/steps/get-federated-access-token.yml +++ b/eng/common/templates/steps/get-federated-access-token.yml @@ -3,6 +3,12 @@ parameters: type: string - name: outputVariableName type: string +- name: stepName + type: string + default: 'getFederatedAccessToken' +- name: condition + type: string + default: '' # Resource to get a token for. Common values include: # - '499b84ac-1321-427f-aa17-267ca6975798' for Azure DevOps # - 'https://storage.azure.com/' for storage @@ -10,10 +16,16 @@ parameters: - name: resource type: string default: '499b84ac-1321-427f-aa17-267ca6975798' +- name: isStepOutputVariable + type: boolean + default: false steps: - task: AzureCLI@2 displayName: 'Getting federated access token for feeds' + name: ${{ parameters.stepName }} + ${{ if ne(parameters.condition, '') }}: + condition: ${{ parameters.condition }} inputs: azureSubscription: ${{ parameters.federatedServiceConnection }} scriptType: 'pscore' @@ -25,4 +37,4 @@ steps: exit 1 } Write-Host "Setting '${{ parameters.outputVariableName }}' with the access token value" - Write-Host "##vso[task.setvariable variable=${{ parameters.outputVariableName }};issecret=true]$accessToken" \ No newline at end of file + Write-Host "##vso[task.setvariable variable=${{ parameters.outputVariableName }};issecret=true;isOutput=${{ parameters.isStepOutputVariable }}]$accessToken" \ No newline at end of file diff --git a/global.json b/global.json index e1447c5750a5..420420f45908 100644 --- a/global.json +++ b/global.json @@ -27,7 +27,7 @@ }, "msbuild-sdks": { "Yarn.MSBuild": "1.22.19", - "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.24360.5", - "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.24360.5" + "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.24367.1", + "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.24367.1" } } From c1bbdb53869f31f3441611d13782506ae982060d Mon Sep 17 00:00:00 2001 From: DotNet-Bot Date: Wed, 17 Jul 2024 22:02:35 +0000 Subject: [PATCH 15/20] Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-efcore build 20240717.4 dotnet-ef , Microsoft.EntityFrameworkCore , Microsoft.EntityFrameworkCore.Design , Microsoft.EntityFrameworkCore.InMemory , Microsoft.EntityFrameworkCore.Relational , Microsoft.EntityFrameworkCore.Sqlite , Microsoft.EntityFrameworkCore.SqlServer , Microsoft.EntityFrameworkCore.Tools From Version 8.0.7 -> To Version 8.0.8 --- NuGet.config | 12 ++---------- eng/Version.Details.xml | 32 ++++++++++++++++---------------- eng/Versions.props | 16 ++++++++-------- 3 files changed, 26 insertions(+), 34 deletions(-) diff --git a/NuGet.config b/NuGet.config index 7a09cc094ea8..1a455317c69c 100644 --- a/NuGet.config +++ b/NuGet.config @@ -6,11 +6,7 @@ - - - - - + @@ -39,11 +35,7 @@ - - - - - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 062622502f1e..30450b38d403 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -9,37 +9,37 @@ --> - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 0d1256be4658567c8a24b4c027bdbb3dbd6de656 + 90d079985f33ae91c05b98ecf65e0ce38270ba55 - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 0d1256be4658567c8a24b4c027bdbb3dbd6de656 + 90d079985f33ae91c05b98ecf65e0ce38270ba55 - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 0d1256be4658567c8a24b4c027bdbb3dbd6de656 + 90d079985f33ae91c05b98ecf65e0ce38270ba55 - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 0d1256be4658567c8a24b4c027bdbb3dbd6de656 + 90d079985f33ae91c05b98ecf65e0ce38270ba55 - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 0d1256be4658567c8a24b4c027bdbb3dbd6de656 + 90d079985f33ae91c05b98ecf65e0ce38270ba55 - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 0d1256be4658567c8a24b4c027bdbb3dbd6de656 + 90d079985f33ae91c05b98ecf65e0ce38270ba55 - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 0d1256be4658567c8a24b4c027bdbb3dbd6de656 + 90d079985f33ae91c05b98ecf65e0ce38270ba55 - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 0d1256be4658567c8a24b4c027bdbb3dbd6de656 + 90d079985f33ae91c05b98ecf65e0ce38270ba55 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime diff --git a/eng/Versions.props b/eng/Versions.props index f04749a619b5..f544bea98f5c 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -143,14 +143,14 @@ 8.1.0-preview.23604.1 8.1.0-preview.23604.1 - 8.0.7 - 8.0.7 - 8.0.7 - 8.0.7 - 8.0.7 - 8.0.7 - 8.0.7 - 8.0.7 + 8.0.8 + 8.0.8 + 8.0.8 + 8.0.8 + 8.0.8 + 8.0.8 + 8.0.8 + 8.0.8 4.8.0-3.23518.7 4.8.0-3.23518.7 From 8627de289bea83ff85b0e54c4a085680b01668f8 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Thu, 18 Jul 2024 15:44:22 +0000 Subject: [PATCH 16/20] Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20240717.1 (#56875) [release/8.0] Update dependencies from dotnet/source-build-reference-packages --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 8548b11d2cfc..2f7c79bfeefc 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -338,9 +338,9 @@ 9a1c3e1b7f0c8763d4c96e593961a61a72679a7b - + https://github.com/dotnet/source-build-reference-packages - a489be6626823d2adcf396c9e6e72987a7229173 + 68d6cef51f1c82d71b435af0f040d72fdd1a782f diff --git a/eng/Versions.props b/eng/Versions.props index 0adeb2f534d7..cf45feb49c4c 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -168,7 +168,7 @@ 8.0.0-alpha.1.24269.1 - 8.0.0-alpha.1.24366.1 + 8.0.0-alpha.1.24367.1 2.0.0-beta-23228-03 From 502dd8fa19557cca5f5fa98338e71a7b21fe9d1b Mon Sep 17 00:00:00 2001 From: Sean Reeser Date: Thu, 18 Jul 2024 18:43:35 +0000 Subject: [PATCH 17/20] Updated ci.yml - name artifacts with attempt number where publish on error is true (logs, test results) --- .azure/pipelines/ci.yml | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/.azure/pipelines/ci.yml b/.azure/pipelines/ci.yml index 80db7eea0830..0395418fe330 100644 --- a/.azure/pipelines/ci.yml +++ b/.azure/pipelines/ci.yml @@ -160,7 +160,7 @@ extends: - powershell: ./eng/scripts/CodeCheck.ps1 -ci $(_InternalRuntimeDownloadArgs) displayName: Run eng/scripts/CodeCheck.ps1 artifacts: - - name: Code_Check_Logs + - name: Code_Check_Logs_Attempt_$(System.JobAttempt) path: artifacts/log/ publishOnError: true includeForks: true @@ -280,7 +280,7 @@ extends: displayName: Build ARM64 Installers artifacts: - - name: Windows_Logs + - name: Windows_Logs_Attempt_$(System.JobAttempt) path: artifacts/log/ publishOnError: true includeForks: true @@ -312,7 +312,7 @@ extends: $(_InternalRuntimeDownloadArgs) installNodeJs: false artifacts: - - name: MacOS_arm64_Logs + - name: MacOS_arm64_Logs_Attempt_$(System.JobAttempt) path: artifacts/log/ publishOnError: true includeForks: true @@ -342,7 +342,7 @@ extends: $(_InternalRuntimeDownloadArgs) installNodeJs: false artifacts: - - name: MacOS_x64_Logs + - name: MacOS_x64_Logs_Attempt_$(System.JobAttempt) path: artifacts/log/ publishOnError: true includeForks: true @@ -389,7 +389,7 @@ extends: displayName: Build RPM installers installNodeJs: false artifacts: - - name: Linux_x64_Logs + - name: Linux_x64_Logs_Attempt_$(System.JobAttempt) path: artifacts/log/ publishOnError: true includeForks: true @@ -420,7 +420,7 @@ extends: $(_InternalRuntimeDownloadArgs) installNodeJs: false artifacts: - - name: Linux_arm_Logs + - name: Linux_arm_Logs_Attempt_$(System.JobAttempt) path: artifacts/log/ publishOnError: true includeForks: true @@ -460,7 +460,7 @@ extends: displayName: Build RPM installers installNodeJs: false artifacts: - - name: Linux_arm64_Logs + - name: Linux_arm64_Logs_Attempt_$(System.JobAttempt) path: artifacts/log/ publishOnError: true includeForks: true @@ -494,7 +494,7 @@ extends: installNodeJs: false disableComponentGovernance: true artifacts: - - name: Linux_musl_x64_Logs + - name: Linux_musl_x64_Logs_Attempt_$(System.JobAttempt) path: artifacts/log/ publishOnError: true includeForks: true @@ -528,7 +528,7 @@ extends: $(_InternalRuntimeDownloadArgs) installNodeJs: false artifacts: - - name: Linux_musl_arm_Logs + - name: Linux_musl_arm_Logs_Attempt_$(System.JobAttempt) path: artifacts/log/ publishOnError: true includeForks: true @@ -562,7 +562,7 @@ extends: $(_InternalRuntimeDownloadArgs) installNodeJs: false artifacts: - - name: Linux_musl_arm64_Logs + - name: Linux_musl_arm64_Logs_Attempt_$(System.JobAttempt) path: artifacts/log/ publishOnError: true includeForks: true @@ -591,11 +591,11 @@ extends: - powershell: "& ./src/Servers/IIS/tools/UpdateIISExpressCertificate.ps1; & ./src/Servers/IIS/tools/update_schema.ps1" displayName: Setup IISExpress test certificates and schema artifacts: - - name: Windows_Test_Logs + - name: Windows_Test_Logs_Attempt_$(System.JobAttempt) path: artifacts/log/ publishOnError: true includeForks: true - - name: Windows_Test_Results + - name: Windows_Test_Results_Attempt_$(System.JobAttempt) path: artifacts/TestResults/ publishOnError: true includeForks: true @@ -612,11 +612,11 @@ extends: - bash: "./eng/scripts/install-nginx-mac.sh" displayName: Installing Nginx artifacts: - - name: MacOS_Test_Logs + - name: MacOS_Test_Logs_Attempt_$(System.JobAttempt) path: artifacts/log/ publishOnError: true includeForks: true - - name: MacOS_Test_Results + - name: MacOS_Test_Results_Attempt_$(System.JobAttempt) path: artifacts/TestResults/ publishOnError: true includeForks: true @@ -635,11 +635,11 @@ extends: - bash: "echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p" displayName: Increase inotify limit artifacts: - - name: Linux_Test_Logs + - name: Linux_Test_Logs_Attempt_$(System.JobAttempt) path: artifacts/log/ publishOnError: true includeForks: true - - name: Linux_Test_Results + - name: Linux_Test_Results_Attempt_$(System.JobAttempt) path: artifacts/TestResults/ publishOnError: true includeForks: true @@ -666,7 +666,7 @@ extends: SYSTEM_ACCESSTOKEN: $(System.AccessToken) # We need to set this env var to publish helix results to Azure Dev Ops artifacts: - - name: Helix_logs + - name: Helix_Logs_Attempt_$(System.JobAttempt) path: artifacts/log/ publishOnError: true includeForks: true From d7cd46e469034c4de7d967b989eb5f0c4681b872 Mon Sep 17 00:00:00 2001 From: Sean Reeser Date: Thu, 18 Jul 2024 18:45:54 +0000 Subject: [PATCH 18/20] Updated ci-public.yml - add job attempt number to log and test results artifacts that are published on error outcomes. --- .azure/pipelines/ci-public.yml | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/.azure/pipelines/ci-public.yml b/.azure/pipelines/ci-public.yml index eb9ffeaa3cd5..730efedf620d 100644 --- a/.azure/pipelines/ci-public.yml +++ b/.azure/pipelines/ci-public.yml @@ -93,7 +93,7 @@ stages: - powershell: ./eng/scripts/CodeCheck.ps1 -ci $(_InternalRuntimeDownloadArgs) displayName: Run eng/scripts/CodeCheck.ps1 artifacts: - - name: Code_Check_Logs + - name: Code_Check_Logs_Attempt_$(System.JobAttempt) path: artifacts/log/ publishOnError: true includeForks: true @@ -213,7 +213,7 @@ stages: displayName: Build ARM64 Installers artifacts: - - name: Windows_Logs + - name: Windows_Logs_Attempt_$(System.JobAttempt) path: artifacts/log/ publishOnError: true includeForks: true @@ -246,7 +246,7 @@ stages: $(_InternalRuntimeDownloadArgs) installNodeJs: false artifacts: - - name: MacOS_arm64_Logs + - name: MacOS_arm64_Logs_Attempt_$(System.JobAttempt) path: artifacts/log/ publishOnError: true includeForks: true @@ -277,7 +277,7 @@ stages: $(_InternalRuntimeDownloadArgs) installNodeJs: false artifacts: - - name: MacOS_x64_Logs + - name: MacOS_x64_Logs_Attempt_$(System.JobAttempt) path: artifacts/log/ publishOnError: true includeForks: true @@ -324,7 +324,7 @@ stages: displayName: Build RPM installers installNodeJs: false artifacts: - - name: Linux_x64_Logs + - name: Linux_x64_Logs_Attempt_$(System.JobAttempt) path: artifacts/log/ publishOnError: true includeForks: true @@ -355,7 +355,7 @@ stages: $(_InternalRuntimeDownloadArgs) installNodeJs: false artifacts: - - name: Linux_arm_Logs + - name: Linux_arm_Logs_Attempt_$(System.JobAttempt) path: artifacts/log/ publishOnError: true includeForks: true @@ -395,7 +395,7 @@ stages: displayName: Build RPM installers installNodeJs: false artifacts: - - name: Linux_arm64_Logs + - name: Linux_arm64_Logs_Attempt_$(System.JobAttempt) path: artifacts/log/ publishOnError: true includeForks: true @@ -429,7 +429,7 @@ stages: installNodeJs: false disableComponentGovernance: true artifacts: - - name: Linux_musl_x64_Logs + - name: Linux_musl_x64_Logs_Attempt_$(System.JobAttempt) path: artifacts/log/ publishOnError: true includeForks: true @@ -463,7 +463,7 @@ stages: $(_InternalRuntimeDownloadArgs) installNodeJs: false artifacts: - - name: Linux_musl_arm_Logs + - name: Linux_musl_arm_Logs_Attempt_$(System.JobAttempt) path: artifacts/log/ publishOnError: true includeForks: true @@ -497,7 +497,7 @@ stages: $(_InternalRuntimeDownloadArgs) installNodeJs: false artifacts: - - name: Linux_musl_arm64_Logs + - name: Linux_musl_arm64_Logs_Attempt_$(System.JobAttempt) path: artifacts/log/ publishOnError: true includeForks: true @@ -526,11 +526,11 @@ stages: - powershell: "& ./src/Servers/IIS/tools/UpdateIISExpressCertificate.ps1; & ./src/Servers/IIS/tools/update_schema.ps1" displayName: Setup IISExpress test certificates and schema artifacts: - - name: Windows_Test_Logs + - name: Windows_Test_Logs_Attempt_$(System.JobAttempt) path: artifacts/log/ publishOnError: true includeForks: true - - name: Windows_Test_Results + - name: Windows_Test_Results_Attempt_$(System.JobAttempt) path: artifacts/TestResults/ publishOnError: true includeForks: true @@ -547,11 +547,11 @@ stages: - bash: "./eng/scripts/install-nginx-mac.sh" displayName: Installing Nginx artifacts: - - name: MacOS_Test_Logs + - name: MacOS_Test_Logs_Attempt_$(System.JobAttempt) path: artifacts/log/ publishOnError: true includeForks: true - - name: MacOS_Test_Results + - name: MacOS_Test_Results_Attempt_$(System.JobAttempt) path: artifacts/TestResults/ publishOnError: true includeForks: true @@ -570,11 +570,11 @@ stages: - bash: "echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p" displayName: Increase inotify limit artifacts: - - name: Linux_Test_Logs + - name: Linux_Test_Logs_Attempt_$(System.JobAttempt) path: artifacts/log/ publishOnError: true includeForks: true - - name: Linux_Test_Results + - name: Linux_Test_Results_Attempt_$(System.JobAttempt) path: artifacts/TestResults/ publishOnError: true includeForks: true @@ -601,7 +601,7 @@ stages: SYSTEM_ACCESSTOKEN: $(System.AccessToken) # We need to set this env var to publish helix results to Azure Dev Ops artifacts: - - name: Helix_logs + - name: Helix_Logs_Attempt_$(System.JobAttempt) path: artifacts/log/ publishOnError: true includeForks: true From b4bd41300b674902f782590bf3a719f31bebfabd Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Fri, 19 Jul 2024 18:06:13 +0000 Subject: [PATCH 19/20] Merged PR 41232: Regenerate SAS before installers #### AI description (iteration 1) #### PR Classification Code enhancement to regenerate runtime tokens before building installers. #### PR Summary This pull request ensures that runtime tokens are regenerated before building the installers to avoid hitting the hour timeout. - `.azure/pipelines/ci.yml`: Added a step to regenerate runtime tokens before the installer build process. --- .azure/pipelines/jobs/default-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure/pipelines/jobs/default-build.yml b/.azure/pipelines/jobs/default-build.yml index 0570bfc1d372..00043ee1b4c1 100644 --- a/.azure/pipelines/jobs/default-build.yml +++ b/.azure/pipelines/jobs/default-build.yml @@ -446,7 +446,7 @@ jobs: parameters: federatedServiceConnection: 'dotnetbuilds-internal-read' outputVariableName: 'dotnetbuilds-internal-container-read-token' - expiryInHours: 1 + expiryInHours: 2 base64Encode: false storageAccount: dotnetbuilds container: internal From 954f61dd38b33caa2b736c73530bd5a294174437 Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Fri, 19 Jul 2024 22:20:50 +0000 Subject: [PATCH 20/20] Merged PR 41234: Update token timeout #### AI description (iteration 1) #### PR Classification Configuration update. #### PR Summary This pull request updates the token timeout configuration in the build pipeline. - `.azure/pipelines/jobs/default-build.yml`: Added `expiryInHours` parameter with a value of 2 to the `enable-internal-runtimes.yml` template. --- .azure/pipelines/jobs/default-build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.azure/pipelines/jobs/default-build.yml b/.azure/pipelines/jobs/default-build.yml index 00043ee1b4c1..f45f395d6ae3 100644 --- a/.azure/pipelines/jobs/default-build.yml +++ b/.azure/pipelines/jobs/default-build.yml @@ -440,6 +440,8 @@ jobs: # Populates internal runtime SAS tokens. - template: /eng/common/templates-official/steps/enable-internal-runtimes.yml + parameters: + expiryInHours: 2 # Populate dotnetbuilds-internal base64 sas tokens. - template: /eng/common/templates-official/steps/get-delegation-sas.yml