Sync RuntimeTaskInstanceProtocol with RuntimeTaskInstance#67216
Merged
Conversation
Align the public protocol with what the runtime implementation actually exposes: - Fix get_first_reschedule_date signature -- protocol declared (first_try_number) but the impl and the only caller (sdk/bases/sensor.py) take a Context. - Broaden xcom_pull task_ids to str | Iterable[str] | None to match impl. - Add public surface that was on RuntimeTaskInstance but missing from the protocol: log_url, mark_success_url, render_templates, plus is_mapped and rendered_map_index fields.
amoghrajesh
approved these changes
May 20, 2026
Contributor
|
We should try and come up with a prek hook for this imo. Fine for now. |
1 task
Contributor
|
Trying to auto fix this for future cases: #67223 |
Lee-W
approved these changes
May 20, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
RuntimeTaskInstanceProtocol(task-sdk/src/airflow/sdk/types.py) had drifted fromRuntimeTaskInstance(task-sdk/src/airflow/sdk/execution_time/task_runner.py). This PR realigns the public protocol with what the runtime implementation actually exposes.What changed
get_first_reschedule_datesignature. The protocol declared(self, first_try_number)but both the implementation and the only caller (sdk/bases/sensor.py:188) take aContext. Anyone type-checking against the protocol would have been told the wrong shape.xcom_pull.task_idstostr | Iterable[str] | Noneto match the implementation (wasstr | list[str] | None).RuntimeTaskInstancebut absent from the protocol:log_urlandmark_success_urlproperties (referenced externally, e.g. openlineage viagetattr(ti, "log_url", None)).render_templates(context, jinja_env)method.is_mappedandrendered_map_indexfields.