-
Notifications
You must be signed in to change notification settings - Fork 7
[Feature]: Cross context operation access check #298
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or request
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Type
Projects
Status
Backlog