-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
StepFunctions: Migration to String Expressions #12028
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
Conversation
LocalStack Community integration with Pro 2 files ± 0 2 suites ±0 32m 17s ⏱️ - 1h 19m 59s Results for commit 28bcfff. ± Comparison against base commit a25d0d9. This pull request removes 2568 tests.
♻️ This comment has been updated with latest results. |
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.
Left some questions. Happy to approve when those comments are removed 😄
Also, very happy with this approach!
localstack-core/localstack/services/stepfunctions/asl/component/common/path/input_path.py
Outdated
Show resolved
Hide resolved
...es/stepfunctions/asl/component/common/payload/payloadvalue/payloadbinding/payload_binding.py
Outdated
Show resolved
Hide resolved
...tack-core/localstack/services/stepfunctions/asl/component/common/string/string_expression.py
Show resolved
Hide resolved
...ns/asl/component/state/state_execution/state_map/item_reader/reader_config/max_items_decl.py
Show resolved
Hide resolved
...ns/asl/component/state/state_execution/state_map/item_reader/reader_config/max_items_decl.py
Show resolved
Hide resolved
...tack/services/stepfunctions/asl/component/state/state_execution/state_map/max_concurrency.py
Outdated
Show resolved
Hide resolved
...tack/services/stepfunctions/asl/component/state/state_execution/state_map/max_concurrency.py
Show resolved
Hide resolved
...localstack/services/stepfunctions/asl/static_analyser/variable_references_static_analyser.py
Outdated
Show resolved
Hide resolved
...calstack/services/stepfunctions/asl/component/state/state_wait/wait_function/seconds_path.py
Outdated
Show resolved
Hide resolved
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!
Motivation
Currently the SFN internpreter v2 represents string literals though a
keyword_or_string
sub-production or through specialised terminal token types. This approach lacked an intermediary representation for string carrying executable expressions (jsonpaths, context objects, intrinsic functions, jsonata expressions, variable sampling), leading to some logic duplication as each declaration often having to implement the evaluation logic of these strings in varying context. These changes introduce thestring_expression
sub-production and a few logic child productions. Most importantly, all its sub productions are preprocessed as the expected evaluation component for the specific string expression they represent. The result is a more delcarative grammar, which ensures the correct string expressions are placed in the intended productions, with the productions seemingly having to just delegate the string expression provided, or apply the relevant logic overrides.Changes
string_expression
conceptmore delcarative
in the expected string expressions for each sub-production