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
1 change: 1 addition & 0 deletions release_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
-->
- Add JitTrace Files for v4.1046
- Update Java Worker Version to [2.19.4](https://github.com/Azure/azure-functions-java-worker/releases/tag/2.19.4)
- Logging environment value of LocalSitePackagesPath in RunFromPackageHandler (#11541)
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.

using System;
Expand Down Expand Up @@ -49,10 +49,11 @@ public async Task<bool> ApplyRunFromPackageContext(RunFromPackageContext pkgCont
// So extracting to /home/site/wwwroot can interfere with other running instances
// Instead extract to localSitePackagesPath and bind to /home/site/wwwroot
// home will continue to point to azure file share
var localSitePackagesPath = azureFilesMounted
? _environment.GetEnvironmentVariableOrDefault(EnvironmentSettingNames.LocalSitePackages,
EnvironmentSettingNames.DefaultLocalSitePackagesPath)
: string.Empty;
var localSitePackagesEnvValue = _environment.GetEnvironmentVariable(EnvironmentSettingNames.LocalSitePackages);
var resolvedLocalSitePackagesPath = localSitePackagesEnvValue ?? EnvironmentSettingNames.DefaultLocalSitePackagesPath;
_logger.LogDebug("Environment variable '{LocalSitePackagesEnvVarName}' value: '{LocalSitePackagesEnvValue}'. Resolved path: '{ResolvedLocalSitePackagesPath}'", EnvironmentSettingNames.LocalSitePackages, localSitePackagesEnvValue, resolvedLocalSitePackagesPath);

var localSitePackagesPath = azureFilesMounted ? resolvedLocalSitePackagesPath : string.Empty;

// download zip
string filePath = await _packageDownloadHandler.Download(pkgContext);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.

using System;
Expand Down Expand Up @@ -222,12 +222,13 @@ public async Task StartAssignment_Succeeds_With_NonEmpty_ScmRunFromPackage_Blob(

var logs = _loggerProvider.GetAllLogMessages().Select(p => p.FormattedMessage).ToArray();

if (logs.Length == 10)
if (logs.Length == 11)
{
Assert.Collection(logs,
p => Assert.StartsWith("Starting Assignment", p),
p => Assert.StartsWith("Applying 1 app setting(s)", p),
p => Assert.EndsWith("points to an existing blob: True", p),
p => Assert.StartsWith("Environment variable 'LocalSitePackagesPath'", p),
p => Assert.StartsWith("Unsquashing remote zip", p),
p => Assert.StartsWith("Running: ", p),
p => Assert.StartsWith("Output:", p),
Expand Down Expand Up @@ -1606,12 +1607,13 @@ public async Task AssignInstanceAsync_Succeeds_With_NonEmpty_ScmRunFromPackage_B

var logs = _loggerProvider.GetAllLogMessages().Select(p => p.FormattedMessage).ToArray();

if (logs.Length == 10)
if (logs.Length == 11)
{
Assert.Collection(logs,
p => Assert.StartsWith("Starting Assignment", p),
p => Assert.StartsWith("Applying 1 app setting(s)", p),
p => Assert.EndsWith("points to an existing blob: True", p),
p => Assert.StartsWith("Environment variable 'LocalSitePackagesPath'", p),
p => Assert.StartsWith("Unsquashing remote zip", p),
p => Assert.StartsWith("Running: ", p),
p => Assert.StartsWith("Output:", p),
Expand Down