Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
f943321
Merge pull request #2944 from Azure/dev
davidmrdavid Oct 17, 2024
4a25f26
first commit
Jul 11, 2025
744a3d3
added protobuf field to indicate when the worker needs a history but …
Jul 14, 2025
e3b33f4
removing assemblyinfo change
Jul 14, 2025
d744878
removing new TaskOptions() fix
Jul 14, 2025
bf3b43e
Merge branch 'dev' into stevosyan/extended-sessions-for-orchestration…
Jul 15, 2025
ebfc911
added the new caching package
Aug 1, 2025
96ff756
added the new caching package
Aug 1, 2025
151d0ff
added the new caching package
Aug 1, 2025
1a34596
added the new caching package
Aug 1, 2025
b77e08e
reverting some non-changes
Aug 1, 2025
956ca53
added a wrapper ExtendedSessionState class so that we can initialize …
Aug 1, 2025
8216e57
adding proto files
Aug 1, 2025
00e99b8
Merge branch 'dev' into stevosyan/extended-sessions-for-orchestration…
Aug 1, 2025
7774407
adding updated protos
Aug 1, 2025
d55834a
added updated package names and nuget configs
Aug 4, 2025
d955987
added assemblyinfo change and some more nuget config changes
Aug 4, 2025
090f8b3
adding typed interfaces csproj changes
Aug 4, 2025
e9178a9
had the wrong package version for dotnet packages
Aug 4, 2025
2745041
updated net version of typedinterfaces project
Aug 4, 2025
07b48a3
trying typedinterfaces again
Aug 4, 2025
a774b17
trying to fix one of the tests not building correctly
Aug 4, 2025
53518f8
added another config
Aug 4, 2025
125e089
trying to add a restore step to the yml
Aug 4, 2025
7fb0e46
trying a change to the dockerfile
Aug 4, 2025
52165b4
trying another worker csproj
Aug 4, 2025
2cd7ecc
trying to add a nowarn to netherite project
Aug 4, 2025
79683ea
updating the package references and package version
Aug 4, 2025
212a10a
updating build.yml
Aug 5, 2025
e55b9df
updated two more nuget configs
Aug 5, 2025
825ac64
trying to remove the problematic projects from the restore step
Aug 5, 2025
81a93ce
reverting the yml and trying another nuget config actually
Aug 5, 2025
b5fbb42
one more nuget config change
Aug 5, 2025
3af10b6
removing TypedInterfaces projects from the solution
Aug 5, 2025
a138ee2
didnt do it correctly the first time
Aug 5, 2025
3fa2c72
trying a different extension.csproj for powershell
Aug 5, 2025
d31e7ae
reverting to old cs proj and trying new configs
Aug 5, 2025
c460682
reverting to old nuget.config
Aug 5, 2025
35ed72c
trying a version with building the test apps before the dotnet restore
Aug 5, 2025
f4341b2
adding new dependencies and new package number
Aug 9, 2025
5de97f6
Merge branch 'dev' into stevosyan/extended-sessions-for-orchestration…
Aug 9, 2025
b901837
Merge branch 'dev' into stevosyan/extended-sessions-for-orchestration…
Aug 11, 2025
d181f0c
updating version numbers
Aug 21, 2025
d4c3b75
adding proto changes from main branch
Aug 21, 2025
a218a43
Merge branch 'dev' into stevosyan/extended-sessions-for-orchestration…
Aug 21, 2025
d8ad0b1
updating biuld to remove building java smoke test
Aug 21, 2025
1178a13
downgrading the cache package to a version that is test with net6.0
Aug 21, 2025
8f20779
attempting to revert changes
Sep 11, 2025
a1dba92
the struggle continues
Sep 11, 2025
d0795c3
more
Sep 11, 2025
37ce527
more
Sep 11, 2025
f2faf35
more
Sep 11, 2025
f4f6825
more
Sep 11, 2025
5194d2e
more
Sep 11, 2025
8bc1f7b
more
Sep 11, 2025
a1614ba
more
Sep 11, 2025
fed8099
more
Sep 11, 2025
393ee48
more
Sep 11, 2025
053d9dc
more
Sep 11, 2025
4a4b370
test
Sep 11, 2025
b3e9fff
Merge branch 'main' into stevosyan/extended-sessions-for-orchestratio…
Sep 11, 2025
cef8e2e
i think this may work
Sep 11, 2025
7dfde04
adding reference to caching project
Sep 11, 2025
40677c5
reverting proto changes too
Sep 11, 2025
be7d7fb
addressing PR comments
Sep 12, 2025
f49d497
downgrading version of memory package
Sep 12, 2025
f913fa4
Merge branch 'dev' into stevosyan/extended-sessions-for-orchestration…
Sep 15, 2025
da1e542
slight change to only specify request parameters if extended sessions…
Sep 16, 2025
98cda21
Merge branch 'dev' into stevosyan/extended-sessions-for-orchestration…
Sep 17, 2025
548d1b5
updating e2e test stuff and version references
Sep 17, 2025
271f67e
removed a stale comment
Sep 17, 2025
2e1b666
restoring unnecessary extensions.csproj changes
Sep 18, 2025
efbfb69
trying to print logs to output to see why the CI is failing
Sep 18, 2025
be901f5
adding another output line
Sep 18, 2025
7ade287
trying with another line
Sep 18, 2025
3f1c47b
Merge branch 'dev' into stevosyan/extended-sessions-for-orchestration…
Sep 18, 2025
52bafbc
removing CI changes to test
Sep 18, 2025
a0e1b0f
trying again
Sep 18, 2025
f06fecd
Remove Core Tools output check from HTTP feature test
andystaples Sep 18, 2025
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
13 changes: 7 additions & 6 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
<PackageVersion Include="Grpc.Net.Client" Version="2.70.0" />
<PackageVersion Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.2.0" />
<PackageVersion Include="Microsoft.AspNetCore.Mvc.WebApiCompatShim" Version="2.2.0" />
<PackageVersion Include="Microsoft.Azure.DurableTask.ApplicationInsights" Version="0.5.0" />
<PackageVersion Include="Microsoft.Azure.DurableTask.AzureStorage" Version="2.4.0" />
<PackageVersion Include="Microsoft.Azure.DurableTask.Core" Version="3.3.0" />
<PackageVersion Include="Microsoft.Azure.DurableTask.ApplicationInsights" Version="0.6.0" />
<PackageVersion Include="Microsoft.Azure.DurableTask.AzureStorage" Version="2.5.0" />
<PackageVersion Include="Microsoft.Azure.DurableTask.Core" Version="3.4.0" />
<PackageVersion Include="Microsoft.Azure.Functions.Worker.Core" Version="2.0.0" />
<PackageVersion Include="Microsoft.Azure.Functions.Worker.Extensions.Abstractions" Version="1.3.0" />
<PackageVersion Include="Microsoft.Azure.Functions.Worker.Extensions.Storage.Blobs" Version="6.7.0" />
Expand All @@ -29,10 +29,11 @@
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="3.9.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="3.9.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.Workspaces.Common" Version="3.9.0" />
<PackageVersion Include="Microsoft.DurableTask.Client.Grpc" Version="1.14.0" />
<PackageVersion Include="Microsoft.DurableTask.Worker.Grpc" Version="1.14.0" />
<PackageVersion Include="Microsoft.DurableTask.Client.Grpc" Version="1.15.0" />
<PackageVersion Include="Microsoft.DurableTask.Worker.Grpc" Version="1.15.0" />
<PackageVersion Include="Microsoft.DurableTask.Analyzers" Version="0.1.0" />
<PackageVersion Include="Microsoft.Extensions.Azure" Version="1.7.0" />
<PackageVersion Include="Microsoft.Extensions.Caching.Memory" Version="6.0.3" />
<PackageVersion Include="Microsoft.Extensions.Http" Version="6.0.0" />
<PackageVersion Include="Microsoft.NET.Sdk.Functions" Version="4.2.0" />
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="1.0.0" />
Expand Down Expand Up @@ -67,7 +68,7 @@
<PackageVersion Include="Microsoft.CodeAnalysis" Version="3.9.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.Workspaces.MSBuild" Version="3.9.0" />
<PackageVersion Include="Microsoft.Diagnostics.Tracing.TraceEvent" Version="2.0.65" />
<PackageVersion Include="Microsoft.DurableTask.Abstractions" Version="1.14.0" />
<PackageVersion Include="Microsoft.DurableTask.Abstractions" Version="1.15.0" />
<PackageVersion Include="Microsoft.DurableTask.Generators" Version="1.0.0-preview.1" />
<PackageVersion Include="Microsoft.DurableTask.SqlServer.AzureFunctions" Version="1.5.0" />
<PackageVersion Include="Microsoft.Extensions.Configuration" Version="9.0.0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public Task<ITriggerData> BindAsync(object? value, ValueBindingContext context)
var orchestratorRequest = new Microsoft.DurableTask.Protobuf.OrchestratorRequest()
{
InstanceId = remoteContext.InstanceId,
PastEvents = { remoteContext.PastEvents.Select(ProtobufUtils.ToHistoryEventProto) },
PastEvents = { remoteContext.Configurations.IncludePastEvents ? remoteContext.PastEvents.Select(ProtobufUtils.ToHistoryEventProto) : Enumerable.Empty<Microsoft.DurableTask.Protobuf.HistoryEvent>() },
NewEvents = { remoteContext.NewEvents.Select(ProtobufUtils.ToHistoryEventProto) },
EntityParameters = remoteContext.EntityParameters.ToProtobuf(),
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,20 @@ internal class RemoteOrchestratorContext

private Exception? failure;

public RemoteOrchestratorContext(OrchestrationRuntimeState runtimeState, TaskOrchestrationEntityParameters? entityParameters, DurableTaskOptions options)
public RemoteOrchestratorContext(OrchestrationRuntimeState runtimeState, TaskOrchestrationEntityParameters? entityParameters, DurableTaskOptions options, bool isExtendedSession, bool includePastEvents)
{
this.runtimeState = runtimeState ?? throw new ArgumentNullException(nameof(runtimeState));
this.EntityParameters = entityParameters;
this.Configurations = new RemoteOrchestratorConfiguration
{
HttpDefaultAsyncRequestSleepTimeMilliseconds = options.HttpSettings.DefaultAsyncRequestSleepTimeMilliseconds,
};
if (options.ExtendedSessionsEnabled)
{
this.Configurations.IsExtendedSession = isExtendedSession;
this.Configurations.IncludePastEvents = includePastEvents;
this.Configurations.ExtendedSessionIdleTimeoutInSeconds = options.ExtendedSessionIdleTimeoutInSeconds;
}
}

[JsonProperty("instanceId")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -342,8 +342,10 @@ message OrchestratorResponse {
// The number of work item events that were processed by the orchestrator.
// This field is optional. If not set, the service should assume that the orchestrator processed all events.
google.protobuf.Int32Value numEventsProcessed = 5;

OrchestrationTraceContext orchestrationTraceContext = 6;

// Whether or not a history is required to complete the original OrchestratorRequest and none was provided.
bool requiresHistory = 7;
}

message CreateInstanceRequest {
Expand Down Expand Up @@ -678,6 +680,18 @@ message AbandonEntityTaskResponse {
// Empty.
}

message SkipGracefulOrchestrationTerminationsRequest {
// A maximum of 500 instance IDs can be provided in this list.
repeated string instanceIds = 1;
google.protobuf.StringValue reason = 2;
}

message SkipGracefulOrchestrationTerminationsResponse {
// Those instances which could not be terminated because they had locked entities at the time of this termination call,
// are already in a terminal state (completed, failed, terminated, etc.), are not orchestrations, or do not exist (i.e. have been purged)
repeated string unterminatedInstanceIds = 1;
}

service TaskHubSidecarService {
// Sends a hello request to the sidecar service.
rpc Hello(google.protobuf.Empty) returns (google.protobuf.Empty);
Expand Down Expand Up @@ -751,6 +765,10 @@ service TaskHubSidecarService {

// Abandon an entity work item
rpc AbandonTaskEntityWorkItem(AbandonEntityTaskRequest) returns (AbandonEntityTaskResponse);

// "Skip" graceful termination of orchestrations by immediately changing their status in storage to "terminated".
// Note that a maximum of 500 orchestrations can be terminated at a time using this method.
rpc SkipGracefulOrchestrationTerminations(SkipGracefulOrchestrationTerminationsRequest) returns (SkipGracefulOrchestrationTerminationsResponse);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Were these protobuf changes already merged as part of a different PR?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are actually for a new feature I added to DTS, and they're showing up here just cause I pulled from the main protobuf branch (so sort of, yes)

}

message GetWorkItemsRequest {
Expand Down
4 changes: 2 additions & 2 deletions src/WebJobs.Extensions.DurableTask/Grpc/Protos/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# The following files were downloaded from branch main at 2025-09-11 18:23:56 UTC
https://raw.githubusercontent.com/microsoft/durabletask-protobuf/985035a0890575ae18be0eb2a3ac93c10824498a/protos/orchestrator_service.proto
# The following files were downloaded from branch main at 2025-09-17 01:59:32 UTC
https://raw.githubusercontent.com/microsoft/durabletask-protobuf/f5745e0d83f608d77871c1894d9260ceaae08967/protos/orchestrator_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -358,10 +358,10 @@ internal void Validate(INameResolver environmentVariableResolver)
string runtimeLanguage = environmentVariableResolver.Resolve("FUNCTIONS_WORKER_RUNTIME");
if (this.ExtendedSessionsEnabled &&
runtimeLanguage != null && // If we don't know from the environment variable, don't assume customer isn't .NET
!string.Equals(runtimeLanguage, "dotnet", StringComparison.OrdinalIgnoreCase))
!(string.Equals(runtimeLanguage, "dotnet", StringComparison.OrdinalIgnoreCase) || string.Equals(runtimeLanguage, "dotnet-isolated", StringComparison.OrdinalIgnoreCase)))
{
throw new InvalidOperationException(
"Durable Functions with extendedSessionsEnabled set to 'true' is only supported when using the in-process .NET worker. Please remove the setting or change it to 'false'." +
"Durable Functions with extendedSessionsEnabled set to 'true' is only supported when using the in-process or isolated .NET worker. Please remove the setting or change it to 'false'." +
"See https://docs.microsoft.com/azure/azure-functions/durable/durable-functions-perf-and-scale#extended-sessions for more details.");
}

Expand Down
14 changes: 13 additions & 1 deletion src/WebJobs.Extensions.DurableTask/OutOfProcMiddleware.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,12 @@ await this.LifeCycleNotificationHelper.OrchestratorStartingAsync(
isReplay: false);
}

var context = new RemoteOrchestratorContext(runtimeState, entityParameters, this.extension.Options);
WorkItemMetadata workItemMetadata = dispatchContext.GetProperty<WorkItemMetadata>();
bool isExtendedSession = workItemMetadata.IsExtendedSession;
bool includePastEvents = workItemMetadata.IncludePastEvents;

var context = new RemoteOrchestratorContext(runtimeState, entityParameters, this.extension.Options, isExtendedSession, includePastEvents);
bool workerRequiresHistory = false;

var input = new TriggeredFunctionData
{
Expand Down Expand Up @@ -139,6 +144,8 @@ await this.LifeCycleNotificationHelper.OrchestratorStartingAsync(
byte[] triggerReturnValueBytes = Convert.FromBase64String(triggerReturnValue);
P.OrchestratorResponse response = P.OrchestratorResponse.Parser.ParseFrom(triggerReturnValueBytes);

workerRequiresHistory = response.RequiresHistory;

// TrySetResult may throw if a platform-level error is encountered (like an out of memory exception).
context.SetResult(
response.Actions.Select(ProtobufUtils.ToOrchestratorAction),
Expand Down Expand Up @@ -198,6 +205,11 @@ await this.LifeCycleNotificationHelper.OrchestratorStartingAsync(
OrchestratorExecutionResult orchestratorResult;
if (functionResult.Succeeded)
{
if (workerRequiresHistory)
{
throw new SessionAbortedException("The worker has since ended the extended session and needs an orchestration history to execute the orchestration request.");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add tests for extended sessions in the .NET Isolated testing framework? We could add a test for the use case when this exception gets thrown.

Comment thread
sophiatev marked this conversation as resolved.
}

orchestratorResult = context.GetResult();

if (context.OrchestratorCompleted)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,22 @@ public class RemoteOrchestratorConfiguration
/// Gets or sets the default number of milliseconds between async HTTP status poll requests.
/// </summary>
public int HttpDefaultAsyncRequestSleepTimeMilliseconds { get; set; } = 30000;

/// <summary>
/// Gets or sets whether or not to include the past history events in the orchestration request.
/// True by default.
/// </summary>
public bool IncludePastEvents { get; set; } = true;

/// <summary>
/// Gets or sets whether or not the orchestration request is within an extended session.
/// False by default.
/// </summary>
public bool IsExtendedSession { get; set; } = false;

/// <summary>
/// Gets or sets the amount of time in seconds before an idle extended session times out.
/// </summary>
public int ExtendedSessionIdleTimeoutInSeconds { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,24 @@
using System.Threading.Tasks;
using Microsoft.Azure.Functions.Worker.Extensions.DurableTask.Exceptions;
using Microsoft.Azure.Functions.Worker.Middleware;
using Microsoft.DurableTask.Worker;
using Microsoft.DurableTask.Worker.Grpc;

namespace Microsoft.Azure.Functions.Worker.Extensions.DurableTask;

/// <summary>
/// A middleware to handle orchestration triggers.
/// </summary>
internal class DurableTaskFunctionsMiddleware : IFunctionsWorkerMiddleware
internal class DurableTaskFunctionsMiddleware(ExtendedSessionsCache extendedSessionsCache) : IFunctionsWorkerMiddleware
{
private readonly ExtendedSessionsCache extendedSessionsCache = extendedSessionsCache;

/// <inheritdoc />
public Task Invoke(FunctionContext functionContext, FunctionExecutionDelegate next)
{
if (IsOrchestrationTrigger(functionContext, out BindingMetadata? triggerBinding))
{
return RunOrchestrationAsync(functionContext, triggerBinding, next);
return this.RunOrchestrationAsync(functionContext, triggerBinding, next);
}

if (IsEntityTrigger(functionContext, out triggerBinding))
Expand Down Expand Up @@ -52,7 +55,7 @@ private static bool IsOrchestrationTrigger(
return false;
}

static async Task RunOrchestrationAsync(
async Task RunOrchestrationAsync(
FunctionContext context, BindingMetadata triggerBinding, FunctionExecutionDelegate next)
{
InputBindingData<object> triggerInputData = await context.BindInputAsync<object>(triggerBinding);
Expand All @@ -63,7 +66,7 @@ static async Task RunOrchestrationAsync(

FunctionsOrchestrator orchestrator = new(context, next, triggerInputData);
string orchestratorOutput = GrpcOrchestrationRunner.LoadAndRun(
encodedOrchestratorState, orchestrator, context.InstanceServices);
encodedOrchestratorState, orchestrator, this.extendedSessionsCache, context.InstanceServices);

// Send the encoded orchestrator output as the return value seen by the functions host extension
context.GetInvocationResult().Value = orchestratorOutput;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
using Microsoft.DurableTask.Client;
using Microsoft.DurableTask.Converters;
using Microsoft.DurableTask.Worker;
using Microsoft.DurableTask.Worker.Grpc;
Comment thread
sophiatev marked this conversation as resolved.
using Microsoft.DurableTask.Worker.Shims;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
Expand Down Expand Up @@ -59,6 +60,7 @@
{
builder.UseMiddleware<DurableTaskFunctionsMiddleware>();
}
builder.Services.TryAddSingleton(new ExtendedSessionsCache());

return builder;
}
Expand Down Expand Up @@ -88,7 +90,7 @@
this.workerOptions = workerOptions;
}

public void PostConfigure(string name, DurableTaskClientOptions options)

Check warning on line 93 in src/Worker.Extensions.DurableTask/FunctionsWorkerApplicationBuilderExtensions.cs

View workflow job for this annotation

GitHub Actions / build

Nullability of reference types in type of parameter 'name' of 'void PostConfigureClientOptions.PostConfigure(string name, DurableTaskClientOptions options)' doesn't match implicitly implemented member 'void IPostConfigureOptions<DurableTaskClientOptions>.PostConfigure(string? name, DurableTaskClientOptions options)' (possibly because of nullability attributes).

Check warning on line 93 in src/Worker.Extensions.DurableTask/FunctionsWorkerApplicationBuilderExtensions.cs

View workflow job for this annotation

GitHub Actions / build

Nullability of reference types in type of parameter 'name' of 'void PostConfigureClientOptions.PostConfigure(string name, DurableTaskClientOptions options)' doesn't match implicitly implemented member 'void IPostConfigureOptions<DurableTaskClientOptions>.PostConfigure(string? name, DurableTaskClientOptions options)' (possibly because of nullability attributes).

Check warning on line 93 in src/Worker.Extensions.DurableTask/FunctionsWorkerApplicationBuilderExtensions.cs

View workflow job for this annotation

GitHub Actions / build

Nullability of reference types in type of parameter 'name' of 'void PostConfigureClientOptions.PostConfigure(string name, DurableTaskClientOptions options)' doesn't match implicitly implemented member 'void IPostConfigureOptions<DurableTaskClientOptions>.PostConfigure(string? name, DurableTaskClientOptions options)' (possibly because of nullability attributes).

Check warning on line 93 in src/Worker.Extensions.DurableTask/FunctionsWorkerApplicationBuilderExtensions.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

Nullability of reference types in type of parameter 'name' of 'void PostConfigureClientOptions.PostConfigure(string name, DurableTaskClientOptions options)' doesn't match implicitly implemented member 'void IPostConfigureOptions<DurableTaskClientOptions>.PostConfigure(string? name, DurableTaskClientOptions options)' (possibly because of nullability attributes).

Check warning on line 93 in src/Worker.Extensions.DurableTask/FunctionsWorkerApplicationBuilderExtensions.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

Nullability of reference types in type of parameter 'name' of 'void PostConfigureClientOptions.PostConfigure(string name, DurableTaskClientOptions options)' doesn't match implicitly implemented member 'void IPostConfigureOptions<DurableTaskClientOptions>.PostConfigure(string? name, DurableTaskClientOptions options)' (possibly because of nullability attributes).

Check warning on line 93 in src/Worker.Extensions.DurableTask/FunctionsWorkerApplicationBuilderExtensions.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

Nullability of reference types in type of parameter 'name' of 'void PostConfigureClientOptions.PostConfigure(string name, DurableTaskClientOptions options)' doesn't match implicitly implemented member 'void IPostConfigureOptions<DurableTaskClientOptions>.PostConfigure(string? name, DurableTaskClientOptions options)' (possibly because of nullability attributes).

Check warning on line 93 in src/Worker.Extensions.DurableTask/FunctionsWorkerApplicationBuilderExtensions.cs

View workflow job for this annotation

GitHub Actions / build

Nullability of reference types in type of parameter 'name' of 'void PostConfigureClientOptions.PostConfigure(string name, DurableTaskClientOptions options)' doesn't match implicitly implemented member 'void IPostConfigureOptions<DurableTaskClientOptions>.PostConfigure(string? name, DurableTaskClientOptions options)' (possibly because of nullability attributes).

Check warning on line 93 in src/Worker.Extensions.DurableTask/FunctionsWorkerApplicationBuilderExtensions.cs

View workflow job for this annotation

GitHub Actions / build

Nullability of reference types in type of parameter 'name' of 'void PostConfigureClientOptions.PostConfigure(string name, DurableTaskClientOptions options)' doesn't match implicitly implemented member 'void IPostConfigureOptions<DurableTaskClientOptions>.PostConfigure(string? name, DurableTaskClientOptions options)' (possibly because of nullability attributes).

Check warning on line 93 in src/Worker.Extensions.DurableTask/FunctionsWorkerApplicationBuilderExtensions.cs

View workflow job for this annotation

GitHub Actions / e2e-dts

Nullability of reference types in type of parameter 'name' of 'void PostConfigureClientOptions.PostConfigure(string name, DurableTaskClientOptions options)' doesn't match implicitly implemented member 'void IPostConfigureOptions<DurableTaskClientOptions>.PostConfigure(string? name, DurableTaskClientOptions options)' (possibly because of nullability attributes).

Check warning on line 93 in src/Worker.Extensions.DurableTask/FunctionsWorkerApplicationBuilderExtensions.cs

View workflow job for this annotation

GitHub Actions / e2e-dts

Nullability of reference types in type of parameter 'name' of 'void PostConfigureClientOptions.PostConfigure(string name, DurableTaskClientOptions options)' doesn't match implicitly implemented member 'void IPostConfigureOptions<DurableTaskClientOptions>.PostConfigure(string? name, DurableTaskClientOptions options)' (possibly because of nullability attributes).

Check warning on line 93 in src/Worker.Extensions.DurableTask/FunctionsWorkerApplicationBuilderExtensions.cs

View workflow job for this annotation

GitHub Actions / e2e-azurestorage-linux

Nullability of reference types in type of parameter 'name' of 'void PostConfigureClientOptions.PostConfigure(string name, DurableTaskClientOptions options)' doesn't match implicitly implemented member 'void IPostConfigureOptions<DurableTaskClientOptions>.PostConfigure(string? name, DurableTaskClientOptions options)' (possibly because of nullability attributes).

Check warning on line 93 in src/Worker.Extensions.DurableTask/FunctionsWorkerApplicationBuilderExtensions.cs

View workflow job for this annotation

GitHub Actions / e2e-azurestorage-linux

Nullability of reference types in type of parameter 'name' of 'void PostConfigureClientOptions.PostConfigure(string name, DurableTaskClientOptions options)' doesn't match implicitly implemented member 'void IPostConfigureOptions<DurableTaskClientOptions>.PostConfigure(string? name, DurableTaskClientOptions options)' (possibly because of nullability attributes).

Check warning on line 93 in src/Worker.Extensions.DurableTask/FunctionsWorkerApplicationBuilderExtensions.cs

View workflow job for this annotation

GitHub Actions / e2e-mssql

Nullability of reference types in type of parameter 'name' of 'void PostConfigureClientOptions.PostConfigure(string name, DurableTaskClientOptions options)' doesn't match implicitly implemented member 'void IPostConfigureOptions<DurableTaskClientOptions>.PostConfigure(string? name, DurableTaskClientOptions options)' (possibly because of nullability attributes).

Check warning on line 93 in src/Worker.Extensions.DurableTask/FunctionsWorkerApplicationBuilderExtensions.cs

View workflow job for this annotation

GitHub Actions / e2e-mssql

Nullability of reference types in type of parameter 'name' of 'void PostConfigureClientOptions.PostConfigure(string name, DurableTaskClientOptions options)' doesn't match implicitly implemented member 'void IPostConfigureOptions<DurableTaskClientOptions>.PostConfigure(string? name, DurableTaskClientOptions options)' (possibly because of nullability attributes).

Check warning on line 93 in src/Worker.Extensions.DurableTask/FunctionsWorkerApplicationBuilderExtensions.cs

View workflow job for this annotation

GitHub Actions / build

Nullability of reference types in type of parameter 'name' of 'void PostConfigureClientOptions.PostConfigure(string name, DurableTaskClientOptions options)' doesn't match implicitly implemented member 'void IPostConfigureOptions<DurableTaskClientOptions>.PostConfigure(string? name, DurableTaskClientOptions options)' (possibly because of nullability attributes).

Check warning on line 93 in src/Worker.Extensions.DurableTask/FunctionsWorkerApplicationBuilderExtensions.cs

View workflow job for this annotation

GitHub Actions / build

Nullability of reference types in type of parameter 'name' of 'void PostConfigureClientOptions.PostConfigure(string name, DurableTaskClientOptions options)' doesn't match implicitly implemented member 'void IPostConfigureOptions<DurableTaskClientOptions>.PostConfigure(string? name, DurableTaskClientOptions options)' (possibly because of nullability attributes).

Check warning on line 93 in src/Worker.Extensions.DurableTask/FunctionsWorkerApplicationBuilderExtensions.cs

View workflow job for this annotation

GitHub Actions / build

Nullability of reference types in type of parameter 'name' of 'void PostConfigureClientOptions.PostConfigure(string name, DurableTaskClientOptions options)' doesn't match implicitly implemented member 'void IPostConfigureOptions<DurableTaskClientOptions>.PostConfigure(string? name, DurableTaskClientOptions options)' (possibly because of nullability attributes).

Check warning on line 93 in src/Worker.Extensions.DurableTask/FunctionsWorkerApplicationBuilderExtensions.cs

View workflow job for this annotation

GitHub Actions / e2e-azurestorage-windows

Nullability of reference types in type of parameter 'name' of 'void PostConfigureClientOptions.PostConfigure(string name, DurableTaskClientOptions options)' doesn't match implicitly implemented member 'void IPostConfigureOptions<DurableTaskClientOptions>.PostConfigure(string? name, DurableTaskClientOptions options)' (possibly because of nullability attributes).

Check warning on line 93 in src/Worker.Extensions.DurableTask/FunctionsWorkerApplicationBuilderExtensions.cs

View workflow job for this annotation

GitHub Actions / e2e-azurestorage-windows

Nullability of reference types in type of parameter 'name' of 'void PostConfigureClientOptions.PostConfigure(string name, DurableTaskClientOptions options)' doesn't match implicitly implemented member 'void IPostConfigureOptions<DurableTaskClientOptions>.PostConfigure(string? name, DurableTaskClientOptions options)' (possibly because of nullability attributes).

Check warning on line 93 in src/Worker.Extensions.DurableTask/FunctionsWorkerApplicationBuilderExtensions.cs

View workflow job for this annotation

GitHub Actions / build

Nullability of reference types in type of parameter 'name' of 'void PostConfigureClientOptions.PostConfigure(string name, DurableTaskClientOptions options)' doesn't match implicitly implemented member 'void IPostConfigureOptions<DurableTaskClientOptions>.PostConfigure(string? name, DurableTaskClientOptions options)' (possibly because of nullability attributes).

Check warning on line 93 in src/Worker.Extensions.DurableTask/FunctionsWorkerApplicationBuilderExtensions.cs

View workflow job for this annotation

GitHub Actions / build

Nullability of reference types in type of parameter 'name' of 'void PostConfigureClientOptions.PostConfigure(string name, DurableTaskClientOptions options)' doesn't match implicitly implemented member 'void IPostConfigureOptions<DurableTaskClientOptions>.PostConfigure(string? name, DurableTaskClientOptions options)' (possibly because of nullability attributes).

Check warning on line 93 in src/Worker.Extensions.DurableTask/FunctionsWorkerApplicationBuilderExtensions.cs

View workflow job for this annotation

GitHub Actions / build

Nullability of reference types in type of parameter 'name' of 'void PostConfigureClientOptions.PostConfigure(string name, DurableTaskClientOptions options)' doesn't match implicitly implemented member 'void IPostConfigureOptions<DurableTaskClientOptions>.PostConfigure(string? name, DurableTaskClientOptions options)' (possibly because of nullability attributes).
{
if (this.workerOptions.Get(name).Serializer is { } serializer)
{
Expand All @@ -114,7 +116,7 @@
this.workerOptions = workerOptions;
}

public void PostConfigure(string name, DurableTaskWorkerOptions options)

Check warning on line 119 in src/Worker.Extensions.DurableTask/FunctionsWorkerApplicationBuilderExtensions.cs

View workflow job for this annotation

GitHub Actions / build

Nullability of reference types in type of parameter 'name' of 'void PostConfigureWorkerOptions.PostConfigure(string name, DurableTaskWorkerOptions options)' doesn't match implicitly implemented member 'void IPostConfigureOptions<DurableTaskWorkerOptions>.PostConfigure(string? name, DurableTaskWorkerOptions options)' (possibly because of nullability attributes).

Check warning on line 119 in src/Worker.Extensions.DurableTask/FunctionsWorkerApplicationBuilderExtensions.cs

View workflow job for this annotation

GitHub Actions / build

Nullability of reference types in type of parameter 'name' of 'void PostConfigureWorkerOptions.PostConfigure(string name, DurableTaskWorkerOptions options)' doesn't match implicitly implemented member 'void IPostConfigureOptions<DurableTaskWorkerOptions>.PostConfigure(string? name, DurableTaskWorkerOptions options)' (possibly because of nullability attributes).

Check warning on line 119 in src/Worker.Extensions.DurableTask/FunctionsWorkerApplicationBuilderExtensions.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

Nullability of reference types in type of parameter 'name' of 'void PostConfigureWorkerOptions.PostConfigure(string name, DurableTaskWorkerOptions options)' doesn't match implicitly implemented member 'void IPostConfigureOptions<DurableTaskWorkerOptions>.PostConfigure(string? name, DurableTaskWorkerOptions options)' (possibly because of nullability attributes).

Check warning on line 119 in src/Worker.Extensions.DurableTask/FunctionsWorkerApplicationBuilderExtensions.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

Nullability of reference types in type of parameter 'name' of 'void PostConfigureWorkerOptions.PostConfigure(string name, DurableTaskWorkerOptions options)' doesn't match implicitly implemented member 'void IPostConfigureOptions<DurableTaskWorkerOptions>.PostConfigure(string? name, DurableTaskWorkerOptions options)' (possibly because of nullability attributes).

Check warning on line 119 in src/Worker.Extensions.DurableTask/FunctionsWorkerApplicationBuilderExtensions.cs

View workflow job for this annotation

GitHub Actions / build

Nullability of reference types in type of parameter 'name' of 'void PostConfigureWorkerOptions.PostConfigure(string name, DurableTaskWorkerOptions options)' doesn't match implicitly implemented member 'void IPostConfigureOptions<DurableTaskWorkerOptions>.PostConfigure(string? name, DurableTaskWorkerOptions options)' (possibly because of nullability attributes).

Check warning on line 119 in src/Worker.Extensions.DurableTask/FunctionsWorkerApplicationBuilderExtensions.cs

View workflow job for this annotation

GitHub Actions / build

Nullability of reference types in type of parameter 'name' of 'void PostConfigureWorkerOptions.PostConfigure(string name, DurableTaskWorkerOptions options)' doesn't match implicitly implemented member 'void IPostConfigureOptions<DurableTaskWorkerOptions>.PostConfigure(string? name, DurableTaskWorkerOptions options)' (possibly because of nullability attributes).

Check warning on line 119 in src/Worker.Extensions.DurableTask/FunctionsWorkerApplicationBuilderExtensions.cs

View workflow job for this annotation

GitHub Actions / e2e-dts

Nullability of reference types in type of parameter 'name' of 'void PostConfigureWorkerOptions.PostConfigure(string name, DurableTaskWorkerOptions options)' doesn't match implicitly implemented member 'void IPostConfigureOptions<DurableTaskWorkerOptions>.PostConfigure(string? name, DurableTaskWorkerOptions options)' (possibly because of nullability attributes).

Check warning on line 119 in src/Worker.Extensions.DurableTask/FunctionsWorkerApplicationBuilderExtensions.cs

View workflow job for this annotation

GitHub Actions / e2e-dts

Nullability of reference types in type of parameter 'name' of 'void PostConfigureWorkerOptions.PostConfigure(string name, DurableTaskWorkerOptions options)' doesn't match implicitly implemented member 'void IPostConfigureOptions<DurableTaskWorkerOptions>.PostConfigure(string? name, DurableTaskWorkerOptions options)' (possibly because of nullability attributes).

Check warning on line 119 in src/Worker.Extensions.DurableTask/FunctionsWorkerApplicationBuilderExtensions.cs

View workflow job for this annotation

GitHub Actions / e2e-azurestorage-linux

Nullability of reference types in type of parameter 'name' of 'void PostConfigureWorkerOptions.PostConfigure(string name, DurableTaskWorkerOptions options)' doesn't match implicitly implemented member 'void IPostConfigureOptions<DurableTaskWorkerOptions>.PostConfigure(string? name, DurableTaskWorkerOptions options)' (possibly because of nullability attributes).

Check warning on line 119 in src/Worker.Extensions.DurableTask/FunctionsWorkerApplicationBuilderExtensions.cs

View workflow job for this annotation

GitHub Actions / e2e-azurestorage-linux

Nullability of reference types in type of parameter 'name' of 'void PostConfigureWorkerOptions.PostConfigure(string name, DurableTaskWorkerOptions options)' doesn't match implicitly implemented member 'void IPostConfigureOptions<DurableTaskWorkerOptions>.PostConfigure(string? name, DurableTaskWorkerOptions options)' (possibly because of nullability attributes).

Check warning on line 119 in src/Worker.Extensions.DurableTask/FunctionsWorkerApplicationBuilderExtensions.cs

View workflow job for this annotation

GitHub Actions / e2e-mssql

Nullability of reference types in type of parameter 'name' of 'void PostConfigureWorkerOptions.PostConfigure(string name, DurableTaskWorkerOptions options)' doesn't match implicitly implemented member 'void IPostConfigureOptions<DurableTaskWorkerOptions>.PostConfigure(string? name, DurableTaskWorkerOptions options)' (possibly because of nullability attributes).

Check warning on line 119 in src/Worker.Extensions.DurableTask/FunctionsWorkerApplicationBuilderExtensions.cs

View workflow job for this annotation

GitHub Actions / e2e-mssql

Nullability of reference types in type of parameter 'name' of 'void PostConfigureWorkerOptions.PostConfigure(string name, DurableTaskWorkerOptions options)' doesn't match implicitly implemented member 'void IPostConfigureOptions<DurableTaskWorkerOptions>.PostConfigure(string? name, DurableTaskWorkerOptions options)' (possibly because of nullability attributes).

Check warning on line 119 in src/Worker.Extensions.DurableTask/FunctionsWorkerApplicationBuilderExtensions.cs

View workflow job for this annotation

GitHub Actions / build

Nullability of reference types in type of parameter 'name' of 'void PostConfigureWorkerOptions.PostConfigure(string name, DurableTaskWorkerOptions options)' doesn't match implicitly implemented member 'void IPostConfigureOptions<DurableTaskWorkerOptions>.PostConfigure(string? name, DurableTaskWorkerOptions options)' (possibly because of nullability attributes).

Check warning on line 119 in src/Worker.Extensions.DurableTask/FunctionsWorkerApplicationBuilderExtensions.cs

View workflow job for this annotation

GitHub Actions / build

Nullability of reference types in type of parameter 'name' of 'void PostConfigureWorkerOptions.PostConfigure(string name, DurableTaskWorkerOptions options)' doesn't match implicitly implemented member 'void IPostConfigureOptions<DurableTaskWorkerOptions>.PostConfigure(string? name, DurableTaskWorkerOptions options)' (possibly because of nullability attributes).

Check warning on line 119 in src/Worker.Extensions.DurableTask/FunctionsWorkerApplicationBuilderExtensions.cs

View workflow job for this annotation

GitHub Actions / e2e-azurestorage-windows

Nullability of reference types in type of parameter 'name' of 'void PostConfigureWorkerOptions.PostConfigure(string name, DurableTaskWorkerOptions options)' doesn't match implicitly implemented member 'void IPostConfigureOptions<DurableTaskWorkerOptions>.PostConfigure(string? name, DurableTaskWorkerOptions options)' (possibly because of nullability attributes).

Check warning on line 119 in src/Worker.Extensions.DurableTask/FunctionsWorkerApplicationBuilderExtensions.cs

View workflow job for this annotation

GitHub Actions / e2e-azurestorage-windows

Nullability of reference types in type of parameter 'name' of 'void PostConfigureWorkerOptions.PostConfigure(string name, DurableTaskWorkerOptions options)' doesn't match implicitly implemented member 'void IPostConfigureOptions<DurableTaskWorkerOptions>.PostConfigure(string? name, DurableTaskWorkerOptions options)' (possibly because of nullability attributes).

Check warning on line 119 in src/Worker.Extensions.DurableTask/FunctionsWorkerApplicationBuilderExtensions.cs

View workflow job for this annotation

GitHub Actions / build

Nullability of reference types in type of parameter 'name' of 'void PostConfigureWorkerOptions.PostConfigure(string name, DurableTaskWorkerOptions options)' doesn't match implicitly implemented member 'void IPostConfigureOptions<DurableTaskWorkerOptions>.PostConfigure(string? name, DurableTaskWorkerOptions options)' (possibly because of nullability attributes).

Check warning on line 119 in src/Worker.Extensions.DurableTask/FunctionsWorkerApplicationBuilderExtensions.cs

View workflow job for this annotation

GitHub Actions / build

Nullability of reference types in type of parameter 'name' of 'void PostConfigureWorkerOptions.PostConfigure(string name, DurableTaskWorkerOptions options)' doesn't match implicitly implemented member 'void IPostConfigureOptions<DurableTaskWorkerOptions>.PostConfigure(string? name, DurableTaskWorkerOptions options)' (possibly because of nullability attributes).
{
if (this.workerOptions.Get(name).Serializer is { } serializer)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
<PackageReference Include="Microsoft.DurableTask.Worker.Grpc" />
<PackageReference Include="Grpc.Net.Client" />
<PackageReference Include="Microsoft.DurableTask.Analyzers" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/Apps/BasicDotNetIsolated/HTTPFeature.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public static async Task<string> HttpWithTokenSourceOrchestrator(
catch (Exception ex)
{
logger.LogError(ex, "HTTP call with token source failed");
return $"Token source HTTP call failed: {ex.Message}";
return $"Token source HTTP call failed: {ex}";
}
}
}
6 changes: 4 additions & 2 deletions test/e2e/Apps/BasicDotNetIsolated/host.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@
"version": "2.0",
"extensions": {
"durableTask": {
"hubName": "IsolatedE2ETaskHub",
"hubName": "IsolatedE2ETaskHub",
"tracing": {
"DistributedTracingEnabled": true,
"Version": "V2"
},
"defaultVersion": "2.0",
"versionMatchStrategy": "CurrentOrOlder",
"versionFailureStrategy": "Fail"
"versionFailureStrategy": "Fail",
"extendedSessionsEnabled": true,
"extendedSessionIdleTimeoutInSeconds": 30
}
}
}
21 changes: 12 additions & 9 deletions test/e2e/Tests/Tests/HTTPFeatureTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,25 +73,28 @@ public async Task HttpCallWithTokenSourceTest()

// Check if we're running in GitHub CI
bool isGitHubCI = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("GITHUB_ACTIONS"));

if (isGitHubCI)
{
// In GitHub CI, verify that the error message indicates failure due to absence of valid token credentials.
// Check output to verify CallHttpAsync fails.
Assert.Contains("Token source HTTP call failed", orchestrationDetails.Output);

Assert.Contains("Task 'BuiltIn::HttpActivity' (#0) failed with an unhandled exception: DefaultAzureCredential failed to retrieve a token from the included credentials.", orchestrationDetails.Output);

// Core Tools output not correctly captured by pipeline in this test sometimes (?)
// Check that logs to verify orchestrator fails becasue of credential failure.
Assert.Contains(this.fixture.TestLogs.CoreToolsLogs, log =>
log.Contains("Task 'BuiltIn::HttpActivity' (#0) failed with an unhandled exception: DefaultAzureCredential failed to retrieve a token from the included credentials."));
// Assert.Contains(this.fixture.TestLogs.CoreToolsLogs, log =>
// log.Contains("Task 'BuiltIn::HttpActivity' (#0) failed with an unhandled exception: DefaultAzureCredential failed to retrieve a token from the included credentials."));

Assert.Contains(this.fixture.TestLogs.CoreToolsLogs, log =>
log.Contains("WorkloadIdentityCredential authentication unavailable"));
// Assert.Contains(this.fixture.TestLogs.CoreToolsLogs, log =>
// log.Contains("WorkloadIdentityCredential authentication unavailable"));

Assert.Contains(this.fixture.TestLogs.CoreToolsLogs, log =>
log.Contains("ManagedIdentityCredential authentication unavailable."));
// Assert.Contains(this.fixture.TestLogs.CoreToolsLogs, log =>
// log.Contains("ManagedIdentityCredential authentication unavailable."));

Assert.Contains(this.fixture.TestLogs.CoreToolsLogs, log =>
log.Contains("EnvironmentCredential authentication unavailable."));
// Assert.Contains(this.fixture.TestLogs.CoreToolsLogs, log =>
// log.Contains("EnvironmentCredential authentication unavailable."));
}
else
{
Expand Down
Loading