Stream.group_by don't support schema
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 18/100
- Tipo de issue
- Bug
- Clareza
- Razoavelmente clara
- Status de atividade
- Estagnada
- Stack de tecnologia
- kafka, python
- Domínio
- stream-processing
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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
- Linguagem predominante
- Python
- Estrelas
- 1.9k
- Forks
- 205
- Merge médio
- 2h 2min
- PRs com merge (30d)
- 1
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de faust-streaming/faust
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 86/100
faust-streaming/faust#804 ·
-
scripts/install script forces use of ./venv virtualenv, impossible to use with virtualenvwrapperAberta
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 62/100
faust-streaming/faust#28 · 1 comentário ·
-
[BUG] SASL PLAINTEXT producer initialization fails : missing sasl_plain_username/passwordTalvez já em andamento @wbarnha assumiu há 56 dias. Aberta
faust-streaming/faust#794 · 2 comentários · 1 reação · 2 responsáveis ·
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 18/100
faust-streaming/faust#670 ·
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 18/100
faust-streaming/faust#666 ·
Todas as issues de faust-streaming/faust
Issues semelhantes
-
`gitlab_importer_v2` pipeline failing due to malformed YAML fileTalvez já em andamento @Gowri213 assumiu hoje. Abertabug Pipeline: Failure Priority: high
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
aboutcode-org/vulnerablecode#2523 · 1 comentário ·
Mantenedores costumam responder em até 5 dias
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
intuitem/ciso-assistant-community#5380 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
confluentinc/cp-ansible#2767 ·
Mantenedores costumam responder em até 3 dias
-
bug docs
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 85/100
mesa/mesa#4223 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 85/100
Mantenedores costumam responder em até 2 dias