Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Airflow2.3.2 is incompatible #39

Open
william081117 opened this issue Jun 29, 2022 · 0 comments
Open

Airflow2.3.2 is incompatible #39

william081117 opened this issue Jun 29, 2022 · 0 comments

Comments

@william081117
Copy link

When "scheduler_failover_controller start " is executed in terminal, the following exception is thrown:
Traceback (most recent call last):
File "/home/bigai/miniconda2/envs/airflow_env/bin/scheduler_failover_controller", line 7, in
exec(compile(f.read(), file, 'exec'))
File "/home/bigai/airflow_ha/airflow-scheduler-failover-controller-master/scheduler_failover_controller/bin/scheduler_failover_controller", line 7, in
args.func(args)
File "/home/bigai/airflow_ha/airflow-scheduler-failover-controller-master/scheduler_failover_controller/bin/cli.py", line 92, in start
scheduler_nodes_in_cluster, poll_frequency, metadata_service, emailer, failover_controller = get_all_scheduler_failover_controller_objects()
File "/home/bigai/airflow_ha/airflow-scheduler-failover-controller-master/scheduler_failover_controller/bin/cli.py", line 26, in get_all_scheduler_failover_controller_objects
metadata_service = build_metadata_service(configuration, logger)
File "/home/bigai/airflow_ha/airflow-scheduler-failover-controller-master/scheduler_failover_controller/app.py", line 12, in build_metadata_service
logger
File "/home/bigai/airflow_ha/airflow-scheduler-failover-controller-master/scheduler_failover_controller/metadata/sql_metadata_service.py", line 28, in init
self.engine = create_engine(sql_alchemy_conn, **engine_args)
File "", line 2, in create_engine
File "/home/bigai/miniconda2/envs/airflow_env/lib/python3.7/site-packages/sqlalchemy/util/deprecations.py", line 298, in warned
return fn(*args, **kwargs)
File "/home/bigai/miniconda2/envs/airflow_env/lib/python3.7/site-packages/sqlalchemy/engine/create.py", line 520, in create_engine
u, plugins, kwargs = u._instantiate_plugins(kwargs)
AttributeError: 'NoneType' object has no attribute '_instantiate_plugins'

Here's my solution: vi airflow-scheduler-failover-controller-master/scheduler_failover_controller/configuration.py
modify this code:
120 def get_sql_alchemy_conn(self):
121 # Airflow 2.3版本SQL_ALCHEMY_CONN配置在database片段中
122 return self.get_config("database", "SQL_ALCHEMY_CONN")
123 #return self.get_config("core", "SQL_ALCHEMY_CONN")

Because the airflow.cfg format changes!
Can you retrofit this piece of code?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant