robinhood / faust

Python Stream Processing
Other
6.72k stars 535 forks source link

app.discover ignore is not working #721

Open mavalderrama opened 3 years ago

mavalderrama commented 3 years ago

Checklist

Steps to reproduce

set my application as follows:

app = App(
    id=settings.APP_NAME,
    autodiscover=[
        "src.infrastructure.controllers",
    ],
    broker=f"kafka://{settings.KAFKA_HOST}:{settings.KAFKA_PORT};{settings.KAFKA_MSK_STR.replace(',', ';')}",
    value_serializer="raw",
    enable_sensors=True,
    enable_web=True)

app.discover(ignore=["src.adapters.databases"])

start faust application.

Expected behavior

start the application without raising errors

Actual behavior

an error raises while trying to import the env.py file from the alembic migrations script.

Full traceback

[2021-06-28T19:30:51.1624926651-0500][WARNING] [        base.py:722][_on_autodiscovery_error()] | [2477:139688087672640] | Autodiscovery importing module 'src.adapters.databases.postgres.migrations.env' raised error: AttributeError("module 'alembic.context' has no attribute 'config'")
Traceback (most recent call last):
  File "/home/user/miniconda3/envs/faust-monitoring/lib/python3.8/site-packages/venusian/__init__.py", line 230, in scan
    __import__(modname)
  File "/mnt/d/rappi/see-monitoring/src/adapters/databases/postgres/migrations/env.py", line 15, in <module>
    config = context.config
AttributeError: module 'alembic.context' has no attribute 'config'

Versions

bobh66 commented 3 years ago

This project appears to have been abandoned.

You might want to check out the fork of this project - https://github.com/faust-streaming/faust

It has a bunch of fixes merged for problems that were in the base project.