infer: adding a field to After only on an update with a Before image fails the record
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 48/100
Línea de trabajo
Start by tracing the default infer schema encoding for records with structured Before and After payloads; the issue does not name implementation files or tests. Reproduce with an Avro attached update where a top level field is added to After, then inspect how the inferred schema handles the missing field in Before. Done when the record encodes with the expected nullable field behavior or returns a clear error naming the field and remedy.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
On a record that has both a structured Before and After and carries a schema, a processor that adds a
top-level field to After only fails the record under the default infer strategy. This is the mirror of
the removal case fixed in v0.10.0 (#195). It is not a regression: v0.9.2 fails the same way.
Reproduce
An Avro-attached update (for example Postgres CDC with REPLICA IDENTITY FULL) with
Before = {id: 1, name: "a"} and After = {id: 1, name: "b"}. In Conduit, run any of these on it:
field.seton.Payload.After.addedfield.renameon.Payload.After.nametofull_name,Afteronly- a
custom.javascriptthat adds a property toAfter
Actual
The record fails. infer takes the schema from After, which now has the new field. Before lacks that
field, so encoding it fails with missing required field (in v0.10.0 the rename case reports
ErrFieldNotInSchema on the old name). Same result with and without a NULL flip, same on v0.9.2 and v0.10.0.
Expected
Either the added field is also made nullable in the inferred schema and Before encodes with the field null
(as the NULL-flip handling in #195 already does for fields nil on one side), or the record fails with a clear
error that names the field and the remedy (add it to Before too). The current message does not say which.
Notes
sdk.schema.encode.payload.strategy: extenddoes not help: it rejects a top-level difference between
BeforeandAfterwithErrSchemaExtendMismatch.- Workaround: set the field on both parts (
.Payload.Before.addedand.Payload.After.added). - Anyone using
field.setto stamp CDC updates hits this. Conduit processor probe results are in the Conduit
PR bumping to v0.10.0.
- Lenguaje dominante
- Go
- Estrellas
- 1
- Forks
- 1
- Merge medio
- 11 min
- PR fusionados (30 d)
- 5
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de ConduitIO/conduit-processor-sdk
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
-
bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 55/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
Todos los issues de ConduitIO/conduit-processor-sdk
Issues similares
-
ConcatAgenticMessages loses the approval request ID of a streamed MCP tool callPosiblemente ocupada @ningsiyuan1024 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
containers/gvisor-tap-vsock#796 ·
Los mantenedores suelen responder en 2 días
-
external needs:triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
celestiaorg/celestia-node#5448 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 79/100
Los mantenedores suelen responder en 1 día
-
[Bug]: Azure SAS signing uses local time instead of UTC, shifting validity window on non-UTC hostsPosiblemente ocupada @huanghaoyuanhhy la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
zilliztech/milvus-backup#1418 ·
Los mantenedores suelen responder en 1 día