Skip to content
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

fix(sfn): stop replacing JsonPath.DISCARD with null #24717

Merged
merged 4 commits into from
Mar 21, 2023
Merged

Conversation

RomainMuller
Copy link
Contributor

Follow-up to #24593. The renderJsonPath function is subsituting a literal null for JsonPath.DISCARD, which results in the key being dropped if the value is sent across a language boundary, which effectively changes semantics.

The JsonPath.DISCARD value is a Token that ultimately resolves to null, and it must be preserved as such so that it is safe to exchange across languages.

Thanks to @beck3905 for reporting & diagnosing this.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

Follow-up to #24593. The `renderJsonPath` function is subsituting a
literal `null` for `JsonPath.DISCARD`, which results in the key being
dropped if the value is sent across a language boundary, which
effectively changes semantics.

The `JsonPath.DISCARD` value is a `Token` that ultimately resolves to
`null`, and it must be preserved as such so that it is safe to exchange
across languages.

Thanks to @beck3905 for reporting & diagnosing this.
@RomainMuller RomainMuller added the pr-linter/exempt-integ-test The PR linter will not require integ test changes label Mar 21, 2023
@RomainMuller RomainMuller self-assigned this Mar 21, 2023
@aws-cdk-automation aws-cdk-automation requested a review from a team March 21, 2023 09:31
@github-actions github-actions bot added the p2 label Mar 21, 2023
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Mar 21, 2023
Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@RomainMuller RomainMuller added the pr-linter/exempt-test The PR linter will not require test changes label Mar 21, 2023
@aws-cdk-automation aws-cdk-automation dismissed their stale review March 21, 2023 09:45

✅ Updated pull request passes all PRLinter validations. Dissmissing previous PRLinter review.

@mergify
Copy link
Contributor

mergify bot commented Mar 21, 2023

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-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 86e5f40
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify mergify bot merged commit 413b643 into main Mar 21, 2023
@mergify mergify bot deleted the rmuller/json-null-sfn branch March 21, 2023 12:36
@mergify
Copy link
Contributor

mergify bot commented Mar 21, 2023

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).

homakk pushed a commit to homakk/aws-cdk that referenced this pull request Mar 28, 2023
Follow-up to aws#24593. The `renderJsonPath` function is subsituting a literal `null` for `JsonPath.DISCARD`, which results in the key being dropped if the value is sent across a language boundary, which effectively changes semantics.

The `JsonPath.DISCARD` value is a `Token` that ultimately resolves to `null`, and it must be preserved as such so that it is safe to exchange across languages.

Thanks to @beck3905 for reporting & diagnosing this.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
akash1810 added a commit to guardian/cdk that referenced this pull request Apr 10, 2023
Use the static property `JsonPath.DISCARD` over the string `"DISCARD"`,
which will cause the state's input to become its output.

See:
  - aws/aws-cdk#24717
  - https://github.com/aws/aws-cdk/blob/main/CHANGELOG.v2.md#2700-2023-03-22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution/core This is a PR that came from AWS. p2 pr-linter/exempt-integ-test The PR linter will not require integ test changes pr-linter/exempt-test The PR linter will not require test changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants