Stream.group_by don't support schema
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 18/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- À l'abandon
- Stack technique
- kafka, python
- Domaine
- stream-processing
Piste de recherche
Start from the Stream.group_by call in the reproduction, where the agent's custom schema is lost when the internal topic is created for key grouping. Read how that internal topic gets its deserializer, then check whether a schema passed to group_by would reach it. Done means event.value arrives as the custom record type rather than str in the reproduction; the issue has no linked pull request and no maintainer decision yet, so confirm the design with maintainers first.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Checklist
- I have included information about relevant versions
- I have verified that the issue persists when using the
masterbranch of Faust.
Steps to reproduce
I have an agent that uses a custom schema. Also, the agent groups messages by key before processing them.
The issue is due to the internal topic created by the method stream.group_by.
This internal topic doesn't deserialize the message properly.
The solution could be to pass this schema through an argument to the method Stream.group_by.
Expected behavior
async def get_key(value):
return value.id
@app.agent(schema=CustomSchema())
async def counter(stream):
""" Count records. """
async for event in stream.group_by(get_key, name='count').events():
## the type of event.value should be MyRecord, instead of str
yield event
Actual behavior
This internal topic created by Stream.group_by doesn't deserialize the message properly.
Versions
- Python version: 3.10
- Faust version: 0.10.16
- Langage dominant
- Python
- Étoiles
- 1.9k
- Forks
- 205
- Merge moyen
- 2 h 2 min
- PR mergées (30 j)
- 1
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de faust-streaming/faust
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 86/100
faust-streaming/faust#804 ·
-
scripts/install script forces use of ./venv virtualenv, impossible to use with virtualenvwrapperOuverte
Difficulté 1/5 Moins d'une heure Accessibilité débutants 62/100
faust-streaming/faust#28 · 1 commentaire ·
-
[BUG] SASL PLAINTEXT producer initialization fails : missing sasl_plain_username/passwordPeut-être pris @wbarnha l’a pris il y a 56 jours. Ouverte
faust-streaming/faust#794 · 2 commentaires · 1 réaction · 2 personnes assignées ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 18/100
faust-streaming/faust#670 ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 18/100
faust-streaming/faust#666 ·
Toutes les issues de faust-streaming/faust
Issues similaires
-
bug game: 0100FF500E34A000 game: 0400FF500E34A001 mac packing
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
Les mainteneurs répondent en général sous 2 jours
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100
jxxghp/MoviePilot#7576 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 88/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 64/100
jbaruch/software-factory#266 ·
Les mainteneurs répondent en général sous 1 jour
-
cron: raise a distinct error when next_fire finds no match in its search bound (from #813 item 5)Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
Les mainteneurs répondent en général sous 1 jour