-
Notifications
You must be signed in to change notification settings - Fork 187
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Render YML DAG config as DAG Docs (#305)
Until DAG Factory 0.20, even though the YAML is the source of truth for the DAG topology and the operators/tasks configuration, the YAML was not displayed in the Airflow UI. This can make it harder to troubleshoot and confirm that the behaviours are as expected or that the expected version was deployed. This PR solves this limitation by adding or appending the YAML file to the DAG `md_docs` field. The following image illustrates this feature being used via the Airflow UI: <img width="1678" alt="Screenshot 2024-12-02 at 11 06 15 PM" src="https://github.com/user-attachments/assets/4f9321f1-1b4b-405c-a438-15c0342e84bc"> Closes: #272
- Loading branch information
1 parent
e53b456
commit 9d2b8f5
Showing
4 changed files
with
114 additions
and
3 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
default: | ||
concurrency: 1 | ||
dagrun_timeout_sec: 600 | ||
default_args: | ||
end_date: 2018-03-05 | ||
owner: default_owner | ||
retries: 1 | ||
retry_delay_sec: 300 | ||
start_date: 2018-03-01 | ||
default_view: tree | ||
max_active_runs: 1 | ||
orientation: LR | ||
schedule_interval: 0 1 * * * | ||
|
||
example_dag2: | ||
schedule_interval: None | ||
tasks: | ||
task_1: | ||
bash_command: echo 1 | ||
operator: airflow.operators.bash_operator.BashOperator | ||
task_2: | ||
bash_command: echo 2 | ||
dependencies: | ||
- task_1 | ||
operator: airflow.operators.bash_operator.BashOperator | ||
task_3: | ||
bash_command: echo 3 | ||
dependencies: | ||
- task_1 | ||
operator: airflow.operators.bash_operator.BashOperator |
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