Copilot commented on code in PR #68008:
URL: https://github.com/apache/airflow/pull/68008#discussion_r3612825027
##########
airflow-core/src/airflow/jobs/scheduler_job_runner.py:
##########
@@ -187,6 +187,26 @@ def _eager_load_dag_run_for_validation() ->
tuple[LoaderOption, LoaderOption]:
)
+def _resolve_ti_callback_bundle_info(ti: TaskInstance) -> tuple[str, str |
None, Any]:
+ """
+ Resolve the bundle name/version/version-data needed to build a
TaskCallbackRequest or EmailRequest.
+
+ Shared by the executor-reported "task finished but TI still looked queued"
path and the
+ heartbeat-timeout purge path, both of which need identical bundle-pinning
semantics: fall back
+ to ``dag_model`` for legacy tasks with no ``dag_version`` (pre-AIP-66
migrations), and leave the
+ bundle version unpinned when the dag run itself wasn't pinned
(``disable_bundle_versioning``),
+ so the callback runs against the same code as the task did.
+ """
Review Comment:
The docstring says this helper is shared by both the executor-reported path
and the heartbeat-timeout purge path, but in this PR it’s only used in the
heartbeat-timeout purge path (the executor path still inlines its own bundle
resolution). This makes the doc misleading for future readers.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]