Open
Conversation
antstorm
reviewed
Apr 3, 2020
lib/cadence/workflow/context.rb
Outdated
|
|
||
| decision = Decision::ScheduleActivity.new( | ||
| activity_id: options[:activity_id], | ||
| activity_id: UUID.v5(metadata.run_id, activity_class.to_s + input.to_s + args.to_s), |
Contributor
There was a problem hiding this comment.
I don't think this will work, because there's a chance that you might need to schedule the same activity with the same arguments more than once and it will result in a duplicate ID
antstorm
reviewed
Apr 7, 2020
| # sequence of decision tasks | ||
| idem_activity_id = UUID.v5( | ||
| metadata.run_id, | ||
| activity_class.to_s + input.to_s + args.to_s + @history.events.length.to_s |
Contributor
There was a problem hiding this comment.
This has the same issue as using the current implementation of the activity ID — upon restarting the workflow @history.events.length will change.
This solution is also not replay friendly since @history.events.length will change between different re-runs
jordanwnolan
pushed a commit
to jordanwnolan/cadence-ruby
that referenced
this pull request
Jan 21, 2021
Update version to 0.0.1-pre19
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Use a unique ID for each activity execution