ashb commented on code in PR #60108:
URL: https://github.com/apache/airflow/pull/60108#discussion_r2980988929


##########
airflow-core/src/airflow/api_fastapi/execution_api/routes/task_instances.py:
##########
@@ -281,14 +286,18 @@ def ti_run(
         if ti.next_method:
             context.next_method = ti.next_method
             context.next_kwargs = ti.next_kwargs
-
-        return context
     except SQLAlchemyError:
         log.exception("Error marking Task Instance state as running")
         raise HTTPException(
             status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, 
detail="Database error occurred"
         )
 
+    generator: JWTGenerator = services.get(JWTGenerator)
+    execution_token = generator.generate(extras={"sub": str(task_instance_id)})
+    response.headers["X-Execution-Token"] = execution_token

Review Comment:
   I don't think it can ever fali really. 



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