From commits-return-87260-archive-asf-public=cust-asf.ponee.io@airflow.apache.org Tue Jan 7 00:58:57 2020 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id E89EF180636 for ; Tue, 7 Jan 2020 01:58:56 +0100 (CET) Received: (qmail 62483 invoked by uid 500); 7 Jan 2020 00:58:56 -0000 Mailing-List: contact commits-help@airflow.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@airflow.apache.org Delivered-To: mailing list commits@airflow.apache.org Received: (qmail 62474 invoked by uid 99); 7 Jan 2020 00:58:56 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Jan 2020 00:58:56 +0000 From: GitBox To: commits@airflow.apache.org Subject: [GitHub] [airflow] tooptoop4 commented on issue #6954: [AIRFLOW-4355] removed task should not lead to dagrun success Message-ID: <157835873608.32629.10667368442996149173.gitbox@gitbox.apache.org> References: In-Reply-To: Date: Tue, 07 Jan 2020 00:58:56 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit tooptoop4 commented on issue #6954: [AIRFLOW-4355] removed task should not lead to dagrun success URL: https://github.com/apache/airflow/pull/6954#issuecomment-571383906 > Can you add some tests? it is tough to reproduce the scenario. I tried below but it always says DAGRun is still 'running' rather than 'failed': ` def test_dagrun_remove_callback(self): def on_removed_callable(context): self.assertEqual( context['dag_run'].dag_id, 'test_dagrun_remove_callback' ) conf.set("scheduler", "REMOVED_TASKS_LEAD_TO_DAGRUN_FAILURE", "True") dag = DAG( dag_id='test_dagrun_remove_callback', start_date=datetime.datetime(2017, 1, 1), on_failure_callback=on_removed_callable, ) dag_task1 = DummyOperator( task_id='test_state_removed1', dag=dag) initial_task_states = { 'test_state_removed1': State.REMOVED } dag_run = self.create_dag_run(dag=dag, state=State.RUNNING, task_states=initial_task_states) # dag_run.verify_integrity() updated_dag_state = dag_run.update_state() self.assertEqual(State.FAILED, updated_dag_state)` ---------------------------------------------------------------- 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 With regards, Apache Git Services