amoghrajesh commented on code in PR #68213:
URL: https://github.com/apache/airflow/pull/68213#discussion_r3372959807


##########
task-sdk/src/airflow/sdk/bases/resumablejobmixin.py:
##########
@@ -101,29 +107,56 @@ def execute_resumable(self, context: Context) -> Any:
         Closing this window would require atomic "submit + persist", which is 
not possible across
         an external system boundary.
         """
-        task_store = context.get("task_store")
+        operator_tag = {"operator": type(self).__name__}
+
+        with tracer.start_as_current_span("resumable_job.resume_decision") as 
span:

Review Comment:
   The task runner already has a `flush_spans()` context manager wrapping 
`main()` that calls `provider.force_flush()` on clean exit, so normal exits are 
fine. The missing parent is from a hard crash (SIGKILL/OOM) where 
`flush_spans()` never runs and nothing can be done there, spans in the buffer 
are gone.
   
   The one gap is SIGTERM: the `_on_term` handler calls `on_kill()` but does 
not flush spans before the process exits. Adding a `force_flush()` call there 
would recover that case. That feels like a separate task runner improvement 
though and is out of scope here. Happy to open a follow-up if you agree.



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