forked from microsoft/durabletask-protobuf
-
Notifications
You must be signed in to change notification settings - Fork 7
Adding workflow type name to OrchestratorStartedEvent #23
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
Open
WhitWaldo
wants to merge
2
commits into
dapr:main
Choose a base branch
from
WhitWaldo:workflow-type-versioning
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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
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.
What are your thoughts in regards storing the version number instead the name? I feel it'll give more freedom to SDKs as versions might not necessarily have a name, but they will for sure have a version number, right?
Uh oh!
There was an error while loading. Please reload this page.
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.
No, I don't think that's true. One of the push backs on my proposal was the idea that there would be workflows without a numerical version. For example, a workflow name sufficed by date/time or no numerical component at all, e.g.
MyWorkflowOne.For the purpose of the implementation, we don't need to bother with version numbers at all as that's left as an exercise to the SDK how they want to do it. In .NET, I'm looking at an interface where the developer simply provides an implementation that reflects the "latest" version for any given strategy, whatever approach they want to take to do that. We don't need to increment between versions at all and can just leap from the current to the latest versions.
But we do need to know precisely the name of the workflow run (per the durabletask spec), which this reflects, so I'd encourage not changing this.
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.
I see, so users will register just the latest version, plus all the previous supported versions. No ordering whatsoever, as that's all we need to know. Fair enough.
We'll need to make sure the version name is human readable, as we'll need to show this value to the user in the CLI (or any kind of workflow visualization tool).
For this I find version numbers more user friendly, for examples this would be a proposed CLI output using version numbers:
And this would be using version names:
Not a huge difference I think, but I would prefer version numbers, I find it clearer
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.
That largely feels like a different proposal, of having some way to store additional metadata about the version. I certainly agree it could be useful, especially as we're adding visibility to the workflows, but that's out of scope of this feature.
Again, workflow type versions (SDK detail, yes) needn't be ordered except to provide some mechanism to surface the "latest" type because when the name of the workflow is sent from the runtime to the SDK, we either need to replay using the provided name in this event from the workflow history or redirect to that "latest" version. Thus, there's no notion of "this one is version 8, but this one is a subsequent version 10". It's just "these workflows are constrained to replaying against MyWorkflow2 and this one against MyWorkflow20251127, and new workflow invocations will run against MyWorkflowRed because it's the latest one".