-
Notifications
You must be signed in to change notification settings - Fork 913
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 activity / workflow task version check #4580
Conversation
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.
click the wrong approve
runID string, | ||
scheduledEventID int64, | ||
activityId string, | ||
activityType string, |
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.
why do we need activityType in the token? for metrics?
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.
"", | ||
1, | ||
nil, | ||
common.EmptyVersion, |
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.
any future plan to use a real version?
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, the *ActivitybyID APIs are on the deprecation path, and the contract does not include clock or version
(token.StartedEventId != common.EmptyEventID && token.StartedEventId != currentWorkflowTask.StartedEventID) { | ||
(token.StartedEventId != common.EmptyEventID && token.StartedEventId != currentWorkflowTask.StartedEventID) || | ||
currentWorkflowTask.Attempt != token.Attempt || | ||
(token.Version != common.EmptyVersion && token.Version != currentWorkflowTask.Version) { |
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.
is it possible token.Version > currentWorkflowTask.Version? I am not sure if a workflow task retry would update ms wt version.
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.
token version comes from workflow task, so if workflow task is updated, then corresponding token version should be the newest value
What changed?
Why?
Make activity / workflow task check more accurate
How did you test it?
Existing tests
Potential risks
N/A
Is hotfix candidate?
N/A