Skip to content

Commit f7ad5d6

Browse files
authored
Update outdated bundle message - removed deprecation date (#11230)
* bundle message updated * add release notes * update release notes * update grammar of the message * remove suggested range * remove unused params for suggested versions and update tests
1 parent 1bb6bd8 commit f7ad5d6

File tree

4 files changed

+13
-33
lines changed

4 files changed

+13
-33
lines changed

release_notes.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55
-->
66
- Add JitTrace Files for v4.1042
77
- Updating OTel related nuget packages (#11216)
8-
- Moving to version 1.5.7 of Microsoft.Azure.AppService.Middleware.Functions (https://github.com/Azure/azure-functions-host/pull/11231)
8+
- Moving to version 1.5.7 of Microsoft.Azure.AppService.Middleware.Functions (#11231)
99
- Refactor code to move the logic to search for WorkerConfigs to a default worker configuration resolver (#11219)
1010
- Update Node.js Worker Version to [3.11.0](https://github.com/Azure/azure-functions-nodejs-worker/releases/tag/v3.11.0)
1111
- Adding restart reason to the logs (#11191)
12-
- Fix custom handler streaming bug where `$return` output binding scenarios result in error logs (#11262)
12+
- Fix custom handler streaming bug where `$return` output binding scenarios result in error logs (#11262)
13+
- Update outdated bundle message to align as per the policy (#11230)

src/WebJobs.Script/Diagnostics/Extensions/LoggerExtension.cs

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) .NET Foundation. All rights reserved.
1+
// Copyright (c) .NET Foundation. All rights reserved.
22
// Licensed under the MIT License. See License.txt in the project root for license information.
33

44
using System;
@@ -206,15 +206,10 @@ internal static class LoggerExtension
206206
private static readonly Action<ILogger, string, Exception> _publishingMetrics =
207207
LoggerMessage.Define<string>(LogLevel.Debug, new EventId(338, nameof(PublishingMetrics)), "{metrics}");
208208

209-
private static readonly Action<ILogger, string, int, int, Exception> _outdatedExtensionBundleFuture =
210-
LoggerMessage.Define<string, int, int>(LogLevel.Warning,
209+
private static readonly Action<ILogger, string, Exception> _outdatedExtensionBundle =
210+
LoggerMessage.Define<string>(LogLevel.Warning,
211211
new EventId(342, nameof(OutdatedExtensionBundle)),
212-
"Your current bundle version {currentVersion} will reach end of support on Aug 4, 2026. Upgrade to [{suggestedMinVersion}.*, {suggestedMaxVersion}.0.0). For more information, see https://aka.ms/FunctionsBundlesUpgrade");
213-
214-
private static readonly Action<ILogger, string, int, int, Exception> _outdatedExtensionBundlePast =
215-
LoggerMessage.Define<string, int, int>(LogLevel.Warning,
216-
new EventId(342, nameof(OutdatedExtensionBundle)),
217-
"Your current bundle version {currentVersion} has reached end of support on Aug 4, 2026. Upgrade to [{suggestedMinVersion}.*, {suggestedMaxVersion}.0.0). For more information, see https://aka.ms/FunctionsBundlesUpgrade");
212+
"Your app is using a deprecated version - {currentVersion} of extension bundles. Upgrade to a supported version: https://aka.ms/FunctionsBundlesUpgrade");
218213

219214
private static readonly Action<ILogger, string, Exception> _defaultWorkersDirectoryPath =
220215
LoggerMessage.Define<string>(LogLevel.Debug,
@@ -428,19 +423,9 @@ public static void DefaultWorkersDirectoryPath(this ILogger logger, string worke
428423
_defaultWorkersDirectoryPath(logger, workersDirPath, null);
429424
}
430425

431-
public static void OutdatedExtensionBundle(this ILogger logger, string currentVersion, int suggestedMinVersion, int suggestedMaxVersion)
426+
public static void OutdatedExtensionBundle(this ILogger logger, string currentVersion)
432427
{
433-
var currentTime = DateTime.UtcNow;
434-
var deprecationDate = new DateTime(2026, 8, 5, 0, 0, 0, DateTimeKind.Utc);
435-
436-
if (currentTime >= deprecationDate)
437-
{
438-
_outdatedExtensionBundlePast(logger, currentVersion, suggestedMinVersion, suggestedMaxVersion, null);
439-
}
440-
else
441-
{
442-
_outdatedExtensionBundleFuture(logger, currentVersion, suggestedMinVersion, suggestedMaxVersion, null);
443-
}
428+
_outdatedExtensionBundle(logger, currentVersion, null);
444429
}
445430
}
446431
}

src/WebJobs.Script/Host/ExtensionBundleManagerValidator.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ public void Validate(ScriptJobHostOptions options, IEnvironment environment, ILo
2626
string outdatedBundleVersion = _extensionBundleManager.GetOutdatedBundleVersion();
2727
if (!string.IsNullOrEmpty(outdatedBundleVersion))
2828
{
29-
int latestMajorVersion = ScriptConstants.ExtensionBundleV4MajorVersion;
30-
logger.OutdatedExtensionBundle(outdatedBundleVersion, latestMajorVersion, latestMajorVersion + 1);
29+
logger.OutdatedExtensionBundle(outdatedBundleVersion);
3130
}
3231
}
3332
}

test/WebJobs.Script.Tests/Description/FunctionAppValidationServiceTests.cs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) .NET Foundation. All rights reserved.
1+
// Copyright (c) .NET Foundation. All rights reserved.
22
// Licensed under the MIT License. See License.txt in the project root for license information.
33

44
using System;
@@ -198,14 +198,9 @@ public void GetOutdatedBundleWarningMessage_LogsWarning(string bundleId, string
198198
// Assert
199199
var logMessages = _testLoggerProvider.GetAllLogMessages();
200200

201-
// Check for both possible resource strings (future and past deprecation)
202-
bool hasFutureWarning = logMessages.Any(m => m.FormattedMessage.Contains(bundleVersion)
203-
&& m.FormattedMessage.Contains("will reach end of support on Aug 4, 2026.")
201+
bool hasOutdatedBundleLog = logMessages.Any(m => m.FormattedMessage.Contains(bundleVersion)
202+
&& m.FormattedMessage.Contains("deprecated version")
204203
&& m.Level == LogLevel.Warning);
205-
bool hasPastWarning = logMessages.Any(m => m.FormattedMessage.Contains(bundleVersion)
206-
&& m.FormattedMessage.Contains("has reached end of support on Aug 4, 2026.")
207-
&& m.Level == LogLevel.Warning);
208-
bool hasOutdatedBundleLog = hasFutureWarning || hasPastWarning;
209204

210205
Assert.Equal(shouldLogEvent, hasOutdatedBundleLog);
211206
}

0 commit comments

Comments
 (0)