aws / aws/aws-durable-execution-sdk-java
[Feature]: Cross context operation access check
- 主要言語
- Java
- スター
- 28
- フォーク
- 11
- 平均マージ
- 1日 8時間
- マージ済み PR(30日)
- 47
説明
### 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_
コントリビューションガイド
調査の方向性
まず TypeScript SDK に既存のコンテキスト間アクセスチェックを見つけ、次に Java の `.get` パスとスレッドローカルな現在のコンテキスト ID を追跡します。指定された `parallel` 例外を維持しながら、親コンテキスト、兄弟コンテキスト、その他のコンテキストに対する同等のチェックを実装し、同じコンテキストへの有効なアクセスが引き続き機能することを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java, typescript
- 領域
- backend-api-design
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 静か
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 48/100