-
Notifications
You must be signed in to change notification settings - Fork 4k
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
(aws_stepfunctions): Overriding to_stete_json() fails if result_path=sfn.JsonPath.DISCARD #14639
Comments
I am having the same problem overriding
If interested, this is to add the unsupported "TimeoutSecondsPath" field. |
To assist anyone else with this issue, I have worked out what the cause is. When you use As a workaround, leaving the |
This issue has not received any attention in 1 year. If you want to keep this issue open, please leave a comment below and auto-close will be canceled. |
I am running into this same issue with extending the |
If any part of a state's JSON representation is `null`, that value will be replaced by `undefined` when jsii sends data to the other language, resulting in a change of semantics. Multi-language APIs cannot differentiate between `null` and `undefined` as non-JS languages typically fail to distinguish between them... In order to address that, a `JsonNull` value was added which serializes to `null` (via Javascript's standard `toJSON` method), which must be used in such cases where `null` may need to cross the language boundary. The `JsonPath.DISCARD` value is now a string-token representation of the `JsonNull` instance. Fixes #14639
If any part of a state's JSON representation is `null`, that value will be replaced by `undefined` when jsii sends data to the other language, resulting in a change of semantics. Multi-language APIs cannot differentiate between `null` and `undefined` as non-JS languages typically fail to distinguish between them... In order to address that, a `JsonNull` value was added which serializes to `null` (via Javascript's standard `toJSON` method), which must be used in such cases where `null` may need to cross the language boundary. The `JsonPath.DISCARD` value is now a string-token representation of the `JsonNull` instance. Fixes #14639
If any part of a state's JSON representation is `null`, that value will be replaced by `undefined` when jsii sends data to the other language, resulting in a change of semantics. Multi-language APIs cannot differentiate between `null` and `undefined` as non-JS languages typically fail to distinguish between them... In order to address that, a `JsonNull` value was added which serializes to `null` (via Javascript's standard `toJSON` method), which must be used in such cases where `null` may need to cross the language boundary. The `JsonPath.DISCARD` value is now a string-token representation of the `JsonNull` instance. Fixes #14639 Fixes aws/jsii#3999 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
The JSON serialization class is a quasi-synonym for `Map<string, any>`, except it is meant to accept any valid JSON object, including one with `null` values. The serializer was however interpreting these as `Map<string, JSON>` when wired as a `$jsii.map` envelope, and this serialization class does NOT allow for null values. Addresses the "easy" part of aws/aws-cdk#14639 (more complicated is that it would need to preserve `null` across the process boundary, which is currently not possible). --- By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license]. [Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0
If any part of a state's JSON representation is `null`, that value will be replaced by `undefined` when jsii sends data to the other language, resulting in a change of semantics. Multi-language APIs cannot differentiate between `null` and `undefined` as non-JS languages typically fail to distinguish between them... In order to address that, a `JsonNull` value was added which serializes to `null` (via Javascript's standard `toJSON` method), which must be used in such cases where `null` may need to cross the language boundary. The `JsonPath.DISCARD` value is now a string-token representation of the `JsonNull` instance. Fixes aws#14639 Fixes aws/jsii#3999 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Overriding
to_stete_json()
on theDynamoUpdateItem
construct raises an exception ifresult_path=sfn.JsonPath.DISCARD
Reproduction Steps
Run
cdk synth
on the provided sampleWhat did you expect to happen?
It should produce a valid cloudformation stack.
What actually happened?
It produces this error:
Environment
Other
I'm attempting to use
States.Format()
in the update expression to parameterize the index of a dynamodb list based on the index of a Map state. BecauseStates.Format()
isn't supported yet (#11286) my attempted work-around is to overrideto_stete_json()
. However, that's producing the above error.This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: