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
[SFN] Add support for previousEventId #9342
Merged
Merged
Conversation
This file contains 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
MEPalma
added
the
semver: minor
Non-breaking changes which can be included in minor releases, but not in patch releases
label
Oct 12, 2023
dominikschubert
approved these changes
Oct 19, 2023
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.
LGTM, thanks for jumping on this. 🚀
@markers.snapshot.skip_snapshot_verify( | ||
paths=["$..loggingConfiguration", "$..tracingConfiguration", "$..previousEventId"] | ||
) | ||
@markers.snapshot.skip_snapshot_verify(paths=["$..loggingConfiguration", "$..tracingConfiguration"]) |
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.
great to see that we can start removing some skipped verifications 🚀
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
semver: minor
Non-breaking changes which can be included in minor releases, but not in patch releases
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.
Motivation
When dispatching
GetExecutionHistory
calls about some State Machine Execution, the current implementation would compilepreviousEventId
values according to a global incremental counter. This logic means that in information about the true event source of any event is often incorrect, especially for distributed workflows such as Map and Parallel states. This PR aims at ensuring that for each event, the true source event id is provided.Changes
Introduces a
EventHistoryContext
inEnvironment
objects. These allow the interpreter to cache the last event id published. As each context object operates in its own evaluation scope, this is information is ensured to not be tampered by the global execution of the program. Values in the context can then be resynchronised with the parent scope during frame closing operations, or skipped through frame deletion operations (see MapRun workflows).Evaluation logic for map iteration workers is modified to fit this new design, and resolved a number of concurrency issues when closing pool jobs or evaluation stops.
Related changes extend to other relevant state resolvers such as
state_map
andstate_parallel
.Testing
skip_snapshot_verify
forprevious_event_id
test_sfn_scenarios
for v2