aws / aws/bedrock-agentcore-sdk-python
AgentCore Runtime - get_async_task_info - did not return metadata
- Lingua principale
- Python
- Stelle
- 761
- Fork
- 147
- Merge medio
- 1g 23h
- PR unite (30g)
- 7
Descrizione
**Describe the bug**
Method `get_async_task_info` currently did not return metadata as shown here: https://github.com/aws/bedrock-agentcore-sdk-python/blob/9bd262397c3f3e662b2b178e397568ce184c7888/src/bedrock_agentcore/runtime/app.py#L223-L235
The metadata itself can be injected using method `add_async_task` as shown here: https://github.com/aws/bedrock-agentcore-sdk-python/blob/9bd262397c3f3e662b2b178e397568ce184c7888/src/bedrock_agentcore/runtime/app.py#L259-L264
**To Reproduce**
Create new task with metadata
```
task_id = app.add_async_task("file_processing", {"file": "data.csv"})
# ... do background work ...
app.complete_async_task(task_id)
```
Try to fetch metadata:
```
# Get info about running async tasks
task_info = app.get_async_task_info()
for task in task_info.get('running_jobs', []):
metadata = task.get('metadata', {})
print(metadata)
```
**Expected behavior**
`get_async_task_info` should return the metadata
**Screenshots**
n/a
**Additional context**
AgentCore SDK v1.2.1
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Start in src/bedrock_agentcore/runtime/app.py at get_async_task_info and compare it with add_async_task, using the linked line ranges. Reproduce the flow with metadata such as {"file": "data.csv"}, then check the returned running_jobs entries. Done means get_async_task_info exposes the metadata added by add_async_task.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- backend
- Tipo di issue
- Bug
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Stato di attività
- Ferma
- Chiarezza
- Specificata chiaramente
- Idoneità per principianti
- 52/100