houqp commented on a change in pull request #13712:
URL: https://github.com/apache/airflow/pull/13712#discussion_r559045866
##########
File path: tests/jobs/test_backfill_job.py
##########
@@ -683,6 +685,61 @@ def test_backfill_rerun_failed_tasks_without_flag(self):
with self.assertRaises(AirflowException):
job.run()
+ def test_backfill_retry_intermittent_failed_task(self):
+ dag = DAG(
+ dag_id='test_intermittent_failure_job',
+ start_date=DEFAULT_DATE,
+ schedule_interval="@daily",
+ default_args={
+ 'retries': 2,
+ 'retry_delay': datetime.timedelta(seconds=0),
+ },
+ )
+ task1 = DummyOperator(task_id="task1", dag=dag)
+ dag.clear()
+
+ executor = MockExecutor(parallelism=16)
+ executor.mock_task_results[
+ TaskInstanceKey(dag.dag_id, task1.task_id, DEFAULT_DATE,
try_number=1)
+ ] = State.UP_FOR_RETRY
+ executor.mock_task_results[
+ TaskInstanceKey(dag.dag_id, task1.task_id, DEFAULT_DATE,
try_number=2)
+ ] = State.UP_FOR_RETRY
Review comment:
If i understand your question correctly, setting it to failed will
result in backfill job to exit immediately without retry.
----------------------------------------------------------------
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:
[email protected]