This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 3c127881959 Add doc_md to branch and short-circuit examples (#66691)
3c127881959 is described below
commit 3c127881959f3136c818a824f8bc2a17c9e2e048
Author: Kyu Park <[email protected]>
AuthorDate: Tue May 12 00:26:54 2026 +0200
Add doc_md to branch and short-circuit examples (#66691)
Expose existing example DAG guidance in the Airflow UI Docs tab for weekday
branching and short-circuiting examples.
---
.../standard/example_dags/example_branch_day_of_week_operator.py | 6 +++++-
.../standard/example_dags/example_short_circuit_operator.py | 9 ++++++++-
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git
a/providers/standard/src/airflow/providers/standard/example_dags/example_branch_day_of_week_operator.py
b/providers/standard/src/airflow/providers/standard/example_dags/example_branch_day_of_week_operator.py
index 43400522468..6f2f642fe2c 100644
---
a/providers/standard/src/airflow/providers/standard/example_dags/example_branch_day_of_week_operator.py
+++
b/providers/standard/src/airflow/providers/standard/example_dags/example_branch_day_of_week_operator.py
@@ -16,7 +16,10 @@
# specific language governing permissions and limitations
# under the License.
"""
-Example DAG demonstrating the usage of BranchDayOfWeekOperator.
+### BranchDayOfWeekOperator
+
+This example demonstrates how to use the BranchDayOfWeekOperator to choose
downstream tasks based on the day
+of the week. It shows both a single-day branch and a weekend branch using the
WeekDay enum.
"""
from __future__ import annotations
@@ -34,6 +37,7 @@ with DAG(
catchup=False,
tags=["example"],
schedule="@daily",
+ doc_md=__doc__,
) as dag:
# [START howto_operator_day_of_week_branch]
empty_task_1 = EmptyOperator(task_id="branch_true")
diff --git
a/providers/standard/src/airflow/providers/standard/example_dags/example_short_circuit_operator.py
b/providers/standard/src/airflow/providers/standard/example_dags/example_short_circuit_operator.py
index 9d028f21be0..232c7109f34 100644
---
a/providers/standard/src/airflow/providers/standard/example_dags/example_short_circuit_operator.py
+++
b/providers/standard/src/airflow/providers/standard/example_dags/example_short_circuit_operator.py
@@ -15,7 +15,13 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-"""Example DAG demonstrating the usage of the ShortCircuitOperator."""
+"""
+### ShortCircuitOperator
+
+This example demonstrates how to use the ShortCircuitOperator to continue a
workflow only when a condition
+is truthy. It also shows how `ignore_downstream_trigger_rules=False` lets
later downstream tasks respect
+their trigger rules after the direct downstream tasks are skipped.
+"""
from __future__ import annotations
@@ -32,6 +38,7 @@ with DAG(
start_date=pendulum.datetime(2021, 1, 1, tz="UTC"),
catchup=False,
tags=["example"],
+ doc_md=__doc__,
) as dag:
# [START howto_operator_short_circuit]
cond_true = ShortCircuitOperator(