aws / aws/bedrock-agentcore-sdk-python

AgentCore Runtime - get_async_task_info - did not return metadata

Abierto
#258 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Python
Estrellas
761
Forks
147
Merge medio
1 d 23 h
PR fusionados (30 d)
7

Descripción

**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

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
python
Área
backend
Tipo de issue
Error
Dificultad
2/5
Tiempo estimado
1-3 horas
Estado de actividad
Estancado
Claridad
Bien especificado
Aptitud para principiantes
52/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.