Skip to content

Update outdated bundle message - removed deprecation date #11230

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: dev
Choose a base branch
from
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
3 changes: 2 additions & 1 deletion release_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
<!-- Please add your release notes in the following format:
- My change description (#PR)
-->
- Add JitTrace Files for v4.1042
- Add JitTrace Files for v4.1042
- Update outdated bundle message - removed deprecation date #11230
21 changes: 3 additions & 18 deletions src/WebJobs.Script/Diagnostics/Extensions/LoggerExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -206,15 +206,10 @@ internal static class LoggerExtension
private static readonly Action<ILogger, string, Exception> _publishingMetrics =
LoggerMessage.Define<string>(LogLevel.Debug, new EventId(338, nameof(PublishingMetrics)), "{metrics}");

private static readonly Action<ILogger, string, int, int, Exception> _outdatedExtensionBundleFuture =
private static readonly Action<ILogger, string, int, int, Exception> _outdatedExtensionBundle =
LoggerMessage.Define<string, int, int>(LogLevel.Warning,
new EventId(342, nameof(OutdatedExtensionBundle)),
"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");

private static readonly Action<ILogger, string, int, int, Exception> _outdatedExtensionBundlePast =
LoggerMessage.Define<string, int, int>(LogLevel.Warning,
new EventId(342, nameof(OutdatedExtensionBundle)),
"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");
"Your app is using an older version - {currentVersion} of extension bundle. Upgrade to [{suggestedMinVersion}.*, {suggestedMaxVersion}.0.0). For more information, see https://aka.ms/FunctionsBundlesUpgrade");

public static void PublishingMetrics(this ILogger logger, string metrics)
{
Expand Down Expand Up @@ -420,17 +415,7 @@ public static void IncorrectAzureFunctionsFolderPath(this ILogger logger, string

public static void OutdatedExtensionBundle(this ILogger logger, string currentVersion, int suggestedMinVersion, int suggestedMaxVersion)
{
var currentTime = DateTime.UtcNow;
var deprecationDate = new DateTime(2026, 8, 5, 0, 0, 0, DateTimeKind.Utc);

if (currentTime >= deprecationDate)
{
_outdatedExtensionBundlePast(logger, currentVersion, suggestedMinVersion, suggestedMaxVersion, null);
}
else
{
_outdatedExtensionBundleFuture(logger, currentVersion, suggestedMinVersion, suggestedMaxVersion, null);
}
_outdatedExtensionBundle(logger, currentVersion, suggestedMinVersion, suggestedMaxVersion, null);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -198,14 +198,9 @@ public void GetOutdatedBundleWarningMessage_LogsWarning(string bundleId, string
// Assert
var logMessages = _testLoggerProvider.GetAllLogMessages();

// Check for both possible resource strings (future and past deprecation)
bool hasFutureWarning = logMessages.Any(m => m.FormattedMessage.Contains(bundleVersion)
&& m.FormattedMessage.Contains("will reach end of support on Aug 4, 2026.")
bool hasOutdatedBundleLog = logMessages.Any(m => m.FormattedMessage.Contains(bundleVersion)
&& m.FormattedMessage.Contains("older version")
&& m.Level == LogLevel.Warning);
bool hasPastWarning = logMessages.Any(m => m.FormattedMessage.Contains(bundleVersion)
&& m.FormattedMessage.Contains("has reached end of support on Aug 4, 2026.")
&& m.Level == LogLevel.Warning);
bool hasOutdatedBundleLog = hasFutureWarning || hasPastWarning;

Assert.Equal(shouldLogEvent, hasOutdatedBundleLog);
}
Expand Down