-
Notifications
You must be signed in to change notification settings - Fork 56
Adopt a linear-time replay algorithm #305
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
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
f7a34e4
Enable linear-time replay
davidmrdavid 51a84cf
document translation from V2 to V1 actions
davidmrdavid 7bbfd81
document testing helper
davidmrdavid 80e5fb7
respond to PR feedback
davidmrdavid b40e36f
drop extensionSchema enum
davidmrdavid 84e331a
check for non-generator orchestrations
davidmrdavid 9ddde58
Update src/taskorchestrationexecutor.ts
davidmrdavid e644485
apply PR feedback
davidmrdavid f6347e8
Merge branch 'dajusto/linear-replay' of https://github.com/Azure/azur…
davidmrdavid b1e62a2
simplifying timer logic
davidmrdavid 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 |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| import { ActionType, IAction } from "../classes"; | ||
| import { DFTask } from "../task"; | ||
|
|
||
| /** @hidden */ | ||
| export class WhenAllAction implements IAction { | ||
| public readonly actionType: ActionType = ActionType.WhenAll; | ||
| public readonly compoundActions: IAction[]; | ||
|
|
||
| constructor(tasks: DFTask[]) { | ||
| this.compoundActions = tasks.map((t) => t.actionObj); | ||
| } | ||
| } |
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 |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| import { ActionType, IAction } from "../classes"; | ||
| import { DFTask } from "../task"; | ||
|
|
||
| /** @hidden */ | ||
| export class WhenAnyAction implements IAction { | ||
| public readonly actionType: ActionType = ActionType.WhenAny; | ||
| public readonly compoundActions: IAction[]; | ||
|
|
||
| constructor(tasks: DFTask[]) { | ||
| this.compoundActions = tasks.map((t) => t.actionObj); | ||
| } | ||
| } |
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,12 +1,28 @@ | ||
| import { HistoryEvent } from "./classes"; | ||
| import { LatestReplaySchema, ReplaySchema } from "./replaySchema"; | ||
|
|
||
| /** @hidden */ | ||
| export class DurableOrchestrationBindingInfo { | ||
| public readonly upperSchemaVersion: ReplaySchema; | ||
|
|
||
| constructor( | ||
| public readonly history: HistoryEvent[] = [], | ||
| public readonly input?: unknown, | ||
| public readonly instanceId: string = "", | ||
| public readonly isReplaying: boolean = false, | ||
| public readonly parentInstanceId?: string // TODO: Implement entity locking // public readonly contextLocks?: EntityId[], | ||
| ) {} | ||
| public readonly parentInstanceId?: string, | ||
| upperSchemaVersion = 0 // TODO: Implement entity locking // public readonly contextLocks?: EntityId[], | ||
| ) { | ||
| // It is assumed that the extension supports all schemas in range [0, upperSchemaVersion]. | ||
| // Similarly, it is assumed that this SDK supports all schemas in range [0, LatestReplaySchema]. | ||
|
|
||
| // Therefore, if the extension supplies a upperSchemaVersion included in our ReplaySchema enum, we use it. | ||
| // But if the extension supplies an upperSchemaVersion not included in our ReplaySchema enum, then we | ||
| // assume that upperSchemaVersion is larger than LatestReplaySchema and therefore use LatestReplaySchema instead. | ||
| if (Object.values(ReplaySchema).includes(upperSchemaVersion)) { | ||
| this.upperSchemaVersion = upperSchemaVersion; | ||
| } else { | ||
| this.upperSchemaVersion = LatestReplaySchema; | ||
| } | ||
| } | ||
| } |
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.
Uh oh!
There was an error while loading. Please reload this page.