Skip to content

Comments

In DagBag set read_dags_from_db from config#13521

Closed
john-jac wants to merge 1 commit intoapache:masterfrom
john-jac:patch-1
Closed

In DagBag set read_dags_from_db from config#13521
john-jac wants to merge 1 commit intoapache:masterfrom
john-jac:patch-1

Conversation

@john-jac
Copy link
Contributor

@john-jac john-jac commented Jan 6, 2021

Update dagbag.py read_dags_from_db ini parameter to set from config rather than default to False. This will allow CLI backfill to work from stored DAGs and also matches the read_dags_from_db behavior to match that of the other DagBag input parameters.


^ Add meaningful description above

Read the Pull Request Guidelines for more information.
In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in UPDATING.md.

Update dagbag.py read_dags_from_db __ini__ parameter to set from config rather than default to False.  This will allow CLI backfill to work from stored DAGs and also matches the read_dags_from_db behavior to match that of the other DagBag input parameters.
@boring-cyborg
Copy link

boring-cyborg bot commented Jan 6, 2021

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/master/CONTRIBUTING.rst)
Here are some useful points:

  • Pay attention to the quality of your code (flake8, pylint 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.
    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

include_smart_sensor: bool = conf.getboolean('smart_sensor', 'USE_SMART_SENSOR'),
safe_mode: bool = conf.getboolean('core', 'DAG_DISCOVERY_SAFE_MODE'),
read_dags_from_db: bool = False,
read_dags_from_db: bool = conf.getboolean('core', 'STORE_DAG_CODE'),
Copy link
Member

Choose a reason for hiding this comment

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

Hey John as mentioned on Slack, this won't be the correct fix,

read_dags_from_db decides if it should read the DAGs from DB (Serialized Dags from serialized_dag table). The conf.getboolean('core', 'STORE_DAG_CODE') config is only used in Webserver to show the Code (as plain strings) from the dag_code table.

@john-jac
Copy link
Contributor Author

john-jac commented Jan 7, 2021

Not the correct solution

@john-jac john-jac closed this Jan 7, 2021
@john-jac john-jac deleted the patch-1 branch January 7, 2021 05:47
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

Successfully merging this pull request may close these issues.

2 participants