Skip to content

Commit 4433a03

Browse files
authored
Exclude python worker for win-arm64 builds & remove ArmAuthenticationOptions schema (#4423)
1 parent 0e387d7 commit 4433a03

File tree

4 files changed

+16
-9
lines changed

4 files changed

+16
-9
lines changed

build/BuildSteps.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,9 @@ public static void FilterPowershellRuntimes()
193193
public static void FilterPythonRuntimes()
194194
{
195195
var minifiedRuntimes = Settings.TargetRuntimes.Where(r => r.StartsWith(Settings.MinifiedVersionPrefix));
196-
foreach (var runtime in Settings.TargetRuntimes.Except(minifiedRuntimes))
196+
var unsupportedPythonRuntimes = Settings.UnsupportedPythonRuntimes;
197+
198+
foreach (var runtime in Settings.TargetRuntimes.Except(minifiedRuntimes).Except(unsupportedPythonRuntimes))
197199
{
198200
var pythonWorkerPath = Path.Combine(Settings.OutputDir, runtime, "workers", "python");
199201
var allPythonVersions = Directory.GetDirectories(pythonWorkerPath);

build/Settings.cs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,10 @@ private static string config(string @default = null, [CallerMemberName] string k
5252
"osx-arm64",
5353
"win-x86",
5454
"win-x64",
55-
"win-arm64" };
55+
"win-arm64"
56+
};
57+
58+
public static readonly string[] UnsupportedPythonRuntimes = new[] { "win-arm64" };
5659

5760
public static readonly Dictionary<string, string> RuntimesToOS = new Dictionary<string, string>
5861
{
@@ -180,15 +183,15 @@ private static Dictionary<string, string[]> GetPowerShell74Runtimes()
180183
public static readonly string OutputDir = Path.Combine(Path.GetFullPath(".."), "artifacts");
181184

182185
public static readonly string SBOMManifestTelemetryDir = Path.Combine(OutputDir, "SBOMManifestTelemetry");
183-
186+
184187
public static string TargetFramework = "net6.0";
185188

186189
public static readonly string NupkgPublishDir = Path.GetFullPath($"../src/Azure.Functions.Cli/bin/Release/{TargetFramework}/publish");
187-
190+
188191
public static readonly string PreSignTestDir = "PreSignTest";
189192

190193
public static readonly string SignTestDir = "SignTest";
191-
194+
192195
public static readonly string DotnetIsolatedItemTemplates = $"https://www.nuget.org/api/v2/package/Microsoft.Azure.Functions.Worker.ItemTemplates/{DotnetIsolatedItemTemplatesVersion}";
193196

194197
public static readonly string DotnetIsolatedProjectTemplates = $"https://www.nuget.org/api/v2/package/Microsoft.Azure.Functions.Worker.ProjectTemplates/{DotnetIsolatedProjectTemplatesVersion}";
@@ -275,7 +278,7 @@ public class SignInfo
275278
"Grpc.AspNetCore.Server.dll",
276279
"Grpc.Core.dll",
277280
"Grpc.Core.Api.dll",
278-
"Grpc.Net.Client.dll",
281+
"Grpc.Net.Client.dll",
279282
"Grpc.Net.ClientFactory.dll",
280283
"Grpc.Net.Common.dll",
281284
"grpc_csharp_ext.x64.dll",

src/Cli/func/Actions/HostActions/Startup.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,10 @@ public IServiceProvider ConfigureServices(IServiceCollection services)
6868
}
6969
else
7070
{
71+
// ArmAuthenticationOptions was removed with host v4.1038.300 - we need to double check the impact of this.
7172
services.AddAuthentication()
7273
.AddScriptJwtBearer()
73-
.AddScheme<AuthenticationLevelOptions, CliAuthenticationHandler<AuthenticationLevelOptions>>(AuthLevelAuthenticationDefaults.AuthenticationScheme, configureOptions: _ => { })
74-
.AddScheme<ArmAuthenticationOptions, CliAuthenticationHandler<ArmAuthenticationOptions>>(ArmAuthenticationDefaults.AuthenticationScheme, _ => { });
74+
.AddScheme<AuthenticationLevelOptions, CliAuthenticationHandler<AuthenticationLevelOptions>>(AuthLevelAuthenticationDefaults.AuthenticationScheme, configureOptions: _ => { });
7575
}
7676

7777
// Only set up authorization handler which bypasses all local auth if enableAuth param is not set

src/Cli/func/Azure.Functions.Cli.csproj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,9 @@
293293
<PackageReference Include="Microsoft.Azure.Functions.PowerShellWorker.PS7.0" />
294294
<PackageReference Include="Microsoft.Azure.Functions.PowerShellWorker.PS7.2" />
295295
<PackageReference Include="Microsoft.Azure.Functions.PowerShellWorker.PS7.4" />
296-
<PackageReference Include="Microsoft.Azure.Functions.PythonWorker" />
296+
<!-- PythonWorker v4.35 introduced an error when being build for win-arm64. For now, we will not include this package when we build
297+
core tools for win-arm64. This is a temporary measure as we figure out how we want this to go. -->
298+
<PackageReference Include="Microsoft.Azure.Functions.PythonWorker" Condition="'$(RuntimeIdentifier)' != 'win-arm64'" />
297299
</ItemGroup>
298300

299301
<ItemGroup>

0 commit comments

Comments
 (0)