kaxil commented on code in PR #76882:
URL: https://github.com/apache/airflow/pull/76882#discussion_r4555911803


##########
providers/common/ai/src/airflow/providers/common/ai/durable/journal.py:
##########
@@ -871,6 +871,13 @@ def build_task_storage(context: Context) -> 
DurableStorageProtocol:
 
 _ACTIVE_JOURNAL: ContextVar[DurableJournal | None] = 
ContextVar("commonai_durable_journal", default=None)
 _EXECUTING_STEP: ContextVar[JournalStep | None] = 
ContextVar("commonai_durable_step", default=None)
+
+
+def executing_step() -> JournalStep | None:

Review Comment:
   After the fix nothing in this PR calls it anymore, so I dropped it here 
(8eae500733f). #76917 is the only user, so it now adds it there as 
`get_executing_step`.



##########
providers/common/ai/src/airflow/providers/common/ai/operators/agent.py:
##########
@@ -1098,12 +1295,22 @@ def execute(self, context: Context) -> Any:
         # A killed run raises RunCancelled (see run_agent_sync), which 
propagates to fail the
         # task. The journal cleanup in _complete_run is skipped on the raise, 
keeping it for the retry.
         try:
-            result, attempt_usage = self._run_and_report_on_failure(context, 
agent, run_usage, run_kwargs)
+            result, _ = self._run_and_report_on_failure(context, agent, 
run_usage, run_kwargs)

Review Comment:
   Yep, it returns just the result now (8eae500733f). Nothing further up the 
stack uses the usage either.



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