forked from apache/airflow
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch to single key for bundle config (apache#45318)
Switching bundle configuration to use a key for the bundle backends config.
- Loading branch information
Showing
6 changed files
with
175 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2676,30 +2676,38 @@ dag_bundles: | |
description: | | ||
Configuration for the DAG bundles. This allows Airflow to load DAGs from different sources. | ||
Airflow will consume all options added to this section. Below you will see only the default, | ||
``dags_folder``. The option name is the bundle name and the value is a json object with the following | ||
keys: | ||
* classpath: The classpath of the bundle class | ||
* kwargs: The keyword arguments to pass to the bundle class | ||
* refresh_interval: The interval in seconds to refresh the bundle from its source. | ||
options: | ||
backends: | ||
description: | | ||
List of backend configs. Must supply name, classpath, and kwargs for each backend. | ||
For example, to add a new bundle named ``hello`` to my Airflow instance, add the following to your | ||
airflow.cfg (this is just an example, the classpath and kwargs are not real): | ||
By default, ``refresh_interval`` is set to ``[scheduler] dag_dir_list_interval``, but that can | ||
also be overridden in kwargs if desired. | ||
.. code-block:: ini | ||
The default is the dags folder dag bundle. | ||
[dag_bundles] | ||
hello: {classpath: "airflow.some.classpath", kwargs: {"hello": "world"}, refresh_interval: 60} | ||
options: | ||
dags_folder: | ||
description: | | ||
This is the default DAG bundle that loads DAGs from the traditional ``[core] dags_folder``. | ||
By default, ``refresh_interval`` is set to ``[scheduler] dag_dir_list_interval``, but that can be | ||
overridden here if desired. | ||
Parsing DAGs from the DAG folder can be disabled by setting this option to an empty string. | ||
version_added: ~ | ||
Note: As shown below, you can split your json config over multiple lines by indenting. | ||
See configparser documentation for an example: | ||
https://docs.python.org/3/library/configparser.html#supported-ini-file-structure. | ||
version_added: 3.0.0 | ||
type: string | ||
example: ~ | ||
default: '{{"classpath": "airflow.dag_processing.bundles.dagfolder.DagsFolderDagBundle", | ||
"kwargs": {{}}}}' | ||
example: > | ||
[ | ||
{ | ||
"name": "my-git-repo", | ||
"classpath": "airflow.dag_processing.bundles.git.GitDagBundle", | ||
"kwargs": { | ||
"subdir": "dags", | ||
"repo_url": "[email protected]:example.com/my-dags.git", | ||
"tracking_ref": "main", | ||
"refresh_interval": 0 | ||
} | ||
] | ||
default: > | ||
[ | ||
{{ | ||
"name": "dags-folder", | ||
"classpath": "airflow.dag_processing.bundles.dagfolder.DagsFolderDagBundle", | ||
"kwargs": {{}} | ||
}} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.