aws / aws/aws-lambda-java-libs

v4 Events Lib - Major Version Change

未關閉
#282 23 則留言 14 個 reaction 已指派 0 人 在 GitHub 檢視
events-v4
主要語言
Java
星號
548
分支
241
平均合併
2 天 5 分鐘
30 天內合併 PR
11

描述

The next major version of the `aws-lambda-java-events` library is now being worked on. As part of this we are considering changes around serialization. Our goals are to make it easier for customers to handle different serialization scenarios, reduce package size and to more easily add new events to the library.

Our current plans include enabling customers to bring their own serializer by implementing the [PojoSerializer](https://github.com/aws/aws-lambda-java-libs/blob/master/aws-lambda-java-serialization/src/main/java/com/amazonaws/services/lambda/runtime/serialization/PojoSerializer.java) interface and including a provider-configuration file under `META-INF/services`.

To make it easier for new event objects to be added we are exploring ways to remove the use of mixins in the serialization library.

For example the [SecretsManagerRotationEvent](https://github.com/aws/aws-lambda-java-libs/blob/master/aws-lambda-java-events/src/main/java/com/amazonaws/services/lambda/runtime/events/SecretsManagerRotationEvent.java) uses the [SecretsManagerRotationEventMixin.java](https://github.com/aws/aws-lambda-java-libs/blob/master/aws-lambda-java-serialization/src/main/java/com/amazonaws/services/lambda/runtime/serialization/events/mixins/SecretsManagerRotationEventMixin.java) to change upper case attributes `Step`, `SecretId` and `ClientRequestToken` to lower case ones. This is required because Jackson expects lower case attribute names. Instead Jackson annotations will be added directly to the event fields which require them.

At this time we’ll also change the existing event objects to all follow the same design. Lombok annotations `@Data`, `@NoArgsConstructor`, `@Builder(setterPrefix = "with")`, `@AllArgsConstructor` and `@Singular`(when needed) will be added to events without them.

The `joda-time` dependency will be removed in this release.

貢獻指南

開啟貢獻指南

研究方向

Start by reading PojoSerializer.java and the linked SecretsManagerRotationEvent.java and SecretsManagerRotationEventMixin.java. Review the issue's proposed serializer-provider configuration, annotation, event-design, and dependency changes; done would mean the v4 serialization and event-object direction is specified and implemented consistently across the library.

由索引模型根據 Issue 內容生成。

評估

技術堆疊
aws, java
領域
backend
Issue 類型
重構
難度
5/5
預估耗時
一週以上
活躍度
冷清
描述清晰度
需要釐清
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。