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
26 changes: 13 additions & 13 deletions eng/build/Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,44 +3,44 @@
<ItemGroup>
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
<PackageVersion Include="Colors.Net" Version="1.1.0" />
<PackageVersion Include="WindowsAzure.Storage" Version="9.3.1" />
<PackageVersion Include="WindowsAzure.Storage" Version="9.3.3" />
<PackageVersion Include="StyleCop.Analyzers" Version="1.2.0-beta.556" />
</ItemGroup>
<!-- abstractions-->
<ItemGroup>
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="9.0.2" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="10.0.0" />
<PackageVersion Include="Microsoft.Extensions.Logging" Version="10.0.0" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="10.0.3" />
<PackageVersion Include="System.CommandLine" Version="2.0.0-beta5.25306.101" />
</ItemGroup>
<!-- func -->
<ItemGroup>
<PackageVersion Include="Autofac" Version="4.6.2" />
<PackageVersion Include="Azure.Identity" Version="1.17.1" />
<PackageVersion Include="Azure.Security.KeyVault.Secrets" Version="4.7.0" />
<PackageVersion Include="AccentedCommandLineParser" Version="2.0.0" />
<PackageVersion Include="Azure.Security.KeyVault.Secrets" Version="4.6.0" />
<PackageVersion Include="AccentedCommandLineParser" Version="2.0.1" />
<PackageVersion Include="Microsoft.ApplicationInsights" Version="2.23.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.1047.100" />
<PackageVersion Include="Microsoft.Azure.WebJobs.Script.WebHost" Version="4.1049.200" />
<PackageVersion Include="Microsoft.Build" Version="17.0.0" />
<PackageVersion Include="Microsoft.Identity.Client" Version="4.78.0" />
<PackageVersion Include="Microsoft.Identity.Client" Version="4.83.3" />
<PackageVersion Include="NuGet.Packaging" Version="5.11.6" />
<PackageVersion Include="System.Formats.Asn1" Version="6.0.1" />
<PackageVersion Include="YamlDotNet" Version="6.0.0" />
<!-- Transitive dependency -->
<PackageVersion Include="System.Text.Json" Version="8.0.5" />
</ItemGroup>
<!-- workers -->
<ItemGroup>
<PackageVersion Include="Microsoft.Azure.Functions.JavaWorker" Version="2.19.4" />
<PackageVersion Include="Microsoft.Azure.Functions.NodeJsWorker" Version="3.12.0" />
<PackageVersion Include="Microsoft.Azure.Functions.NodeJsWorker" Version="3.13.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.4581" />
<PackageVersion Include="Microsoft.Azure.Functions.PythonWorker" Version="4.42.0" />
<PackageVersion Include="Microsoft.Azure.Functions.PowerShellWorker.PS7.4" Version="4.0.4759" />
<PackageVersion Include="Microsoft.Azure.Functions.PowerShellWorker.PS7.6" Version="4.0.4778" />
<PackageVersion Include="Microsoft.Azure.Functions.PythonWorker" Version="4.44.0" />
</ItemGroup>
<!-- host -->
<ItemGroup>
<PackageVersion Include="Microsoft.NETCore.DotNetAppHost" Version="8.0.8" />
<PackageVersion Include="Microsoft.NETCore.DotNetAppHost" Version="10.0.0" />
</ItemGroup>
<!-- test projects -->
<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion eng/ci/templates/jobs/test-e2e-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- pwsh: |
dotnet publish src/Cli/func/Azure.Functions.Cli.csproj `
-c Release `
-f net8.0 `
-f net10.0 `
-r $(runtime) `
--self-contained `
-o $(Build.ArtifactStagingDirectory)/artifacts/$(runtime)
Expand Down
2 changes: 1 addition & 1 deletion eng/ci/templates/jobs/test-e2e-osx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
- pwsh: |
dotnet publish src/Cli/func/Azure.Functions.Cli.csproj `
-c Release `
-f net8.0 `
-f net10.0 `
-r $(runtime) `
--self-contained `
-o $(Build.ArtifactStagingDirectory)/artifacts/$(runtime)
Expand Down
2 changes: 1 addition & 1 deletion eng/ci/templates/jobs/test-e2e-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- pwsh: |
dotnet publish src/Cli/func/Azure.Functions.Cli.csproj `
-c Release `
-f net8.0 `
-f net10.0 `
-r $(runtime) `
--self-contained `
-o $(Build.ArtifactStagingDirectory)/artifacts/$(runtime)
Expand Down
2 changes: 1 addition & 1 deletion eng/ci/templates/official/jobs/pack-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- pwsh: |
dotnet build src/Cli/func/Azure.Functions.Cli.csproj `
-c Release `
-f net8.0 `
-f net10.0 `
--no-restore `
/p:NoWorkers="true" `
/p:SkipTemplates="true" `
Expand Down
2 changes: 1 addition & 1 deletion eng/ci/templates/official/jobs/publish-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
dotnet publish src/Cli/func/Azure.Functions.Cli.csproj `
-o "$(Build.Repository.LocalPath)/artifacts/${{ parameters.runtime }}" `
-c Release `
-f net8.0 `
-f net10.0 `
-r $runtime `
--self-contained `
--no-restore `
Expand Down
2 changes: 1 addition & 1 deletion eng/ci/templates/public/jobs/build-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
dotnet publish src/Cli/func/Azure.Functions.Cli.csproj `
-o "$(Build.ArtifactStagingDirectory)/artifacts/$runtime" `
-c Release `
-f net8.0 `
-f net10.0 `
-r $runtime `
--self-contained `
/p:ZipAfterPublish=true `
Expand Down
2 changes: 1 addition & 1 deletion eng/ci/templates/public/steps/run-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ steps:
inputs:
command: 'test'
projects: '**/Azure.Functions.Cli.UnitTests.csproj'
arguments: '--framework net8.0'
arguments: '--framework net10.0'

- task: PublishTestResults@2
displayName: 'Publish test results'
Expand Down
2 changes: 1 addition & 1 deletion eng/ci/templates/steps/run-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ steps:
$worker = '${{ parameters.worker }}'
$proj = '$(Build.SourcesDirectory)/test/Cli/Func.E2ETests/Azure.Functions.Cli.E2ETests.csproj'
$baseArgs = @(
'--framework', 'net8.0'
'--framework', 'net10.0'
'--blame-hang-timeout', '10m'
'--logger', 'console;verbosity=detailed'
'--logger', 'trx'
Expand Down
2 changes: 1 addition & 1 deletion eng/scripts/validate-worker-versions.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ $workerPropsToWorkerName = @{
"eng/build/Workers.Node.props" = @("NodeJsWorker")
"eng/build/Workers.Java.props" = @("JavaWorker")
"eng/build/Workers.Python.props" = @("PythonWorker")
"eng/build/Workers.Powershell.props" = @("PowerShellWorker.PS7.0", "PowerShellWorker.PS7.2", "PowerShellWorker.PS7.4")
"eng/build/Workers.Powershell.props" = @("PowerShellWorker.PS7.0", "PowerShellWorker.PS7.2", "PowerShellWorker.PS7.4", "PowerShellWorker.PS7.6")
}

$failedValidation = $false
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "10.0.201",
"version": "10.0.103",
"allowPrerelease": true,
"rollForward": "latestMajor"
},
Expand Down
16 changes: 13 additions & 3 deletions release_notes.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
# Azure Functions CLI 4.9.0
# Azure Functions CLI 4.11.0

#### Host Version

- Host Runtime Version: 4.1047.100
- Host Runtime Version: 4.1049.200
- In-Proc CLI:
- CLI Version: 4.4.0
- Host Runtime Version: 4.46.100 (includes 4.846.100, 4.646.100)

#### Changes

- Fixed `func pack --python` stripping `.dist-info` directories from packaged dependencies (#4853)
- Updated target framework to .NET 10
- Migrated from deprecated `Microsoft.DotNet.PlatformAbstractions` to `System.Runtime.InteropServices.RuntimeInformation`
- Migrated from deprecated `X509Certificate2` constructor to `X509CertificateLoader`
- Bumped `Microsoft.Extensions.DependencyInjection` to 10.0.0
- Bumped `Microsoft.Extensions.Logging` / `Logging.Abstractions` to 10.0.0 / 10.0.3
- Bumped `Azure.Identity` to 1.20.0, `Azure.Security.KeyVault.Secrets` to 4.9.0
- Bumped `Microsoft.Identity.Client` to 4.83.3
- Bumped `Newtonsoft.Json` to 13.0.4, `WindowsAzure.Storage` to 9.3.3
- Removed unnecessary transitive pinning of `System.Text.Json`, `System.Formats.Asn1`, `System.Private.Uri`
- Updated worker versions to match host requirements (NodeJs 3.13.0, Python 4.44.0)

4 changes: 4 additions & 0 deletions skipPackagesCve.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{
"_comments": {
"NuGet.Packaging": "Pinned to 5.11.6 transitively by the Functions host (Microsoft.Azure.WebJobs.Script.WebHost -> NuGet.ProjectModel -> NuGet.DependencyResolver.Core -> NuGet.Protocol -> NuGet.Packaging). Cannot upgrade independently until the host moves to NuGet 6.x. Advisory: GHSA-g4vj-cjjj-v7hg (Low)."
},
"packages": [
"NuGet.Packaging"
]
}
2 changes: 1 addition & 1 deletion src/ArtifactAssembler/ArtifactAssembler.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<OutputType>Exe</OutputType>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<OutputType>Library</OutputType>
</PropertyGroup>
Expand Down
4 changes: 4 additions & 0 deletions src/Cli/func/Actions/HostActions/StartHostAction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ public override ICommandLineParserResult ParseArgs(string[] args)
return base.ParseArgs(args);
}

#pragma warning disable ASPDEPR008 // Startup implements IStartup which requires IWebHost lifecycle
private async Task<IWebHost> BuildWebHost(ScriptApplicationHostOptions hostOptions, Uri listenAddress, Uri baseAddress, X509Certificate2 certificate)
{
LoggingFilterHelper loggingFilterHelper = new LoggingFilterHelper(_hostJsonConfig, VerboseLogging, UserLogLevel);
Expand Down Expand Up @@ -281,6 +282,7 @@ private async Task<IWebHost> BuildWebHost(ScriptApplicationHostOptions hostOptio
})
.Build();
}
#pragma warning restore ASPDEPR008

internal async Task<IDictionary<string, string>> GetConfigurationSettings(string scriptPath, Uri uri)
{
Expand Down Expand Up @@ -465,7 +467,9 @@ public override async Task RunAsync()
await ExtensionBundleHelper.GetExtensionBundle();
}

#pragma warning disable ASPDEPR008
IWebHost host = await BuildWebHost(hostOptions, listenUri, baseUri, certificate);
#pragma warning restore ASPDEPR008
var runTask = host.RunAsync();
var hostService = host.Services.GetRequiredService<WebJobsScriptHostService>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ private static async Task WriteDockerfile(WorkerRuntime workerRuntime, string la
}
else if (workerRuntime == Helpers.WorkerRuntime.Powershell)
{
await FileSystemHelpers.WriteFileIfNotExists("Dockerfile", await StaticResources.DockerfilePowershell72);
await FileSystemHelpers.WriteFileIfNotExists("Dockerfile", await StaticResources.DockerfilePowershell74);
}
else if (workerRuntime == Helpers.WorkerRuntime.Custom)
{
Expand Down
6 changes: 2 additions & 4 deletions src/Cli/func/Azure.Functions.Cli.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk" InitialTargets="ExcludeWorkersFromReadyToRun">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<OutputType>Exe</OutputType>
<AssemblyName>func</AssemblyName>
<RuntimeIdentifiers>win-x64;win-x86;win-arm64;linux-x64;linux-arm64;osx-x64;osx-arm64</RuntimeIdentifiers>
Expand Down Expand Up @@ -42,12 +42,9 @@
<PackageReference Include="Microsoft.Identity.Client" />
<PackageReference Include="Newtonsoft.Json" />
<PackageReference Include="NuGet.Packaging" />
<PackageReference Include="System.Formats.Asn1" />
<PackageReference Include="StyleCop.Analyzers" />
<PackageReference Include="WindowsAzure.Storage" />
<PackageReference Include="YamlDotNet" />
<!-- Transitive dependency -->
<PackageReference Include="System.Text.Json" />
</ItemGroup>

<ItemGroup Condition="'$(NoWorkers)' != 'true'">
Expand All @@ -56,6 +53,7 @@
<PackageReference Include="Microsoft.Azure.Functions.PowerShellWorker.PS7.0" />
<PackageReference Include="Microsoft.Azure.Functions.PowerShellWorker.PS7.2" />
<PackageReference Include="Microsoft.Azure.Functions.PowerShellWorker.PS7.4" />
<PackageReference Include="Microsoft.Azure.Functions.PowerShellWorker.PS7.6" />
<PackageReference Include="Microsoft.Azure.Functions.PythonWorker" />
</ItemGroup>

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.9.0</VersionPrefix>
<VersionPrefix>4.11.0</VersionPrefix>
<VersionSuffix></VersionSuffix>
<UpdateBuildNumber>true</UpdateBuildNumber>
</PropertyGroup>
Expand Down
4 changes: 2 additions & 2 deletions src/Cli/func/Helpers/SecurityHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ internal static async Task<X509Certificate2> GetOrCreateCertificate(string certP
certPassword = File.Exists(certPassword)
? File.ReadAllText(certPassword).Trim()
: certPassword;
return new X509Certificate2(certPath, certPassword);
return X509CertificateLoader.LoadPkcs12FromFile(certPath, certPassword);
}
else if (CommandChecker.CommandExists("openssl"))
{
Expand Down Expand Up @@ -116,7 +116,7 @@ internal static async Task<X509Certificate2> CreateCertificateOpenSSL()
throw new CliException($"Could not create a Certificate using openssl.");
}

return new X509Certificate2($"{certFileNames}certificate.pfx", DEFAULT_PASSWORD);
return X509CertificateLoader.LoadPkcs12FromFile($"{certFileNames}certificate.pfx", DEFAULT_PASSWORD);
}

public static string CalculateMd5(Stream stream)
Expand Down
7 changes: 7 additions & 0 deletions src/Cli/func/StaticResources/Dockerfile.powershell7.4
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# To enable ssh & remote debugging on app service change the base image to the one below
# FROM mcr.microsoft.com/azure-functions/powershell:4-powershell7.4-appservice
FROM mcr.microsoft.com/azure-functions/powershell:4-powershell7.4
ENV AzureWebJobsScriptRoot=/home/site/wwwroot \
AzureFunctionsJobHost__Logging__Console__IsEnabled=true

COPY . /home/site/wwwroot
13 changes: 10 additions & 3 deletions src/Cli/func/StaticResources/StaticResources.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ public static class StaticResources

public static Task<string> DockerfilePowershell72 => GetValue("Dockerfile.powershell7.2");

public static Task<string> DockerfilePowershell74 => GetValue("Dockerfile.powershell7.4");

public static Task<string> DockerfileJavaScript => GetValue("Dockerfile.javascript");

public static Task<string> DockerfileTypeScript => GetValue("Dockerfile.typescript");
Expand Down Expand Up @@ -116,10 +118,15 @@ public static async Task<string> GetValue(string name)
using (var reader = new StreamReader(stream))
{
var sb = new StringBuilder();
while (!reader.EndOfStream)
string line;
while ((line = await reader.ReadLineAsync()) != null)
{
var line = await reader.ReadLineAsync();
sb.AppendFormat("{0}{1}", line, reader.EndOfStream ? string.Empty : Environment.NewLine);
if (sb.Length > 0)
{
sb.Append(Environment.NewLine);
}

sb.Append(line);
}

return sb.ToString();
Expand Down
3 changes: 3 additions & 0 deletions src/Cli/func/StaticResources/StaticResources.props
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@
<EmbeddedResource Include="$(MSBuildThisFileDirectory)Dockerfile.powershell7.2">
<LogicalName>$(AssemblyName).Dockerfile.powershell7.2</LogicalName>
</EmbeddedResource>
<EmbeddedResource Include="$(MSBuildThisFileDirectory)Dockerfile.powershell7.4">
<LogicalName>$(AssemblyName).Dockerfile.powershell7.4</LogicalName>
</EmbeddedResource>
<EmbeddedResource Include="$(MSBuildThisFileDirectory)Dockerfile.python3.9">
<LogicalName>$(AssemblyName).Dockerfile.python3.9</LogicalName>
</EmbeddedResource>
Expand Down
Loading
Loading