Backport worker_may_ignore history handling#356
Open
d2army wants to merge 2 commits intotransfers-masterfrom
Open
Backport worker_may_ignore history handling#356d2army wants to merge 2 commits intotransfers-masterfrom
d2army wants to merge 2 commits intotransfers-masterfrom
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
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.
Summary
worker_may_ignorehistory handling from the 0.1.x line totransfers-master/ 0.0.x without proto regeneration.History::Eventconstructable when a history event has an attributes oneof unknown to the old generated proto, soworker_may_ignorecan still be read.Why (#1)
History::Event#extract_attributescan receivenilfor an unknown attributes oneof and raise beforeworker_may_ignoreis read; making attribute extraction nil-safe keeps the compatibility bit reachable.Why (#2)
StateManager#apply_eventcallsHistory::EventTarget.from_event(event)before its event-type case statement, so unknown event prefixes can raise before the final unsupported-event branch is reached.worker_may_ignore=true, while still raising for unknown events that are not explicitly safe to ignore.Test plan
RBENV_VERSION=3.0.6 bundle exec rspec -r temporal/connection/grpc spec/unit/lib/temporal/workflow/history/event_spec.rb spec/unit/lib/temporal/workflow/state_manager_spec.rbRBENV_VERSION=3.0.6 ruby -c lib/temporal/version.rb && RBENV_VERSION=3.0.6 ruby -c spec/unit/lib/temporal/workflow/history/event_spec.rb && git diff --checkFollow-up validation