Create push notification config returns no id on database-backed stores

Aperta Adatta ai principianti
#1,237 1 commento 0 reazioni 1 assegnatario Vedi su GitHub

@rohityan ci sta già lavorando.

Dal 15/9/2026.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
75/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Ambito
backend, databases

Direzione di ricerca

Il problema si trova in default_request_handler.py alla riga 556 e in default_request_handler_v2.py alla riga 394, dove on_create_task_push_notification_config restituisce i params della request invece dell’oggetto persistito. Confronta con inmemory_push_notification_config_store.py:51 e database_push_notification_config_store.py:292 per vedere come ogni store gestisce l’id. Scrivi un test che crei una configurazione di notifiche push usando il database store e verifichi che la configurazione restituita abbia un id valido. Esegui i test esistenti delle notifiche push per assicurarti che il fix non rompa nulla.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

component: server status:awaiting response

What happens

Creating a push notification config against a database-backed server returns a config with no id. Reading it back with that id raises InvalidParamsError.

create returned id = ''
get FAILED -> InvalidParamsError: Validation failed

The same calls against the in-memory store return id='task-123' and the get succeeds.

Why

on_create_task_push_notification_config returns the caller's request object rather than what the store persisted (default_request_handler.py:556, default_request_handler_v2.py:394).

Both stores default an empty id to the task id, on different objects:

  • inmemory_push_notification_config_store.py:51 sets it on the caller's object, so return params carries it.
  • database_push_notification_config_store.py:292 copies first and sets it on the copy, so params never gets it.

The store holds the right id either way; only the response differs.

Version

main @ d55a3d3

Lingua principale
Python
Stelle
2.2k
Fork
496
Merge medio
1g 23h
PR unite (30g)
16

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di a2aproject/a2a-python

Tutte le issue di a2aproject/a2a-python

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.