-
Notifications
You must be signed in to change notification settings - Fork 291
Extended Sessions for Isolated (Orchestrations) #3154
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
Merged
sophiatev
merged 79 commits into
dev
from
stevosyan/extended-sessions-for-orchestrations-isolated
Sep 18, 2025
Merged
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 4a25f26
first commit
744a3d3
added protobuf field to indicate when the worker needs a history but …
e3b33f4
removing assemblyinfo change
d744878
removing new TaskOptions() fix
bf3b43e
Merge branch 'dev' into stevosyan/extended-sessions-for-orchestration…
ebfc911
added the new caching package
96ff756
added the new caching package
151d0ff
added the new caching package
1a34596
added the new caching package
b77e08e
reverting some non-changes
956ca53
added a wrapper ExtendedSessionState class so that we can initialize …
8216e57
adding proto files
00e99b8
Merge branch 'dev' into stevosyan/extended-sessions-for-orchestration…
7774407
adding updated protos
d55834a
added updated package names and nuget configs
d955987
added assemblyinfo change and some more nuget config changes
090f8b3
adding typed interfaces csproj changes
e9178a9
had the wrong package version for dotnet packages
2745041
updated net version of typedinterfaces project
07b48a3
trying typedinterfaces again
a774b17
trying to fix one of the tests not building correctly
53518f8
added another config
125e089
trying to add a restore step to the yml
7fb0e46
trying a change to the dockerfile
52165b4
trying another worker csproj
2cd7ecc
trying to add a nowarn to netherite project
79683ea
updating the package references and package version
212a10a
updating build.yml
e55b9df
updated two more nuget configs
825ac64
trying to remove the problematic projects from the restore step
81a93ce
reverting the yml and trying another nuget config actually
b5fbb42
one more nuget config change
3af10b6
removing TypedInterfaces projects from the solution
a138ee2
didnt do it correctly the first time
3fa2c72
trying a different extension.csproj for powershell
d31e7ae
reverting to old cs proj and trying new configs
c460682
reverting to old nuget.config
35ed72c
trying a version with building the test apps before the dotnet restore
f4341b2
adding new dependencies and new package number
5de97f6
Merge branch 'dev' into stevosyan/extended-sessions-for-orchestration…
b901837
Merge branch 'dev' into stevosyan/extended-sessions-for-orchestration…
d181f0c
updating version numbers
d4c3b75
adding proto changes from main branch
a218a43
Merge branch 'dev' into stevosyan/extended-sessions-for-orchestration…
d8ad0b1
updating biuld to remove building java smoke test
1178a13
downgrading the cache package to a version that is test with net6.0
8f20779
attempting to revert changes
a1dba92
the struggle continues
d0795c3
more
37ce527
more
f2faf35
more
f4f6825
more
5194d2e
more
8bc1f7b
more
a1614ba
more
fed8099
more
393ee48
more
053d9dc
more
4a4b370
test
b3e9fff
Merge branch 'main' into stevosyan/extended-sessions-for-orchestratio…
cef8e2e
i think this may work
7dfde04
adding reference to caching project
40677c5
reverting proto changes too
be7d7fb
addressing PR comments
f49d497
downgrading version of memory package
f913fa4
Merge branch 'dev' into stevosyan/extended-sessions-for-orchestration…
da1e542
slight change to only specify request parameters if extended sessions…
98cda21
Merge branch 'dev' into stevosyan/extended-sessions-for-orchestration…
548d1b5
updating e2e test stuff and version references
271f67e
removed a stale comment
2e1b666
restoring unnecessary extensions.csproj changes
efbfb69
trying to print logs to output to see why the CI is failing
be901f5
adding another output line
7ade287
trying with another line
3f1c47b
Merge branch 'dev' into stevosyan/extended-sessions-for-orchestration…
52bafbc
removing CI changes to test
a0e1b0f
trying again
f06fecd
Remove Core Tools output check from HTTP feature test
andystaples File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 | ||
| { | ||
|
|
@@ -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), | ||
|
|
@@ -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."); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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.
sophiatev marked this conversation as resolved.
|
||
| } | ||
|
|
||
| orchestratorResult = context.GetResult(); | ||
|
|
||
| if (context.OrchestratorCompleted) | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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)