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

Maintenance: V2 updates - review interface & propose improvements for Serialization module #1470

Open
1 of 2 tasks
scottgerring opened this issue Oct 10, 2023 · 3 comments
Open
1 of 2 tasks
Assignees
Labels
maintenance priority:2 High - core feature or affects 60% of the users v2 Version 2
Milestone

Comments

@scottgerring
Copy link
Contributor

scottgerring commented Oct 10, 2023

Summary

We should use the V2 release as an opportunity to reflect upon the interfaces of our existing modules and identify areas of improvement. This work has been done as part of rewrites for some modules, and in isolation for others - check out #1283 for details.

We should also integrate the v4 of aws-lambda-java-events.

Why is this needed?

  • Minimize the likelihood that we need to make more breaking changes to PT-Java again soon in the future
  • Double-down on the quality of the project by forcing large-scale code review
  • Increase knowledge of the modules around the contributor team

Which area does this relate to?

Serialization

Solution

  1. A review of the current module, its public interface and structure, and potential areas for improvement documented on this ticket for discussion
  2. A draft PR against the v2 branch showing the high level impact of proposed changes
  3. PR completed and merged into v2

Acknowledgment

@jeromevdl
Copy link
Contributor

jeromevdl commented Nov 22, 2023

somehow linked to #1479

@scottgerring scottgerring self-assigned this Dec 15, 2023
@scottgerring scottgerring added this to the v2 milestone Dec 21, 2023
@scottgerring
Copy link
Contributor Author

scottgerring commented Jan 4, 2024

Investigation Notes

Re-assessing the list of events supported in events v3 I see no events with user-defined payloads we are not already handling.

Modules that use ObjectMapper directly in v2:

  • powertools-validation (validates a JSON object against a JSON schema)
  • powertools-tracing (adding extra info to traces)
  • powertools-serialization
  • powertools-logging - the common library - serializing and deserializing events via captureCorrelationId, 2/ PowertoolsResolver uses ObjectMapper to check if something is JSON, and if it can be encoded without nested quotation into the logs
  • powertools-idempotency
  • powertools-parameters - Uses ObjectMapper in its JsonTransformer<T> class
  • powertools-cloudformation - Uses ObjectMapper to interact with Cloudformation's custom resources API

Internal dependencies on the powertools-serialization module:

Screenshot 2024-01-04 at 13 22 32

@scottgerring
Copy link
Contributor Author

scottgerring commented Jan 4, 2024

Open questions:

  • Should powertools-parameters / JsonTransformer use the serialization ObjectMapper ? (probably yes?)
  • Should powertools-cloudformation use the serialization ObjectMapper? (probably not - CF serialization needs different from generic event model)
  • Should powertools-logging use the serialization ObjectMapper? (probably not - again, different serialization configuration needs)
  • jackson-jr ?

@scottgerring scottgerring moved this from Backlog to Working on it in Powertools for AWS Lambda (Java) Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance priority:2 High - core feature or affects 60% of the users v2 Version 2
Projects
Status: Working on it
Development

No branches or pull requests

2 participants