[Feature]: Custom subtype for step, callback, and child context operations
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 55/100
- Issue 类型
- 功能
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- java
调研方向
Start with the StepConfig, CallbackConfig, and RunInChildContextConfig builders, then trace OperationIdentifier through checkpoint updates, replay validation, OperationInfo, and PluginInfoConverter. Implement optional subtype propagation and validation while preserving existing defaults, and verify that custom values appear consistently in execution history and plugin information. Check the sdk-testing local runner only if that optional validation is included.
由索引模型根据 Issue 内容生成。
描述
What would you like?
Let a caller set a custom subtype on a step, a callback, and a child context.
- A function can compose several durable operations into one larger operation. #571 proposes a public API for such extension operations.
- Every operation records a subtype in its checkpoint. Execution history and plugins read it.
- In Java, the subtype always comes from the
OperationSubTypeenum.StepConfig,CallbackConfig, andRunInChildContextConfighave no subtype option. The overload ofrunInChildContextAsyncthat takes a subtype is private. - So the parts of an extension operation all record
Step,Callback, orRunInChildContext. History and plugins can tell them apart only by parsing their names.
The JS SDK supports this today: ChildConfig.subType, and since aws/aws-durable-execution-sdk-js#939, StepConfig.subType and CreateCallbackConfig.subType. The Go SDK has WithChildSubType.
Possible Implementation
- Add an optional
subType(String)to the builders ofStepConfig,CallbackConfig, andRunInChildContextConfig. OperationIdentifierholds anOperationSubType, and derives the operation type from it. A custom subtype is a string with no enum value. So the identifier needs the operation type and the subtype string as separate fields. The enum stays as the source of the default subtypes.- Use the custom subtype everywhere the default is used today: checkpoint updates, replay validation, and plugin info (
OperationInfoand the classes built byPluginInfoConverter). - Validate the value before the operation is created:
- A null or empty value selects the default.
- The service accepts 1 to 32 characters from
[a-zA-Z0-9-_]. It rejects any other subtype with HTTP 400ValidationException, and the execution then fails. So the SDK should reject such a value with a clear error. - Optionally reject the values the SDK uses for its own operations, as the Go SDK does.
- Optionally, make the local runner in
sdk-testingreject an invalid subtype with the service's message, as the JS testing SDK does since aws/aws-durable-execution-sdk-js#939.
Nothing in the SDK decides how to suspend or retry from the subtype. So no other logic needs to change.
Is this a breaking change?
No. Without the option, the SDK records the same subtypes as today. The OperationIdentifier change in step 2 touches internal types only.
Does this require an RFC?
No.
Additional Context
- Replay compares the subtype with the checkpoint. So changing a subtype is a breaking change for executions in flight. The option's Javadoc should say this.
- #396 added fixed subtypes to every operation. This issue adds caller-chosen ones on top.
- 主要语言
- Java
- 星标
- 28
- 派生
- 15
- 平均合并
- 1 天 13 小时
- 30 天内合并 PR
- 41
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
aws/aws-durable-execution-sdk-java 的其他 Issue
-
documentation pkg:sdk
难度 1/5 1-3 小时 新手友好度 88/100
aws/aws-durable-execution-sdk-java#645 · 1 条评论 ·
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 68/100
aws/aws-durable-execution-sdk-java#300 ·
维护者通常 1 天内回复
-
[Epic]: Durable Functions on LMI可能已有人在做 @zhongkechen 于 1 天前认领。 未关闭
aws/aws-durable-execution-sdk-java#798 · 已指派 1 人 ·
维护者通常 1 天内回复
-
needs-triage
难度 5/5 一周以上 新手友好度 8/100
aws/aws-durable-execution-sdk-java#787 ·
维护者通常 1 天内回复
-
enhancement needs-triage
难度 5/5 一周以上 新手友好度 35/100
aws/aws-durable-execution-sdk-java#779 ·
维护者通常 1 天内回复
查看 aws/aws-durable-execution-sdk-java 的全部 Issue
相似的 Issue
-
enhancement Improvement
难度 2/5 1-3 小时 新手友好度 76/100
zowe/zowe-client-java-sdk#647 ·
-
NullPointerException when a `DeserializationProblemHandler` returns `null` for `byte[]` (single value unwrapped) and `char[]` elements可能已有人在做 @Marti2203 今天认领。 未关闭
难度 2/5 半天 新手友好度 88/100
FasterXML/jackson-databind#6300 ·
维护者通常 1 天内回复
-
content good first issue
难度 1/5 1 小时以内 新手友好度 95/100
cpinitiative/usaco-guide#6699 ·
维护者通常 1 天内回复
-
BC remittance upload: a claim MSP refused (S03) is saved with a blank status instead of refused (F)可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭type: bug
难度 2/5 1-3 小时 新手友好度 88/100
carlos-emr/carlos#4933 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 82/100
apache/rocketmq-dashboard#6925 ·
维护者通常 3 天内回复