aws / aws/aws-durable-execution-sdk-java
[Feature]: Cross context operation access check
- Lingua principale
- Java
- Stelle
- 28
- Fork
- 11
- Merge medio
- 1g 8h
- PR unite (30g)
- 47
Descrizione
### What would you like?
Add a check to ensure an operation is accessed (calling `.get`) only in the context where it's created.
This would disallow the access to an operation in
- its grandparent context
- its sibling context
- etc
There is an exception - `parallel` operation, in which the branches are always used in its grandparent context.
This check currently exists in TypeScript SDK but not implemented in Java SDK
### Possible Implementation
It's straightforward. The context id of the current thread is in thread local object. We can check that with the operation's context id.
### Is this a breaking change?
#### Yes
### Does this require an RFC?
No
### Additional Context
_No response_
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia trovando il controllo esistente dell'accesso tra contesti nel TypeScript SDK, quindi segui il percorso Java `.get` e l'ID del contesto corrente locale al thread. Implementa controlli equivalenti per i contesti padre, fratelli e altri, mantenendo l'eccezione `parallel` indicata, e verifica che l'accesso valido allo stesso contesto continui a funzionare.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- java, typescript
- Ambito
- backend-api-design
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Tranquilla
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 48/100