-
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
(stepfunctions-tasks): LambdaInvoke - explicit null is not passed to lambda when using #16253
Comments
@peterwoodworth Can you help with alternatives to this pattern? I don't believe there is anything we can do about this due to TypeScript limitations |
Typescript has But I can't find where the |
Ah, my bad, glazed over the value in particular. I believe it is this condition within aws-cdk/packages/@aws-cdk/aws-stepfunctions/lib/json-path.ts Lines 108 to 109 in d5ca419
|
Hi @BenChaimberg , I would like to try to solve this problem, I wonder if you mind? |
Please go ahead! We are always happy to take contributions. |
@readybuilderone are you still planning on submitting a PR to fix this bug? |
@kaizen3031593 - I am actively working on a fix for this. Can you assign this issue to me? |
@jaresuth are you still working on this? |
Bump. Any news on this? |
Is this fixed? We also facing this issue. |
We are experiencing this as well. |
I faced a similar error when creating a pass state with null values. A quick solution is using
|
Yup having the same issue here, nice workaround ! |
Same issue with me as well, thanks for the workaround! |
Can y'all try |
Interesting workaround. Not something I would expect |
Agreed. It's named after this feature which at the time might have been the only (known) use case for @paulhcsun is looking into DX improvements on the linked PR. |
#28661) Update docs for use of `sfn.JsonPath.DISCARD` in place of `null` in `TaskInput.fromObject`s field value for languages that do not support `null` like Python. Doc: https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_stepfunctions.TaskInput.html#:~:text=to%20a%20task.-,static%20fromObject(obj),-public%20static%20fromObject Closes #16253. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
it is JS's
whereas operations which return and cases (e.g. default values for function args) where you need to distinguish "not supplied" from "explicit None supplied" would usually use a sentinel object for the former case e.g. NOT_SUPPLIED = object()
def myfunc(arg=NOT_SUPPLIED):
if arg is None:
...
elif arg is NOT_SUPPLIED:
...
else:
... using the bizarrely named contrary to the idea that " ( |
When I try to pass
null
as some parameter of a lambda, it gets removed from resulting task's parameters.It might have same result for javascript lambdas, but in Python there is a difference between key not being in input event and key being there with value
null
(orNone
in Python's case).This issue can be worked around by adding additional checks in the lambda, but that would add additional step needed for migration to CDK.
Reproduction Steps
What did you expect to happen?
What actually happened?
Environment
Other
This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: