Skip to content
Merged
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
13 changes: 1 addition & 12 deletions release_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,4 @@
<!-- Please add your release notes in the following format:
- My change description (#PR)
-->
- Improved memory metrics reporting using CGroup data for Linux consumption (#10968)
- Memory allocation optimizations in `RpcWorkerConfigFactory.AddProviders` (#10959)
- Fixing GrpcWorkerChannel concurrency bug (#10998)
- Avoid circular dependency when resolving LinuxContainerLegionMetricsPublisher. (#10991)
- Add 'unix' to the list of runtimes kept when importing PowerShell worker for Linux builds
- Update PowerShell 7.4 worker to 4.0.4206
- Update Python Worker Version to [4.37.0](https://github.com/Azure/azure-functions-python-worker/releases/tag/4.37.0)
- Add runtime and process metrics. (#11034)
- Add `win-arm64` and `linux-arm64` to the list of PowerShell runtimes; added filter for `osx` RIDs (includes `osx-x64` and `osx-arm64`) (#11013)
- Disable Diagnostic Events when Table Storage is not accessible (#10996)
- Update flex metric publisher to publish every 30 seconds (regardless of actvity) (#11019)
- Add JitTrace Files for v4.1040
- Fix Instance Manager for CV1 Migration (#11072)
2 changes: 1 addition & 1 deletion src/Directory.Version.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<VersionPrefix>4.1040.100</VersionPrefix>
<VersionPrefix>4.1040.200</VersionPrefix>
<UpdateBuildNumber>true</UpdateBuildNumber>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public static void AddWebJobsScriptHost(this IServiceCollection services, IConfi
services.AddTransient<VirtualFileSystem>();
services.AddTransient<VirtualFileSystemMiddleware>();

if (SystemEnvironment.Instance.IsFlexConsumptionSku())
if (SystemEnvironment.Instance.IsLinuxConsumptionOnLegion() || SystemEnvironment.Instance.IsFlexConsumptionSku())
{
services.AddSingleton<IInstanceManager, LegionInstanceManager>();
}
Expand Down
19 changes: 19 additions & 0 deletions test/WebJobs.Script.Tests/Environment/EnvironmentTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

using System;
using System.Runtime.InteropServices;
using System.Threading.Tasks;
using Microsoft.WebJobs.Script.Tests;
using Xunit;
using static Microsoft.Azure.WebJobs.Script.EnvironmentSettingNames;
Expand Down Expand Up @@ -244,6 +245,24 @@ public void Returns_IsLinuxConsumption(string websiteInstanceId, string containe
Assert.False(isLinuxConsumptionOnAtlas ? isLinuxConsumptionOnLegion : isLinuxConsumptionOnAtlas);
}

[Theory]
[InlineData(ScriptConstants.DynamicSku, "containerName", "", "", false)]
[InlineData(ScriptConstants.DynamicSku, "containerName", "podName", "", false)]
[InlineData(ScriptConstants.DynamicSku, "containerName", "podName", "legionServiceHost", true)]
[InlineData(ScriptConstants.DynamicSku, "containerName", "", "legionServiceHost", true)]
public void Returns_AtlasOrLegionConsumption(string sku, string containerName, string podName, string legionServiceHost, bool legion)
{
var testEnvironment = new TestEnvironment();
testEnvironment.SetEnvironmentVariable(EnvironmentSettingNames.AzureWebsiteInstanceId, string.Empty);
testEnvironment.SetEnvironmentVariable(EnvironmentSettingNames.AzureWebsiteSku, sku);
testEnvironment.SetEnvironmentVariable(EnvironmentSettingNames.ContainerName, containerName);
testEnvironment.SetEnvironmentVariable(EnvironmentSettingNames.PodName, podName);
testEnvironment.SetEnvironmentVariable(EnvironmentSettingNames.LegionServiceHost, legionServiceHost);

Assert.Equal(legion, testEnvironment.IsLinuxConsumptionOnLegion());
Assert.Equal(!legion, testEnvironment.IsLinuxConsumptionOnAtlas());
}

[Theory]
[InlineData(ScriptConstants.ElasticPremiumSku, true)]
[InlineData("test", false)]
Expand Down