Skip to content

Commit 096e481

Browse files
VpOfEngineeringazfuncghkshyjuFrancisco-Gaminoshreyas-gopalakrishna
authored
4.27.5 hotfix (#9609)
* Updating patch version * Sending command line args with functions- prefix to prevent conflicts (#9514) * Sending a second copy of command line args with "FUNCTIONS_" prefix * Cleanup * Sending a second copy of command line args with "FUNCTIONS_" prefix * switched to functions- prefix * Removed duplicate port from functions_uri * Switching to kebab case for the new args * Update test * Update native placeholder package to handle new args * Update release notes. * Limit dotnet-isolated specialization to 64 bit host process (#9553) * Skipping native placeholder specialization if host is not 64 bit process * formatting linting fix * Stylecop fix. * fix indentation * Adding E2E test. * Improving log message. * Switch from LogDebug to LogInformation * Fix tests to reflect logging changes * Logging with EventId * Logging using an event name * Updated release notes after rebase merge * Handling env reload response from native placeholder for failure case. (#9602) * Handling env reload response from native placeholder for failure case. * Almost working except one test needs cleanup * Cleanup * Cleanup * Fixing Worker.Extensions.Http package version to align with Http.AspNetCore package. * Logging error as it is received from the worker. * DotNetIsolatedNativeHost package to 1.0.2 * Inlining a variable (Reverting to previous version) * Updating release notes for 4.27.5 * Update PowerShell Language Workers 7.0 (to version 4.0.2973), 7.2 (to version 4.0.2974), and 7.4 (to version 4.0.2975) (#9528) * Upgrade PowerShell language worker 7.4 to 4.0.2975 * Upgrade PowerShell language worker 7.2 to 4.0.2974 * Upgrade PowerShell language worker 7.0 to 4.0.2973 * Update release notes * Update Java Worker Version to 2.13.0 (#9544) * Update Java Worker Version to 2.13.0 * Update release_notes.md for Java worker --------- Co-authored-by: AzureFunctionsJava <[email protected]> --------- Co-authored-by: azfuncgh <[email protected]> Co-authored-by: Shyju Krishnankutty <[email protected]> Co-authored-by: Francisco Gamino <[email protected]> Co-authored-by: Shreyas Gopalakrishna <[email protected]> Co-authored-by: AzureFunctionsJava <[email protected]>
1 parent 60ba40a commit 096e481

27 files changed

+325
-67
lines changed

build/common.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<LangVersion>latest</LangVersion>
66
<MajorVersion>4</MajorVersion>
77
<MinorVersion>27</MinorVersion>
8-
<PatchVersion>4</PatchVersion>
8+
<PatchVersion>5</PatchVersion>
99
<BuildNumber Condition="'$(BuildNumber)' == '' ">0</BuildNumber>
1010
<PreviewVersion></PreviewVersion>
1111

release_notes.md

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,11 @@
55
-->
66
- Update Python Worker Version to [4.20.0](https://github.com/Azure/azure-functions-python-worker/releases/tag/4.20.0)
77
- Update Java Worker Version to [2.13.0](https://github.com/Azure/azure-functions-java-worker/releases/tag/2.13.0)
8-
- Update WebJobsScriptHostService to remove hardcoded sleep during application shut down (#9520)
8+
- Increased maximum HTTP request content size to 210000000 Bytes (~200MB)
9+
- Update Node.js Worker Version to [3.8.1](https://github.com/Azure/azure-functions-nodejs-worker/releases/tag/v3.8.1)
10+
- Update PowerShell 7.4 Worker Version to [4.0.2975](https://github.com/Azure/azure-functions-powershell-worker/releases/tag/v4.0.2975)
911
- Update PowerShell 7.2 Worker Version to [4.0.2974](https://github.com/Azure/azure-functions-powershell-worker/releases/tag/v4.0.2974)
1012
- Update PowerShell 7.0 Worker Version to [4.0.2973](https://github.com/Azure/azure-functions-powershell-worker/releases/tag/v4.0.2973)
11-
- Add support for standalone executable (ie: `dotnet build --standalone`) for out-of-proc workers in Linux Consumption. (#9550)
12-
- Bug fix: Do not restart worker channels or JobHost when an API request is made to get or update the function metadata (unless the config was changed) (#9510)
13-
- This fixes a bug where requests to 'admin/functions' lead to a "Did not find initialized workers" error when
14-
worker indexing is enabled.
15-
- Bug fix: If there are no channels created and the host is running, restart the JobHost instead of shutting down worker channels (#9510)
16-
- This fixes a bug with worker indexing where we are shutting down worker channels and creating a new channel that never
17-
gets properly initialized as the invocation buffers are not created - this leads to a "Did not find initialized workers" error.
18-
- Check if a blob container or table exists before trying to create it (#9555)
1913
- Limit dotnet-isolated specialization to 64 bit host process (#9548)
2014
- Sending command line arguments to language workers with `functions-` prefix to prevent conflicts (#9514)
15+
- Update WebJobsScriptHostService to remove hardcoded sleep during application shut down (#9520)

src/WebJobs.Script.Grpc/Channel/GrpcWorkerChannel.cs

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -374,12 +374,18 @@ internal void FunctionEnvironmentReloadResponse(FunctionEnvironmentReloadRespons
374374

375375
ApplyCapabilities(res.Capabilities, res.CapabilitiesUpdateStrategy.ToGrpcCapabilitiesUpdateStrategy());
376376

377-
if (res.Result.IsFailure(out Exception reloadEnvironmentVariablesException))
377+
if (res.Result.IsFailure(IsUserCodeExceptionCapabilityEnabled(), out var reloadEnvironmentVariablesException))
378378
{
379-
_workerChannelLogger.LogError(reloadEnvironmentVariablesException, "Failed to reload environment variables");
380-
_reloadTask.SetException(reloadEnvironmentVariablesException);
379+
if (res.Result.Exception is not null && reloadEnvironmentVariablesException is not null)
380+
{
381+
_workerChannelLogger.LogWarning(reloadEnvironmentVariablesException, reloadEnvironmentVariablesException.Message);
382+
}
383+
_reloadTask.SetResult(false);
384+
}
385+
else
386+
{
387+
_reloadTask.SetResult(true);
381388
}
382-
_reloadTask.SetResult(true);
383389
latencyEvent.Dispose();
384390
}
385391

@@ -414,6 +420,15 @@ internal void WorkerInitResponse(GrpcEvent initEvent)
414420
_workerInitTask.TrySetResult(true);
415421
}
416422

423+
private bool IsUserCodeExceptionCapabilityEnabled()
424+
{
425+
var enableUserCodeExceptionCapability = string.Equals(
426+
_workerCapabilities.GetCapabilityState(RpcWorkerConstants.EnableUserCodeException), bool.TrueString,
427+
StringComparison.OrdinalIgnoreCase);
428+
429+
return enableUserCodeExceptionCapability;
430+
}
431+
417432
private void LogWorkerMetadata(WorkerMetadata workerMetadata)
418433
{
419434
if (workerMetadata == null)
@@ -546,7 +561,7 @@ internal FunctionLoadRequestCollection GetFunctionLoadRequestCollection(IEnumera
546561
return functionLoadRequestCollection;
547562
}
548563

549-
public Task SendFunctionEnvironmentReloadRequest()
564+
public Task<bool> SendFunctionEnvironmentReloadRequest()
550565
{
551566
_functionsIndexingTask = new TaskCompletionSource<List<RawFunctionMetadata>>(TaskCreationOptions.RunContinuationsAsynchronously);
552567
_functionMetadataRequestSent = false;
@@ -1576,4 +1591,4 @@ private void OnTimeout()
15761591
}
15771592
}
15781593
}
1579-
}
1594+
}

src/WebJobs.Script.Grpc/MessageExtensions/StatusResultExtensions.cs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,18 @@
33

44
using System;
55
using System.Threading.Tasks;
6-
using Grpc.Core;
7-
using Microsoft.Azure.WebJobs.Script.Config;
86
using Microsoft.Azure.WebJobs.Script.Grpc.Messages;
97

108
namespace Microsoft.Azure.WebJobs.Script.Grpc
119
{
1210
internal static class StatusResultExtensions
1311
{
14-
public static bool IsFailure(this StatusResult statusResult, out Exception exception)
12+
public static bool IsFailure(this StatusResult statusResult, bool enableUserCodeExceptionCapability, out Exception exception)
1513
{
1614
switch (statusResult.Status)
1715
{
1816
case StatusResult.Types.Status.Failure:
19-
exception = GetRpcException(statusResult);
17+
exception = GetRpcException(statusResult, enableUserCodeExceptionCapability);
2018
return true;
2119

2220
case StatusResult.Types.Status.Cancelled:
@@ -29,6 +27,11 @@ public static bool IsFailure(this StatusResult statusResult, out Exception excep
2927
}
3028
}
3129

30+
public static bool IsFailure(this StatusResult statusResult, out Exception exception)
31+
{
32+
return IsFailure(statusResult, false, out exception);
33+
}
34+
3235
/// <summary>
3336
/// This method is only hit on the invocation code path.
3437
/// enableUserCodeExceptionCapability = feature flag exposed as a capability that is set by the worker.
@@ -68,4 +71,4 @@ public static Workers.Rpc.RpcException GetRpcException(StatusResult statusResult
6871
return new Workers.Rpc.RpcException(status, string.Empty, string.Empty);
6972
}
7073
}
71-
}
74+
}

src/WebJobs.Script/Environment/IEnvironment.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ namespace Microsoft.Azure.WebJobs.Script
1212
/// </summary>
1313
public interface IEnvironment
1414
{
15+
/// <summary>
16+
/// Gets a value indicating whether the current process is a 64-bit process.
17+
/// </summary>
18+
public bool Is64BitProcess { get; }
19+
1520
/// <summary>
1621
/// Returns the value of an environment variable for the current <see cref="IEnvironment"/>.
1722
/// </summary>
@@ -20,7 +25,7 @@ public interface IEnvironment
2025
string GetEnvironmentVariable(string name);
2126

2227
/// <summary>
23-
/// Creates, modifies, or deletes an environment variable stored in the current <see cref="IEnvironment"/>
28+
/// Creates, modifies, or deletes an environment variable stored in the current <see cref="IEnvironment"/>.
2429
/// </summary>
2530
/// <param name="name">The environment variable name.</param>
2631
/// <param name="value">The value to assign to the variable.</param>

src/WebJobs.Script/Environment/SystemEnvironment.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ private SystemEnvironment()
1717

1818
public static SystemEnvironment Instance => _instance.Value;
1919

20+
public bool Is64BitProcess => Environment.Is64BitProcess;
21+
2022
private static SystemEnvironment CreateInstance()
2123
{
2224
return new SystemEnvironment();

src/WebJobs.Script/ExtensionBundle/ExtensionBundleManager.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public bool IsLegacyExtensionBundle()
7171
/// <summary>
7272
/// Attempts to locate the extension bundle inside the probing paths and download paths. If the extension bundle is not found then it will download the extension bundle.
7373
/// </summary>
74-
/// <returns>Path of the extension bundle</returns>
74+
/// <returns>Path of the extension bundle.</returns>
7575
public async Task<string> GetExtensionBundlePath()
7676
{
7777
using (var httpClient = new HttpClient())
@@ -83,8 +83,8 @@ public async Task<string> GetExtensionBundlePath()
8383
/// <summary>
8484
/// Attempts to locate the extension bundle inside the probing paths and download paths. If the extension bundle is not found then it will download the extension bundle.
8585
/// </summary>
86-
/// <param name="httpClient">HttpClient used to download the extension bundle</param>
87-
/// <returns>Path of the extension bundle</returns>
86+
/// <param name="httpClient">HttpClient used to download the extension bundle.</param>
87+
/// <returns>Path of the extension bundle.</returns>
8888
public async Task<string> GetExtensionBundlePath(HttpClient httpClient)
8989
{
9090
return await GetBundle(httpClient);

src/WebJobs.Script/ScriptConstants.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ public static class ScriptConstants
8888
public const string DefaultMasterKeyName = "master";
8989
public const string DefaultFunctionKeyName = "default";
9090
public const string ColdStartEventName = "ColdStart";
91+
public const string PlaceholderMissDueToBitnessEventName = "PlaceholderMissDueToBitness";
9192

9293
public const string FunctionsUserAgent = "AzureFunctionsRuntime";
9394
public const string HttpScaleUserAgent = "HttpScaleManager";

src/WebJobs.Script/WebJobs.Script.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.21.0" />
4848
<PackageReference Include="Microsoft.ApplicationInsights.WindowsServer" Version="2.21.0" />
4949
<PackageReference Include="Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel" Version="2.21.0" />
50-
<PackageReference Include="Microsoft.Azure.Functions.DotNetIsolatedNativeHost" Version="1.0.0-preview805" />
50+
<PackageReference Include="Microsoft.Azure.Functions.DotNetIsolatedNativeHost" Version="1.0.2" />
5151
<PackageReference Include="Microsoft.Azure.WebJobs" Version="3.0.39" />
5252
<PackageReference Include="Microsoft.Azure.WebJobs.Host.Storage" Version="5.0.0-beta.2-11957" />
5353
<PackageReference Include="Microsoft.Extensions.Azure" Version="1.7.0" />
@@ -57,11 +57,11 @@
5757

5858
<!-- Workers -->
5959
<PackageReference Include="Microsoft.Azure.AppService.Proxy.Client" Version="2.2.20220831.41" />
60-
<PackageReference Include="Microsoft.Azure.Functions.JavaWorker" Version="2.12.1" />
60+
<PackageReference Include="Microsoft.Azure.Functions.JavaWorker" Version="2.13.0" />
6161
<PackageReference Include="Microsoft.Azure.Functions.NodeJsWorker" Version="3.8.1" />
62-
<PackageReference Include="Microsoft.Azure.Functions.PowerShellWorker.PS7.0" Version="4.0.2850" />
63-
<PackageReference Include="Microsoft.Azure.Functions.PowerShellWorker.PS7.2" Version="4.0.2890" />
64-
<PackageReference Include="Microsoft.Azure.Functions.PowerShellWorker.PS7.4" Version="4.0.2930" />
62+
<PackageReference Include="Microsoft.Azure.Functions.PowerShellWorker.PS7.0" Version="4.0.2973" />
63+
<PackageReference Include="Microsoft.Azure.Functions.PowerShellWorker.PS7.2" Version="4.0.2974" />
64+
<PackageReference Include="Microsoft.Azure.Functions.PowerShellWorker.PS7.4" Version="4.0.2975" />
6565
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions" Version="5.0.0-beta.2-10879" />
6666
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.Http" Version="3.2.0" />
6767
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.Timers.Storage" Version="1.0.0-beta.1" />

src/WebJobs.Script/Workers/Rpc/IRpcWorkerChannel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public interface IRpcWorkerChannel : IWorkerChannel
2222

2323
void SendFunctionLoadRequests(ManagedDependencyOptions managedDependencyOptions, TimeSpan? functionTimeout);
2424

25-
Task SendFunctionEnvironmentReloadRequest();
25+
Task<bool> SendFunctionEnvironmentReloadRequest();
2626

2727
void SendWorkerWarmupRequest();
2828

0 commit comments

Comments
 (0)