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

Add Versioning support in durabletask(phase1) #1071

Merged
merged 4 commits into from
Apr 25, 2024
Merged
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
5 changes: 5 additions & 0 deletions src/DurableTask.Core/OrchestrationContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ public abstract class OrchestrationContext
/// </summary>
public OrchestrationInstance OrchestrationInstance { get; internal protected set; }

/// <summary>
/// Version of the currently executing orchestration
/// </summary>
public string Version { get; internal protected set; }

/// <summary>
/// Replay-safe current UTC datetime
/// </summary>
Expand Down
1 change: 1 addition & 0 deletions src/DurableTask.Core/TaskOrchestrationExecutor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ void ProcessEvent(HistoryEvent historyEvent)
{
case EventType.ExecutionStarted:
var executionStartedEvent = (ExecutionStartedEvent)historyEvent;
this.context.Version = executionStartedEvent.Version;
this.result = this.taskOrchestration.Execute(this.context, executionStartedEvent.Input);
break;
case EventType.ExecutionTerminated:
Expand Down