potiuk commented on code in PR #69482:
URL: https://github.com/apache/airflow/pull/69482#discussion_r3682351972


##########
task-sdk/tests/task_sdk/execution_time/test_supervisor.py:
##########
@@ -3378,7 +3378,7 @@ def execute(self, context: Context):
         )
 
         # Patch the API client used by InProcessTestSupervisor to return a 
predictable TI context
-        fake_task_instances = mock.MagicMock(spec_set=["start", "finish"])
+        fake_task_instances = mock.MagicMock(spec_set=["start", 
"set_terminal_state"])

Review Comment:
   Worth grepping for any *other* `spec_set` list that still names `"finish"` — 
on current `main` there's one at roughly line 3612 as well as the one you've 
updated here.
   
   A stale `spec_set` is the failure mode a rename doesn't surface cleanly: the 
mock keeps allowing `.finish` while forbidding `.set_terminal_state`, so a test 
either errors for a confusing reason or silently keeps asserting against a 
method that no longer exists. CI being green suggests you've got them all, but 
a quick `grep -rn 'spec_set.*finish' task-sdk/` is cheap insurance.
   
   ---
   Drafted-by: Claude Code (Opus 5); reviewed by @potiuk before posting



-- 
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]

Reply via email to