amoghrajesh commented on code in PR #68012:
URL: https://github.com/apache/airflow/pull/68012#discussion_r4195334922
##########
task-sdk/src/airflow/sdk/execution_time/task_runner.py:
##########
@@ -679,6 +679,12 @@ def get_first_reschedule_date(self, context: Context) ->
AwareDatetime | None:
# If the task has not been rescheduled, there is no need to ask
the supervisor
return None
+ if from_server := self._ti_context_from_server:
+ # Servers older than the 2026-10-30 API version omit this, so fall
through to
+ # asking the supervisor below.
Review Comment:
No need to mention date I guess. If we do, better to mention versions
instead of date.
##########
task-sdk/tests/task_sdk/execution_time/schema/test_migrator.py:
##########
@@ -501,3 +502,75 @@ def
test_upgrade_fills_missing_retry_reason_with_none(self, real_migrator):
body = {"type": "TaskState", "state": "failed", "end_date": None,
"rendered_map_index": None}
out = real_migrator.upgrade(body, TaskState, "2026-06-16")
assert out["retry_reason"] is None
+
+
+class TestRealBundleFirstTaskRescheduleStartDate:
+ """
+ Drive the *real* supervisor bundle through the
``first_task_reschedule_start_date`` migration.
+
+ ``AddFirstTaskRescheduleStartDateToSupervisorTIRunContext`` is
``didnt_exist``-only, so the
+ downgrade re-validation is the only place it is visible: dropping it from
the bundle, or
+ registering it under the wrong version, leaves the field on the wire for a
pinned runtime.
+ """
+
+ FIRST_RESCHEDULE = datetime.datetime(2026, 1, 1,
tzinfo=datetime.timezone.utc)
+
+ @pytest.fixture
+ def startup_details(self):
+ import uuid
+
+ from airflow.sdk.api.datamodels._generated import (
+ BundleInfo,
+ DagRun,
+ DagRunState,
+ DagRunType,
+ TaskInstance,
+ TIRunContext,
+ )
+ from airflow.sdk.execution_time.comms import StartupDetails
Review Comment:
Can these be top level import pls?
##########
airflow-core/src/airflow/api_fastapi/execution_api/versions/__init__.py:
##########
@@ -73,6 +74,7 @@
AddMultiTeamToTIRunContext,
AddStoppedTaskReport,
IdentifyRetiredTaskStateUpdates,
+ AddFirstTaskRescheduleStartDateField,
Review Comment:
OK as cadwyn date.
--
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]