vincbeck commented on code in PR #40334: URL: https://github.com/apache/airflow/pull/40334#discussion_r1663162703
########## airflow/jobs/scheduler_job_runner.py: ########## @@ -774,9 +774,12 @@ def _process_executor_events(self, session: Session) -> int: tags={"dag_id": ti.dag_id, "task_id": ti.task_id}, ) msg = ( - "Executor reports task instance %s finished (%s) although the " - "task says it's %s. (Info: %s) Was the task killed externally?" + "The executor reported that the task instance %s finished with state %s, but the task instance's state attribute is %s. " # noqa: RUF100, UP031, flynt + "Learn more: https://airflow.apache.org/docs/apache-airflow/stable/troubleshooting.html#task-state-changed-externally" + % (ti, state, ti.state) ) + if info is not None: + msg += " Extra info: %s" % info # noqa: RUF100, UP031, flynt self._task_context_logger.error(msg, ti, state, ti.state, info, ti=ti) Review Comment: This introduced a bug. You are formatting the text twice, one line 779, and then again in `self._task_context_logger.error`. Fix here: #40563 -- 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: commits-unsubscr...@airflow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org