Skip to content

Conversation

@uranusjr
Copy link
Member

@uranusjr uranusjr commented May 13, 2025

partial does not apply most dag- and task-group-level default arguments; only those needed by the scheduler (it doesn’t know exactly, so all BaseOperator args are loaded in to be safe).

Most other default arguments, meaningful only when the task is run, are only applied when the task is unmapped. This is done in BaseOperatorMeta, logic shared with regular tasks.

This is only a problem in 3.0 because the task sdk rewrote partial’s argument signature; now most arguments are just passed in **kwargs, and thus partial lost its introspection logic, implemented using its own argument list in 2.x.

Fix #50389.

@eladkal eladkal added this to the Airflow 3.0.2 milestone May 13, 2025
@eladkal eladkal added type:bug-fix Changelog: Bug Fixes backport-to-v3-1-test Mark PR with this label to backport to v3-1-test branch labels May 13, 2025
@uranusjr uranusjr merged commit 7d6a18a into apache:main May 14, 2025
69 checks passed
@uranusjr uranusjr deleted the partial-default-args branch May 14, 2025 08:56
github-actions bot pushed a commit that referenced this pull request May 14, 2025
(cherry picked from commit 7d6a18a)

Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
@github-actions
Copy link

Backport successfully created: v3-0-test

Status Branch Result
v3-0-test PR Link

github-actions bot pushed a commit to aws-mwaa/upstream-to-airflow that referenced this pull request May 14, 2025
…50525)

(cherry picked from commit 7d6a18a)

Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
uranusjr added a commit that referenced this pull request May 14, 2025
kaxil pushed a commit that referenced this pull request Jun 3, 2025
sanederchik pushed a commit to sanederchik/airflow that referenced this pull request Jun 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:task-sdk backport-to-v3-1-test Mark PR with this label to backport to v3-1-test branch type:bug-fix Changelog: Bug Fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

default_args causes .partial() to fail with TypeError during dynamic task mapping

3 participants