faust icon indicating copy to clipboard operation
faust copied to clipboard

Need configurable onerror (or atleast an option to exit when autodiscovery fails)

Open hamzah-jamal opened this issue 3 years ago • 0 comments

Checklist

Issue is with master branch

Steps to reproduce

When I use autodiscover while an agent has import errors, it just gives a warning.

Expected behavior

I need an option to error out and exit the startup of faust app (or a way to implement my own _on_autodiscovery_error), maybe something like

app = faust.App(
    version=1,
    autodiscover=True,
    origin='codebase',
    id=settings.FAUST_APP_ID,
    on_auto_discovery_error=[warning|error|exit|ignore]
}

Actual behavior

It gave a warning, which may get ignored considering a general developer mindset. I would prefer fail fast approach so that it rather breaks the startup.

Full traceback

None

Versions

  • Python version - All
  • Faust version - faust-streaming - 0.8.1
  • Operating system - macOS
  • Kafka version - confluentinc/cp-kafka:5.2.1-1
  • RocksDB version (if applicable) - No

hamzah-jamal avatar Feb 17 '22 13:02 hamzah-jamal