From eba1dab726a19007052ba562317d865b273cbd3d Mon Sep 17 00:00:00 2001 From: Ash Berlin-Taylor Date: Thu, 29 Oct 2020 10:02:12 +0000 Subject: [PATCH] Add missing space to log message in task completion logs Previously it looked like this INFO - Marking task as SUCCESS.dag_id=scenario1_case1_1_1, ... Now it looks like INFO - Marking task as SUCCESS. dag_id=scenario1_case1_1_1, ... --- airflow/models/taskinstance.py | 4 ++-- tests/cli/commands/test_task_command.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/airflow/models/taskinstance.py b/airflow/models/taskinstance.py index 8304fc661c7e..673160947a39 100644 --- a/airflow/models/taskinstance.py +++ b/airflow/models/taskinstance.py @@ -1087,7 +1087,7 @@ def _run_raw_task( self.refresh_from_db(lock_for_update=True) self.state = State.SKIPPED self.log.info( - 'Marking task as SKIPPED.' + 'Marking task as SKIPPED. ' 'dag_id=%s, task_id=%s, execution_date=%s, start_date=%s, end_date=%s', self.dag_id, self.task_id, @@ -1123,7 +1123,7 @@ def _run_raw_task( # Recording SUCCESS self.end_date = timezone.utcnow() self.log.info( - 'Marking task as SUCCESS.' + 'Marking task as SUCCESS. ' 'dag_id=%s, task_id=%s, execution_date=%s, start_date=%s, end_date=%s', self.dag_id, self.task_id, diff --git a/tests/cli/commands/test_task_command.py b/tests/cli/commands/test_task_command.py index ed301b2e8e09..94b8ac4e9680 100644 --- a/tests/cli/commands/test_task_command.py +++ b/tests/cli/commands/test_task_command.py @@ -318,7 +318,7 @@ def test_logging_with_run_task(self): self.assert_log_line("Log from TI Logger", logs_list) self.assert_log_line("Log from Print statement", logs_list, expect_from_logging_mixin=True) - self.assertIn(f"INFO - Marking task as SUCCESS.dag_id={self.dag_id}, " + self.assertIn(f"INFO - Marking task as SUCCESS. dag_id={self.dag_id}, " f"task_id={self.task_id}, execution_date=20170101T000000", logs) @mock.patch("airflow.task.task_runner.standard_task_runner.CAN_FORK", False) @@ -343,7 +343,7 @@ def test_logging_with_run_task_subprocess(self): self.assertIn(f"INFO - Running: ['airflow', 'tasks', 'run', '{self.dag_id}', " f"'{self.task_id}', '{self.execution_date_str}',", logs) - self.assertIn(f"INFO - Marking task as SUCCESS.dag_id={self.dag_id}, " + self.assertIn(f"INFO - Marking task as SUCCESS. dag_id={self.dag_id}, " f"task_id={self.task_id}, execution_date=20170101T000000", logs) def test_log_file_template_with_run_task(self):