You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/07/22 10:59:47 UTC
[GitHub] [airflow] kaxil commented on a change in pull request #9929: Use consistent message in SchedulerJob._process_executor_events
kaxil commented on a change in pull request #9929:
URL: https://github.com/apache/airflow/pull/9929#discussion_r458709645
##########
File path: airflow/jobs/scheduler_job.py
##########
@@ -1555,17 +1555,14 @@ def _process_executor_events(self, simple_dag_bag: SimpleDagBag, session: Sessio
# TODO: should we fail RUNNING as well, as we do in Backfills?
if ti.try_number == buffer_key.try_number and ti.state == State.QUEUED:
Stats.incr('scheduler.tasks.killed_externally')
- self.log.error(
- "Executor reports task instance %s finished (%s) although the task says its %s. "
- "(Info: %s) Was the task killed externally?",
- ti, state, ti.state, info
- )
+ msg = f"Executor reports task instance {ti} finished ({state}) although the " \
Review comment:
Using f-string in logs to pasd parameters is generally not a good practice since Log formatters can change the parameters passed to a LogRecord
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org