Fix default_args application in operator partial #50525
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
partialdoes 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 thuspartiallost its introspection logic, implemented using its own argument list in 2.x.Fix #50389.