jscheffl commented on code in PR #66735:
URL: https://github.com/apache/airflow/pull/66735#discussion_r3228981305


##########
task-sdk/src/airflow/sdk/execution_time/task_runner.py:
##########
@@ -1325,22 +1326,24 @@ def _on_term(signum, frame):
                 # Send update only if value changed (e.g., user set context 
variables during execution)
                 if ti.rendered_map_index and ti.rendered_map_index != 
previous_rendered_map_index:
                     
SUPERVISOR_COMMS.send(msg=SetRenderedMapIndex(rendered_map_index=ti.rendered_map_index))
-            finally:
-                log.info("::group::Post Execute")
 
         _push_xcom_if_needed(result, ti, log)
 
         msg, state = _handle_current_task_success(context, ti)
     except DownstreamTasksSkipped as skip:
+        log.info("::group::Post Execute")

Review Comment:
   Yeah, it is a 1-liner... unfortunately need to be in each catch-block 
individually. So I could replace it with a helper but then the helper would 
replace a 1-liner with a 1-liner. Or do you consider the Literal in the message 
that should be replaced by a constant? And proposal how to improve? Coding-wise 
I really preferred it like it was before but we need to scatter in start of the 
group in multiple places for the different branches of handling results :-(



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