Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

[Bug]: get_info_for_dispatch default resolves to empty owner in multi-owner deployments

Abierto
#1,231 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 2 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
65/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Área
backend

Línea de trabajo

El error está en push_notification_config_store.py e inmemory_push_notification_config_store.py. Empieza leyendo el método predeterminado get_info_for_dispatch y comprueba cómo llama a get_info con un ServerCallContext vacío. Después, examina la lógica de owner_resolver en el almacén en memoria para entender la partición de propietario de cadena vacía. La corrección consiste en hacer abstracto el método, pero comprueba primero las subclases existentes. Ejecuta cualquier prueba existente para las notificaciones push para verificar el comportamiento.

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

Descripción

component: server maintainers-only
What happened?

PushNotificationConfigStore.get_info_for_dispatch(task_id) is the cross-owner read used by the dispatch loop it must return every config for a task regardless of which owner registered it. But the shipped (non-abstract) default falls back to an owner-scoped get_info with an empty context:

# push_notification_config_store.py (v1.1.3) — default fallback
async def get_info_for_dispatch(self, task_id):
    logger.warning('%s does not override get_info_for_dispatch ...', type(self).__name__)
    return await self.get_info(task_id, ServerCallContext())   # empty context

get_info resolves the owner partition from that context:

# inmemory_push_notification_config_store.py — get_info
owner = self.owner_resolver(context)          # empty ctx -> empty-string owner
owner_infos = self._get_owner_push_notification_infos(owner)
return list(owner_infos.get(task_id, []))     # that partition is empty -> []

So ServerCallContext() -> empty-string owner -> returns [] -> every push notification is silently dropped in any multi-owner deployment. The only signal is a per-call logger.warning.

Proposed fix: #1180 fixes this by marking the method as abstractmethod. However, the method shipped as non-abstract (latest released versions at this time - v1.1.4), so this is a breaking change to a public ABC (existing subclasses fail to instantiate on upgrade) and should be a part of a major release.

Relevant log output

Code of Conduct
  • I agree to follow this project's Code of Conduct
Lenguaje dominante
Python
Estrellas
2.2k
Forks
509
Merge medio
3 d 11 h
PR fusionados (30 d)
43

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de a2aproject/a2a-python

Todos los issues de a2aproject/a2a-python

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.