feat: Easy Event Deserialization #757
Conversation
pankajagrawal16
left a comment
There was a problem hiding this comment.
Some suggestions.
| } else if (obj instanceof KinesisAnalyticsStreamsInputPreprocessingEvent) { | ||
| KinesisAnalyticsStreamsInputPreprocessingEvent event = (KinesisAnalyticsStreamsInputPreprocessingEvent) obj; | ||
| return new EventPart(event.getRecords().stream().map(r -> decode(r.getData())).collect(Collectors.toList())); | ||
| } else { |
There was a problem hiding this comment.
What mechanisms can be have to update these when java lib introduces new event type?
There was a problem hiding this comment.
I am thinking may be we can have a github action which somehow polls java lib weekly or daily or whatever and create an issue if for powertools if something new is added for events ?
There was a problem hiding this comment.
Not all events make sense in here. I didn't add all, only those where there is a message or something meaningful to extract. Maybe I forgot some interesting ones.
There was a problem hiding this comment.
We can get an email on each release of the library. Dependabot will also raise a PR.
There was a problem hiding this comment.
Ok, may be i am overthinking this, we wait for doing anything more until we see it being a problem
|
Would anything change post v4 of the events library? It might be worth a quick chat with @andclt. |
| </dependency> | ||
| <dependency> | ||
| <groupId>com.amazonaws</groupId> | ||
| <artifactId>aws-lambda-java-events</artifactId> |
There was a problem hiding this comment.
In v4 of the events lib, there will be a dependency on Jackson, I don't think that changes anything, just worth noting.
…powertools/utilities/EventDeserializerTest.java Co-authored-by: Pankaj Agrawal <pnkaj.agrwal@gmail.com>
…s#756) Bumps [maven-jar-plugin](https://github.com/apache/maven-jar-plugin) from 3.2.0 to 3.2.2. - [Release notes](https://github.com/apache/maven-jar-plugin/releases) - [Commits](apache/maven-jar-plugin@maven-jar-plugin-3.2.0...maven-jar-plugin-3.2.2) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-jar-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…rtools#755) Bumps `aws.sdk.version` from 2.17.130 to 2.17.131. Updates `software.amazon.awssdk:bom` from 2.17.130 to 2.17.131 - [Release notes](https://github.com/aws/aws-sdk-java-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-java-v2/blob/master/CHANGELOG.md) - [Commits](aws/aws-sdk-java-v2@2.17.130...2.17.131) Updates `http-client-spi` from 2.17.130 to 2.17.131 - [Release notes](https://github.com/aws/aws-sdk-java-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-java-v2/blob/master/CHANGELOG.md) - [Commits](aws/aws-sdk-java-v2@2.17.130...2.17.131) Updates `url-connection-client` from 2.17.130 to 2.17.131 --- updated-dependencies: - dependency-name: software.amazon.awssdk:bom dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: software.amazon.awssdk:http-client-spi dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: software.amazon.awssdk:url-connection-client dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
remove trailing slash for multiple params
- javadoc - indentation - better edge cases handling
pankajagrawal16
left a comment
There was a problem hiding this comment.
Minor suggestion, from code perspective, it looks good to me, so if you want to start documenting it.
|
@pankajagrawal16 @msailes ready for further review / merge |
pankajagrawal16
left a comment
There was a problem hiding this comment.
Looks good. Just one minor suggestion on docs.
Issue #, if available:
Description of changes:
New feature in the serialization module: ability to easily extract the content from an Event (many built-in events).
Ex with API Gateway:
Ex with SQS:
Checklist
Breaking change checklist
RFC issue #:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.