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

cli command dag-processor uses [core] sql_alchemy_conn #23572

Closed
2 tasks done
Taragolis opened this issue May 8, 2022 · 2 comments · Fixed by #23575
Closed
2 tasks done

cli command dag-processor uses [core] sql_alchemy_conn #23572

Taragolis opened this issue May 8, 2022 · 2 comments · Fixed by #23575
Labels
area:core kind:bug This is a clearly a bug

Comments

@Taragolis
Copy link
Contributor

Apache Airflow version

2.3.0 (latest released)

What happened

Dag processor failed to start if [core] sql_alchemy_conn not defined

airflow-local-airflow-dag-processor-1  | [2022-05-08 16:42:35,835] {configuration.py:494} WARNING - section/key [core/sql_alchemy_conn] not found in config
airflow-local-airflow-dag-processor-1  | Traceback (most recent call last):
airflow-local-airflow-dag-processor-1  |   File "/home/airflow/.local/bin/airflow", line 8, in <module>
airflow-local-airflow-dag-processor-1  |     sys.exit(main())
airflow-local-airflow-dag-processor-1  |   File "/home/airflow/.local/lib/python3.9/site-packages/airflow/__main__.py", line 38, in main
airflow-local-airflow-dag-processor-1  |     args.func(args)
airflow-local-airflow-dag-processor-1  |   File "/home/airflow/.local/lib/python3.9/site-packages/airflow/cli/cli_parser.py", line 51, in command
airflow-local-airflow-dag-processor-1  |     return func(*args, **kwargs)
airflow-local-airflow-dag-processor-1  |   File "/home/airflow/.local/lib/python3.9/site-packages/airflow/utils/cli.py", line 99, in wrapper
airflow-local-airflow-dag-processor-1  |     return f(*args, **kwargs)
airflow-local-airflow-dag-processor-1  |   File "/home/airflow/.local/lib/python3.9/site-packages/airflow/cli/commands/dag_processor_command.py", line 53, in dag_processor
airflow-local-airflow-dag-processor-1  |     sql_conn: str = conf.get('core', 'sql_alchemy_conn').lower()
airflow-local-airflow-dag-processor-1  |   File "/home/airflow/.local/lib/python3.9/site-packages/airflow/configuration.py", line 486, in get
airflow-local-airflow-dag-processor-1  |     return self._get_option_from_default_config(section, key, **kwargs)
airflow-local-airflow-dag-processor-1  |   File "/home/airflow/.local/lib/python3.9/site-packages/airflow/configuration.py", line 496, in _get_option_from_default_config
airflow-local-airflow-dag-processor-1  |     raise AirflowConfigException(f"section/key [{section}/{key}] not found in config")
airflow-local-airflow-dag-processor-1  | airflow.exceptions.AirflowConfigException: section/key [core/sql_alchemy_conn] not found in config

What you think should happen instead

Since #22284 sql_alchemy_conn moved to [database] section dag-processor should use this configuration

How to reproduce

Run airflow dag-processor without defined [core] sql_alchemy_conn

sql_conn: str = conf.get('core', 'sql_alchemy_conn').lower()

Operating System

Arch Linux

Versions of Apache Airflow Providers

apache-airflow-providers-amazon==3.3.0
apache-airflow-providers-celery==2.1.4
apache-airflow-providers-cncf-kubernetes==4.0.1
apache-airflow-providers-docker==2.6.0
apache-airflow-providers-elasticsearch==3.0.3
apache-airflow-providers-ftp==2.1.2
apache-airflow-providers-google==6.8.0
apache-airflow-providers-grpc==2.0.4
apache-airflow-providers-hashicorp==2.2.0
apache-airflow-providers-http==2.1.2
apache-airflow-providers-imap==2.2.3
apache-airflow-providers-microsoft-azure==3.8.0
apache-airflow-providers-mysql==2.2.3
apache-airflow-providers-odbc==2.0.4
apache-airflow-providers-postgres==4.1.0
apache-airflow-providers-redis==2.0.4
apache-airflow-providers-sendgrid==2.0.4
apache-airflow-providers-sftp==2.6.0
apache-airflow-providers-slack==4.2.3
apache-airflow-providers-snowflake==2.6.0
apache-airflow-providers-sqlite==2.1.3
apache-airflow-providers-ssh==2.4.3

Deployment

Docker-Compose

Deployment details

No response

Anything else

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@Taragolis Taragolis added area:core kind:bug This is a clearly a bug labels May 8, 2022
@tirkarthi
Copy link
Contributor

Looks like a duplicate of #23447

@Taragolis
Copy link
Contributor Author

@tirkarthi oh, you absolutely right, I couldn't find it because for some reason it closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:core kind:bug This is a clearly a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants