Skip to content

Updated import path for the variable sql_alchemy_connect_args#36525

Closed
nitish-samsung-jha wants to merge 2 commits intoapache:mainfrom
nitish-samsung-jha:patch-1
Closed

Updated import path for the variable sql_alchemy_connect_args#36525
nitish-samsung-jha wants to merge 2 commits intoapache:mainfrom
nitish-samsung-jha:patch-1

Conversation

@nitish-samsung-jha
Copy link

@nitish-samsung-jha nitish-samsung-jha commented Jan 2, 2024

Issue description:
getting following error while setting up postgresql db
ERROR - No module named 'airflow_local_settings'

https://airflow.apache.org/docs/apache-airflow/stable/howto/set-up-database.html#setting-up-a-postgresql-database
from the above link the value of varible "sql_alchemy_connect_args" should be updated to get correct import path.

current value :
sql_alchemy_connect_args = airflow_local_settings.keepalive_kwargs

correct value ( to be updated)
sql_alchemy_connect_args = airflow.config_templates.airflow_local_settings.keepalive_kwargs

@boring-cyborg
Copy link

boring-cyborg bot commented Jan 2, 2024

Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst)
Here are some useful points:

  • Pay attention to the quality of your code (ruff, mypy and type annotations). Our pre-commits will help you with that.
  • In case of a new feature add useful documentation (in docstrings or in docs/ directory). Adding a new operator? Check this short guide Consider adding an example DAG that shows how users should use it.
  • Consider using Breeze environment for testing locally, it's a heavy docker but it ships with a working Airflow and a lot of integrations.
  • Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
  • Please follow ASF Code of Conduct for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
  • Be sure to read the Airflow Coding style.
  • Always keep your Pull Requests rebased, otherwise your build might fail due to changes not related to your commits.
    Apache Airflow is a community-driven project and together we are making it better 🚀.
    In case of doubts contact the developers at:
    Mailing List: dev@airflow.apache.org
    Slack: https://s.apache.org/airflow-slack

.. code-block:: text

sql_alchemy_connect_args = airflow_local_settings.keepalive_kwargs
sql_alchemy_connect_args = airflow.config_templates.airflow_local_settings.keepalive_kwargs
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks this is an example. However, the file path has changed.

@potiuk
Copy link
Member

potiuk commented Jan 3, 2024

This is bad fix.
You shoud copy airflow_local_setings available in airflow code as template and use it from there.

See https://airflow.apache.org/docs/apache-airflow/stable/administration-and-deployment/logging-monitoring/advanced-logging-configuration.html

@potiuk potiuk closed this Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants