Skip to content

Updated tutorial DAGs to use named parameters - #71980

Open
MukundKulkarni wants to merge 5 commits into
apache:mainfrom
MukundKulkarni:main
Open

Updated tutorial DAGs to use named parameters#71980
MukundKulkarni wants to merge 5 commits into
apache:mainfrom
MukundKulkarni:main

Conversation

@MukundKulkarni

Copy link
Copy Markdown
Contributor

What

Some example DAGs teach an outdated coding style

Why

New users copy these examples to learn Airflow, but 5 of them use the old def f(**kwargs): kwargs["ti"] style instead of the modern def f(ti=None): style shown elsewhere — inconsistent and confusing for beginners.

Tests

All five converted to named parameters, **kwargs dropped where nothing else needs it, DAGs behave identically.

example_branch_dop_operator_v3 tutorial_objectstore tutorial_dag params_ui_tutorial params_trigger_ui

@amoghrajesh
amoghrajesh self-requested a review August 22, 2026 16:53

@amoghrajesh amoghrajesh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM


@task.branch()
def should_run(**kwargs) -> str:
def should_run(logical_date=None) -> str:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good.

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