Coder Social home page Coder Social logo

Comments (3)

danielko-robinhood avatar danielko-robinhood commented on August 22, 2024

Stack trace for schema not exactly match. This caused the faust app crash and restart:

Traceback (most recent call last):
  File "/home/robinhood/env/lib/python3.6/site-packages/faust/serializers/registry.py", line 128, in loads_value
    return typ(**v)
  File "/home/robinhood/env/lib/python3.6/site-packages/faust/models/record.py", line 155, in __init__
    self._init_fields(args, kwargs, strict=__strict__)
  File "/home/robinhood/env/lib/python3.6/site-packages/faust/models/record.py", line 181, in _init_fields
    ', '.join(sorted(extraneous))))
TypeError: MainStreetOrder got unexpected argument: response_category

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/robinhood/env/lib/python3.6/site-packages/faust/agents/agent.py", line 303, in _execute_task
    await coro
  File "/home/robinhood/env/lib/python3.6/site-packages/requiem/agents.py", line 22, in filter_order_updates
    async for order in orders:
  File "/home/robinhood/env/lib/python3.6/site-packages/faust/streams/stream.py", line 632, in __anext__
    value = await self._on_message()
  File "/home/robinhood/env/lib/python3.6/site-packages/faust/streams/stream.py", line 552, in on_message
    value: Any = await get_next_value()
  File "/home/robinhood/env/lib/python3.6/site-packages/faust/channels.py", line 394, in __anext__
    return await self.queue.get()
  File "/home/robinhood/env/lib/python3.6/site-packages/faust/utils/futures.py", line 220, in get
    return await super().get()
  File "/home/robinhood/python-3.6.3/lib/python3.6/asyncio/queues.py", line 175, in get
    return self.get_nowait()
  File "/home/robinhood/env/lib/python3.6/site-packages/faust/utils/futures.py", line 231, in get_nowait
    raise self._errors.popleft()
  File "/home/robinhood/env/lib/python3.6/site-packages/faust/topics.py", line 125, in decode
    value_type, message.value, serializer=value_serializer)
  File "/home/robinhood/env/lib/python3.6/site-packages/faust/serializers/registry.py", line 134, in loads_value
    str(exc)).with_traceback(sys.exc_info()[2]) from exc
  File "/home/robinhood/env/lib/python3.6/site-packages/faust/serializers/registry.py", line 128, in loads_value
    return typ(**v)
  File "/home/robinhood/env/lib/python3.6/site-packages/faust/models/record.py", line 155, in __init__
    self._init_fields(args, kwargs, strict=__strict__)
  File "/home/robinhood/env/lib/python3.6/site-packages/faust/models/record.py", line 181, in _init_fields
    ', '.join(sorted(extraneous))))
faust.exceptions.ValueDecodeError: MainStreetOrder got unexpected argument: response_category
[2018-01-23 05:15:37,049: INFO]: [^---Agent*: requiem.a[.]filter_order_updates]: Starting...
[2018-01-23 05:15:42,050: INFO]: [^---OneForOneSupervisor]: Restarting dead <Agent*: requiem.a[.]filter_order_updates>! Last crash reason: ValueDecodeError('MainStreetOrder got unexpected argument: response_category',)
[2018-01-23 05:15:42,051: INFO]: [^--Stream: <Topic: mainst_order_updates>]: Starting...```

from faust.

danielko-robinhood avatar danielko-robinhood commented on August 22, 2024

To fix this, I'll have to add the corresponding fields whenever the input Kafka message adds a new field:

https://github.com/robinhoodmarkets/requiem/commit/f915cf31dbfb37ac0227850ab70e0ce5c5c710a8#diff-0f63698bab3e064e4f23917b871a446cR46

from faust.

vineetgoel avatar vineetgoel commented on August 22, 2024

@ask looks like we should allow when incoming field has extra fields. Our model deserialization should not break on backwards compatible changes.

from faust.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.