Uploaded image for project: 'Apache Airflow'
  1. Apache Airflow
  2. AIRFLOW-4297

Manually triggerd DAG with no schedule_interval breaks scheduler

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Resolved
    • 1.10.3
    • 1.10.4
    • None
    • None

    Description

      example_dag.py
      timezone = "UTC"
      
      local_tz = pendulum.timezone(timezone)
      start_date = datetime.datetime.strptime('2019-03-28 07:57:00', "%Y-%m-%d %H:%M:%S")
      start_date = start_date.replace(tzinfo=local_tz)
      
      default_args = {
      'owner': 'DaniRC'
      }
      
      dag = DAG('testsla',
          default_args=default_args,
          start_date=start_date,
          concurrency=1,
          max_active_runs=1,
          default_view='tree',
          orientation='TB',
          catchup=False,
          schedule_interval=None
          )
      

      If this DAG is triggered, then this error occurs:

      Process DagFileProcessor5303-Process:
      Traceback (most recent call last):
        File "/usr/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
          self.run()
        File "/usr/lib/python3.6/multiprocessing/process.py", line 93, in run
          self._target(*self._args, **self._kwargs)
        File "/usr/lib/python3.6/site-packages/airflow/jobs.py", line 402, in helper
          pickle_dags)
        File "/usr/lib/python3.6/site-packages/airflow/utils/db.py", line 73, in wrapper
          return func(*args, **kwargs)
        File "/usr/lib/python3.6/site-packages/airflow/jobs.py", line 1760, in process_file
          self._process_dags(dagbag, dags, ti_keys_to_schedule)
        File "/usr/lib/python3.6/site-packages/airflow/jobs.py", line 1452, in _process_dags
          self.manage_slas(dag)
        File "/usr/lib/python3.6/site-packages/airflow/utils/db.py", line 73, in wrapper
          return func(*args, **kwargs)
        File "/usr/lib/python3.6/site-packages/airflow/jobs.py", line 662, in manage_slas
          while dttm < timezone.utcnow():
      TypeError: '<' not supported between instances of 'NoneType' and 'datetime.datetime'
      

      After this happens the scheduler also won't schedule any further tasks for ANY dag.

      Attachments

        Issue Links

          Activity

            People

              xddeng Xiaodong Deng
              ash Ash Berlin-Taylor
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: