Skip to content
Draft
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
2 changes: 1 addition & 1 deletion release_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
- Add JitTrace Files for v4.1042
- Updating OTel related nuget packages (#11216)
- Moving to version 1.5.7 of Microsoft.Azure.AppService.Middleware.Functions (https://github.com/Azure/azure-functions-host/pull/11231)

- Mark Failed Container Specialization as Fatal (https://github.com/Azure/azure-functions-host/pull/11250)
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 @@ -276,6 +276,11 @@ await _runFromPackageHandler.ApplyRunFromPackageContext(pkgContext, options.Scri
_logger.LogWarning($"Failed to {nameof(_runFromPackageHandler.ApplyRunFromPackageContext)}. Attempting to use local disk instead");
await _runFromPackageHandler.ApplyRunFromPackageContext(pkgContext, options.ScriptPath, false);
}
else if (!blobContextApplied && !azureFilesMounted)
{
await _meshServiceClient.NotifyHealthEvent(ContainerHealthEventType.Fatal, this.GetType(),
$"Failed to mount Azure File Share and failed to {nameof(_runFromPackageHandler.ApplyRunFromPackageContext)}");
}
}
else if (pkgContext.IsRunFromLocalPackage())
{
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 @@ -1190,6 +1190,10 @@ public async Task Falls_Back_To_Local_Disk_If_Azure_Files_Unavailable_Only_If_Az
.Setup(r => r.ApplyRunFromPackageContext(It.IsAny<RunFromPackageContext>(), It.IsAny<string>(), false,
false)).ReturnsAsync(false); // return false to trigger failure

// setup notifyhealth method
_meshServiceClientMock.Setup(m => m.NotifyHealthEvent(ContainerHealthEventType.Fatal,
It.IsAny<Type>(), It.IsAny<string>())).Returns(Task.CompletedTask);

// There will be no 2nd attempt since azure files mounting failed.

var optionsFactory = new TestOptionsFactory<ScriptApplicationHostOptions>(new ScriptApplicationHostOptions() { ScriptPath = scriptPath });
Expand Down