Skip to content
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

Fail fast if ExtendedSessionsEnabled is requested for a non-.NET worker. #2732

Merged
merged 14 commits into from
Oct 28, 2024
Merged
10 changes: 4 additions & 6 deletions src/WebJobs.Extensions.DurableTask/Options/DurableTaskOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -320,12 +320,10 @@ internal void Validate(INameResolver environmentVariableResolver, EndToEndTraceH
runtimeLanguage != null && // If we don't know from the environment variable, don't assume customer isn't .NET
!string.Equals(runtimeLanguage, "dotnet", StringComparison.OrdinalIgnoreCase))
{
traceHelper.ExtensionWarningEvent(
hubName: this.HubName,
functionName: string.Empty,
instanceId: string.Empty,
message: "Durable Functions does not work with extendedSessions = true for non-.NET languages. This value is being set to false instead. See https://docs.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-perf-and-scale#extended-sessions for more details.");
this.ExtendedSessionsEnabled = false;
throw new InvalidOperationException(
"Durable Functions does not work with ExtendedSessionsEnabled = true for non-.NET languages. " +
gukoff marked this conversation as resolved.
Show resolved Hide resolved
"This value is being set to false instead. " +
gukoff marked this conversation as resolved.
Show resolved Hide resolved
"See https://docs.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-perf-and-scale#extended-sessions for more details.");
gukoff marked this conversation as resolved.
Show resolved Hide resolved
}

this.Notifications.Validate();
Expand Down
Loading