Use AWS MemoryCreated waiter in MemoryClient._wait_for_memory_active()
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 48/100
調査の方向性
MemoryClient.wait_for_memory_active() から開始し、create_memory_and_wait()、add*_strategy_and_wait()、update_memory_strategies_and_wait() がこれをどのように使用しているかを調べます。memory_created waiter の設定とフォールバック動作を確認し、その後 delete_memory_and_wait() が引き続き手動ポーリングを使用していることを確認します。対象メソッドが正常に待機し、後方互換性を維持していれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Summary
Replace manual polling in MemoryClient._wait_for_memory_active() with the AWS memory_created waiter for more efficient waiting.
Current Implementation
The current _wait_for_memory_active() method uses manual polling with a default 10-second interval:
def _wait_for_memory_active(self, memory_id: str, max_wait: int, poll_interval: int) -> Dict[str, Any]:
start_time = time.time()
while time.time() - start_time < max_wait:
status = self.get_memory_status(memory_id)
if status == MemoryStatus.ACTIVE.value:
return memory
elif status == MemoryStatus.FAILED.value:
raise RuntimeError(...)
time.sleep(poll_interval) # Default: 10 seconds
raise TimeoutError(...)
Proposed Implementation
Use the memory_created waiter (confirmed available in boto3):
def _wait_for_memory_active(self, memory_id: str, max_wait: int = 300, poll_interval: int = 2) -> Dict[str, Any]:
try:
waiter = self.gmcp_client.get_waiter('memory_created')
waiter.wait(
memoryId=memory_id,
WaiterConfig={
'Delay': poll_interval,
'MaxAttempts': max_wait // poll_interval
}
)
# Get final memory state
response = self.gmcp_client.get_memory(memoryId=memory_id)
return self._normalize_memory_response(response["memory"])
except Exception:
# Fallback to manual polling for backwards compatibility
return self._wait_for_memory_active_polling(memory_id, max_wait, poll_interval)
Benefits
| Aspect | Manual Polling | AWS Waiter |
|---|---|---|
| Default poll interval | 10s | 2s |
| Error handling | Custom | AWS-managed |
| Retry logic | Custom | Built-in |
| Maintenance | SDK team | AWS/botocore |
Affected Methods
This change would improve the following methods that use _wait_for_memory_active():
create_memory_and_wait()add_*_strategy_and_wait()methodsupdate_memory_strategies_and_wait()
Backwards Compatibility
Include fallback to manual polling if:
- Waiter is not available in older boto3 versions
- Waiter fails unexpectedly
Notes
- The
memory_createdwaiter is confirmed available:client.waiter_namesreturns['memory_created'] - No
memory_deletedwaiter exists, sodelete_memory_and_wait()must continue using manual polling
- 主要言語
- Python
- スター
- 786
- フォーク
- 163
- 平均マージ
- 4時間
- マージ済み PR(30日)
- 22
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
aws/bedrock-agentcore-sdk-python のほかの issue
-
bug high-severity
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
aws/bedrock-agentcore-sdk-python#752 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
aws/bedrock-agentcore-sdk-python#751 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
delete_all_long_term_memories_in_namespace deletes only the first 10 records対応中かも @Fire162 が 18 日前に担当しました。 オープンbug high-severity
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
aws/bedrock-agentcore-sdk-python#727 ·
メンテナーはふだん 1 日以内に返信
-
MPP: credential is always sent in Authorization, ignoring header="Payment-Authorization" in the challenge対応中かも @abhiramshaji-cyber が 24 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
aws/bedrock-agentcore-sdk-python#702 ·
メンテナーはふだん 1 日以内に返信
-
[Bug] update_message fails with parameter validation error when SessionMessage.message_id is a Strands positional integer index対応中かも @citizen204 が 144 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
aws/bedrock-agentcore-sdk-python#556 ·
メンテナーはふだん 1 日以内に返信
aws/bedrock-agentcore-sdk-python の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
snap-stanford/Biomni#380 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
microsoft/playwright-python#3361 ·
メンテナーはふだん 1 日以内に返信
-
documentation priority: low size: S status: needs triage
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
cubrid-lab/sqlalchemy-cubrid#1397 ·
メンテナーはふだん 1 日以内に返信
-
documentation priority: low size: S status: needs triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
cubrid-lab/pycubrid#1307 ·
メンテナーはふだん 1 日以内に返信
-
[Bug]: Installer hides SSL certificate errors as bare URLError, and the suggested fix can't workオープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
ShaftHQ/chaosengine-harness#143 ·
メンテナーはふだん 1 日以内に返信