Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions eng/build/Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<PackageVersion Include="Microsoft.ApplicationInsights" Version="2.22.0" />
<PackageVersion Include="Microsoft.AspNetCore.DataProtection" Version="2.2.0" />
<PackageVersion Include="Microsoft.Azure.DurableTask.AzureStorage.Internal" Version="1.4.0" />
<PackageVersion Include="Microsoft.Azure.WebJobs.Script.WebHost" Version="4.1043.200" />
<PackageVersion Include="Microsoft.Azure.WebJobs.Script.WebHost" Version="4.1044.400" />
<PackageVersion Include="Microsoft.Build" Version="17.0.0" />
<PackageVersion Include="Microsoft.Identity.Client" Version="4.73.1" />
<PackageVersion Include="NuGet.Packaging" Version="5.11.6" />
Expand All @@ -32,11 +32,11 @@
<!-- workers -->
<ItemGroup>
<PackageVersion Include="Microsoft.Azure.Functions.JavaWorker" Version="2.19.2" />
<PackageVersion Include="Microsoft.Azure.Functions.NodeJsWorker" Version="3.11.0" />
<PackageVersion Include="Microsoft.Azure.Functions.NodeJsWorker" Version="3.12.0" />
<PackageVersion Include="Microsoft.Azure.Functions.PowerShellWorker.PS7.0" Version="4.0.3148" />
<PackageVersion Include="Microsoft.Azure.Functions.PowerShellWorker.PS7.2" Version="4.0.4025" />
<PackageVersion Include="Microsoft.Azure.Functions.PowerShellWorker.PS7.4" Version="4.0.4206" />
<PackageVersion Include="Microsoft.Azure.Functions.PythonWorker" Version="4.39.2" />
<PackageVersion Include="Microsoft.Azure.Functions.PowerShellWorker.PS7.4" Version="4.0.4581" />
<PackageVersion Include="Microsoft.Azure.Functions.PythonWorker" Version="4.40.2" />
</ItemGroup>
<!-- host -->
<ItemGroup>
Expand Down
7 changes: 4 additions & 3 deletions release_notes.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# Azure Functions CLI 4.4.0
# Azure Functions CLI 4.5.0

#### Host Version

- Host Version: 4.1043.200
- In-Proc Host Version: 4.41.100 (4.841.100, 4.641.100)
- Host Version: 4.1044.400
- 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)
2 changes: 1 addition & 1 deletion src/Cli/func/Actions/HostActions/StartHostAction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<IScriptJobHost>();
var httpOptions = hostService.Services.GetRequiredService<IOptions<HttpOptions>>();
Expand Down
7 changes: 4 additions & 3 deletions src/Cli/func/Common/Utilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion src/Cli/func/Directory.Version.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>

<PropertyGroup>
<VersionPrefix>4.4.0</VersionPrefix>
<VersionPrefix>4.5.0</VersionPrefix>
<VersionSuffix></VersionSuffix>
<UpdateBuildNumber>true</UpdateBuildNumber>
</PropertyGroup>
Expand Down
3 changes: 2 additions & 1 deletion src/Cli/func/ExtensionBundle/ExtensionBundleHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
40 changes: 40 additions & 0 deletions src/Cli/func/ExtensionBundle/SimpleHttpClientFactory.cs
Original file line number Diff line number Diff line change
@@ -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
{
/// <summary>
/// Minimal IHttpClientFactory implementation for Core Tools.
/// Reuses a single HttpClient per logical name to avoid socket exhaustion.
/// </summary>
internal class SimpleHttpClientFactory : IHttpClientFactory
{
private readonly ConcurrentDictionary<string, HttpClient> _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;
});
}
}
}
Loading