docs(stepfunctions): use JsonPath.DISCARD in place of null for input#28661
docs(stepfunctions): use JsonPath.DISCARD in place of null for input#28661mergify[bot] merged 11 commits intoaws:mainfrom
JsonPath.DISCARD in place of null for input#28661Conversation
aws-cdk-automation
left a comment
There was a problem hiding this comment.
The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.
A comment requesting an exemption should contain the text Exemption Request. Additionally, if clarification is needed add Clarification Request to a comment.
|
Does |
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
|
@mrgrain The name Actually reading the doc on it, it could make sense ( |
| if (value === NULL_SUBSTITUTE) { | ||
| Object.assign(ret, handlers.handleNull(key, null)); |
There was a problem hiding this comment.
I didn't read the original issue, but just curious that does the following not work? The reason that it's completely ignoring null value is because on line 162, we explicitly skipped null or undefined scenario. If we don't want to ignore it, can't we just assign a value instead?
if (value === null || value === undefined) {
Object.assign(ret, handlers.handleNull(key, null));
}
There was a problem hiding this comment.
I think users want to specifically be able to distinguish null from undefined in typescript, but at the same time the two are the same in other languages like Python (None) so a magic value of some sort will satisfy both cases.
There was a problem hiding this comment.
@paulhcsun's right. This isn't an issue in TS (at least not as far as I know), but in jsii (languages) which cannot distinguish between null and undefined. But ASL (as a JSON-ish schema) sometimes requires users to use null
I believe this has been named based on this feature and assuming that the only time someone actually wants https://docs.aws.amazon.com/step-functions/latest/dg/input-output-resultpath.html If you look at the PRs and issue involved in
If we find that the naming/documentation for FWIW, after confirming |
aws-cdk-automation
left a comment
There was a problem hiding this comment.
The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.
A comment requesting an exemption should contain the text Exemption Request. Additionally, if clarification is needed add Clarification Request to a comment.
JsonPath.DISCARD in place of null for input
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
|
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
|
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Update docs for use of
sfn.JsonPath.DISCARDin place ofnullinTaskInput.fromObjects field value for languages that do not supportnulllike 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