aws / aws/aws-durable-execution-sdk-java
[Feature]: Cross context operation access check
- Langage dominant
- Java
- Étoiles
- 28
- Forks
- 11
- Merge moyen
- 1 j 8 h
- PR mergées (30 j)
- 47
Description
### 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_
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par trouver la vérification existante de l’accès inter-contextes dans le TypeScript SDK, puis suivez le chemin Java `.get` et l’ID du contexte courant stocké dans le thread local. Implémentez des vérifications équivalentes pour les contextes parent, frère et autres, tout en préservant l’exception `parallel` indiquée, et vérifiez que l’accès valide dans le même contexte fonctionne toujours.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- java, typescript
- Domaine
- backend-api-design
- Type d'issue
- Fonctionnalité
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- Calme
- Clarté
- Plutôt claire
- Accessibilité débutants
- 48/100