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 2021/07/08 06:27:00 UTC

[GitHub] [airflow] ephraimbuddy commented on a change in pull request #16768: Fix bug that log can't be shown when task runs failed

ephraimbuddy commented on a change in pull request #16768:
URL: https://github.com/apache/airflow/pull/16768#discussion_r665904177



##########
File path: tests/dag_processing/test_processor.py
##########
@@ -643,6 +643,30 @@ def test_execute_on_failure_callbacks(self, mock_ti_handle_failure):
                 test_mode=conf.getboolean('core', 'unit_test_mode'),
             )
 
+    def test_failure_callbacks_should_not_drop_hostname(self):
+        dagbag = DagBag(dag_folder="/dev/null", include_examples=True, read_dags_from_db=False)
+        dag_file_processor = DagFileProcessor(dag_ids=[], log=mock.MagicMock())
+        dag_file_processor.UNIT_TEST_MODE = False
+
+        with create_session() as session:
+            session.query(TaskInstance).delete()

Review comment:
       ```suggestion
   ```
   We have `clear_db_runs` in the setup method which clears TaskInstance as well, so we don't need this




-- 
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-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org