[Feature]: Custom subtype for step, callback, and child context operations
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 55/100
- Issue-Typ
- Feature
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- java
- Bereich
- backend-api-design
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- Java
- Sterne
- 28
- Forks
- 16
- Ø Merge
- 16 Std. 53 Min.
- Gemergte PRs (30 T.)
- 63
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus aws/aws-durable-execution-sdk-java
-
bug pkg:conformance
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
aws/aws-durable-execution-sdk-java#844 ·
Maintainer antworten meist innerhalb von 1 Tag
-
documentation pkg:sdk
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 88/100
aws/aws-durable-execution-sdk-java#645 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
aws/aws-durable-execution-sdk-java#300 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug needs-triage pkg:sdk
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
aws/aws-durable-execution-sdk-java#859 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug needs-triage pkg:otel
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
aws/aws-durable-execution-sdk-java#858 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in aws/aws-durable-execution-sdk-java
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
a2aproject/a2a-java#1275 ·
Maintainer antworten meist innerhalb von 1 Tag
-
module/ftp Type/Bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
ballerina-platform/ballerina-library#9476 ·
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
anwilli5/coin-collection-android-US#515 ·
Maintainer antworten meist innerhalb von 1 Tag
-
status: waiting-for-triage type: bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
spring-projects/spring-integration#11654 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 Unter einer Stunde Anfängerfreundlichkeit 70/100
Vakore/ZappierGames#248 ·