From fd206781b6a36e7bd27251b36815190bbb4993d0 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 7 Nov 2025 19:52:08 +0000 Subject: [PATCH 1/5] Initial plan From 55689a319a95ce0602eb7ab9debb3a454c18b0b7 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 7 Nov 2025 20:02:31 +0000 Subject: [PATCH 2/5] Bump version to 4.5.0 with host version 4.1044.400 Co-authored-by: v-amakhan <186753324+v-amakhan@users.noreply.github.com> --- release_notes.md | 4 ++-- src/Cli/func/Directory.Version.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/release_notes.md b/release_notes.md index 81970a3c8..7a29b3221 100644 --- a/release_notes.md +++ b/release_notes.md @@ -1,8 +1,8 @@ -# Azure Functions CLI 4.4.0 +# Azure Functions CLI 4.5.0 #### Host Version -- Host Version: 4.1043.200 +- Host Version: 4.1044.400 - In-Proc Host Version: 4.41.100 (4.841.100, 4.641.100) #### Changes diff --git a/src/Cli/func/Directory.Version.props b/src/Cli/func/Directory.Version.props index bab5f2326..2fe77b42b 100644 --- a/src/Cli/func/Directory.Version.props +++ b/src/Cli/func/Directory.Version.props @@ -1,7 +1,7 @@ - 4.4.0 + 4.5.0 true From f66099eb8680387d9235a9bbdf8692f543d597dc Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 10 Nov 2025 17:44:18 +0000 Subject: [PATCH 3/5] Update In-Proc Host Version to 4.44.400 (4.844.100, 4.644.100) Co-authored-by: v-amakhan <186753324+v-amakhan@users.noreply.github.com> --- release_notes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release_notes.md b/release_notes.md index 7a29b3221..58bfaa681 100644 --- a/release_notes.md +++ b/release_notes.md @@ -3,7 +3,7 @@ #### Host Version - Host Version: 4.1044.400 -- In-Proc Host Version: 4.41.100 (4.841.100, 4.641.100) +- In-Proc Host Version: 4.44.400 (4.844.100, 4.644.100) #### Changes From 290911a10ef4dd3d0fab983ee2cfdbe07bc7d97c Mon Sep 17 00:00:00 2001 From: Lilian Kasem Date: Mon, 10 Nov 2025 11:19:30 -0800 Subject: [PATCH 4/5] Update host & worker pkgs and fix issues --- eng/build/Packages.props | 8 ++-- release_notes.md | 3 +- .../Actions/HostActions/StartHostAction.cs | 2 +- src/Cli/func/Common/Utilities.cs | 7 ++-- .../ExtensionBundle/ExtensionBundleHelper.cs | 3 +- .../SimpleHttpClientFactory.cs | 40 +++++++++++++++++++ 6 files changed, 53 insertions(+), 10 deletions(-) create mode 100644 src/Cli/func/ExtensionBundle/SimpleHttpClientFactory.cs diff --git a/eng/build/Packages.props b/eng/build/Packages.props index ad31fec61..f205dcbf4 100644 --- a/eng/build/Packages.props +++ b/eng/build/Packages.props @@ -20,7 +20,7 @@ - + @@ -32,11 +32,11 @@ - + - - + + diff --git a/release_notes.md b/release_notes.md index 58bfaa681..53bc2691a 100644 --- a/release_notes.md +++ b/release_notes.md @@ -3,10 +3,11 @@ #### Host Version - Host Version: 4.1044.400 -- In-Proc Host Version: 4.44.400 (4.844.100, 4.644.100) +- In-Proc Host Version: 4.44.100 (4.844.100, 4.644.100) #### Changes - Add updated Durable .NET templates (#4692) - Adding the MCP Tool Trigger Templates for the Node/Typescript (#4651) - Set `AzureWebJobsStorage` to use the storage emulator by default on all platforms (#4685) +- Set `FUNCTIONS_WORKER_RUNTIME` to custom if the `EnableMcpCustomHandlerPreview` feature flag is set (#4703) diff --git a/src/Cli/func/Actions/HostActions/StartHostAction.cs b/src/Cli/func/Actions/HostActions/StartHostAction.cs index d5fd75928..b138c5836 100644 --- a/src/Cli/func/Actions/HostActions/StartHostAction.cs +++ b/src/Cli/func/Actions/HostActions/StartHostAction.cs @@ -464,7 +464,7 @@ public override async Task RunAsync() if (hostService.State is not ScriptHostState.Stopping && hostService.State is not ScriptHostState.Stopped) { - await hostService.DelayUntilHostReady(); + await hostService.DelayUntilHostReadyAsync(); var scriptHost = hostService.Services.GetRequiredService(); var httpOptions = hostService.Services.GetRequiredService>(); diff --git a/src/Cli/func/Common/Utilities.cs b/src/Cli/func/Common/Utilities.cs index 124d8919b..1b540b729 100644 --- a/src/Cli/func/Common/Utilities.cs +++ b/src/Cli/func/Common/Utilities.cs @@ -297,9 +297,10 @@ internal static bool IsSystemLogCategory(string category) internal static IConfigurationRoot BuildHostJsonConfigutation(ScriptApplicationHostOptions hostOptions) { - IConfigurationBuilder builder = new ConfigurationBuilder(); - builder.Add(new HostJsonFileConfigurationSource(hostOptions, SystemEnvironment.Instance, loggerFactory: NullLoggerFactory.Instance, metricsLogger: new MetricsLogger())); - var configuration = builder.Build(); + var builder = new ConfigurationBuilder(); + var hostJsonFileConfigurationOptions = new HostJsonFileConfigurationOptions(hostOptions); + builder.Add(new HostJsonFileConfigurationSource(hostJsonFileConfigurationOptions, loggerFactory: NullLoggerFactory.Instance, metricsLogger: new MetricsLogger())); + IConfigurationRoot configuration = builder.Build(); return configuration; } diff --git a/src/Cli/func/ExtensionBundle/ExtensionBundleHelper.cs b/src/Cli/func/ExtensionBundle/ExtensionBundleHelper.cs index e66b0cfd8..ba5332af0 100644 --- a/src/Cli/func/ExtensionBundle/ExtensionBundleHelper.cs +++ b/src/Cli/func/ExtensionBundle/ExtensionBundleHelper.cs @@ -39,7 +39,8 @@ public static ExtensionBundleManager GetExtensionBundleManager() } var configOptions = new FunctionsHostingConfigOptions(); - return new ExtensionBundleManager(extensionBundleOption, SystemEnvironment.Instance, NullLoggerFactory.Instance, configOptions); + IHttpClientFactory httpClientFactory = new SimpleHttpClientFactory(); + return new ExtensionBundleManager(extensionBundleOption, SystemEnvironment.Instance, NullLoggerFactory.Instance, configOptions, httpClientFactory); } public static ExtensionBundleContentProvider GetExtensionBundleContentProvider() diff --git a/src/Cli/func/ExtensionBundle/SimpleHttpClientFactory.cs b/src/Cli/func/ExtensionBundle/SimpleHttpClientFactory.cs new file mode 100644 index 000000000..884e6ba1c --- /dev/null +++ b/src/Cli/func/ExtensionBundle/SimpleHttpClientFactory.cs @@ -0,0 +1,40 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the MIT License. See LICENSE in the project root for license information. + +using System.Collections.Concurrent; +using System.Net; + +namespace Azure.Functions.Cli.ExtensionBundle +{ + /// + /// Minimal IHttpClientFactory implementation for Core Tools. + /// Reuses a single HttpClient per logical name to avoid socket exhaustion. + /// + internal class SimpleHttpClientFactory : IHttpClientFactory + { + private readonly ConcurrentDictionary _clients = new(); + private static readonly TimeSpan _defaultTimeout = TimeSpan.FromMinutes(1); + + public HttpClient CreateClient(string name) + { + // Name can be ignored for now except for providing isolation if needed later. + return _clients.GetOrAdd(name ?? string.Empty, static _ => + { + var handler = new SocketsHttpHandler + { + AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate, + PooledConnectionIdleTimeout = TimeSpan.FromMinutes(2), + PooledConnectionLifetime = TimeSpan.FromMinutes(10) + }; + + var client = new HttpClient(handler, disposeHandler: true) + { + Timeout = _defaultTimeout + }; + + client.DefaultRequestHeaders.UserAgent.ParseAdd("azure-functions-core-tools-extension-bundle"); + return client; + }); + } + } +} From a71226e7dc71dd2aeb28b45a00f0c22cf018044e Mon Sep 17 00:00:00 2001 From: Lilian Kasem Date: Tue, 11 Nov 2025 09:14:58 -0800 Subject: [PATCH 5/5] Add new artifatc feed to nuget.config --- NuGet.Config | 1 + 1 file changed, 1 insertion(+) diff --git a/NuGet.Config b/NuGet.Config index 09c86f97c..f4ea0c9a7 100644 --- a/NuGet.Config +++ b/NuGet.Config @@ -9,5 +9,6 @@ +