Tree View Stopped Showing Colored Squares for one of my DAGs
Tree View stopped working for one of my DAGs. All I see in the Tree View are empty, uncolored squares. The job is itself running fine for the past 5 days, running every day. The Graph View, the Landing Times, Gantt, and Task Durations all show trends for the past 5 days. Unfortunately, the tree view shows uncolored squares. All of the squares are blank.
I'm running v 1.2 installed via PIP. I should mention that other dags are fine.
Also, my dag is using the new branch operator in 2 places and has about 10 nodes now in it. I don't expect this to be the reason for the Tree View to stop showing data.
Quick thought, did you change your start_date for something that isn't "square" at any point in time? By square I mean 00:00 for a daily job.
Hmn... I see the start_date is set to datetime.now() .... Hmn...
default_args = {
'owner': 'airflow',
'depends_on_past': False,
'start_date': datetime(2015, 7, 8),
'email': ['[email protected]'],
'email_on_failure': True,
'email_on_retry': True,
'retries': 3,
'retry_interval': timedelta(seconds=5)
}
dag = DAG('ep_demo', start_date=datetime.now(), default_args=default_args)
Ok, so I'll change the datetime.now() to be rounded to 00:00. I haven't changed this part of the code in a long time, so I am guessing the handling of this changed in the past month or so with respect to the tree view.
@mistercrunch : Is the best way to have have a daily job trigger at a certain time then to use a start_date with 00:00 time, schedule_interval=timedelta(days=1) and make all task in a dag depend on an airflow.operators.TimeSensor? How is the use of sensors affected by the "parallelism" limit of the executor? Can you risk the execution queue being blocked by sensors just waiting for events?
@storpipfugl: yes, and the docs should be more explicit about this
Sensors do take up a slot in your executor while they are running (sensing). You need to make sure you have plenty of slots available to support the max number of tasks that could ever run at the same time.
Sensors are typically cheap in terms of CPU / memory, so you can take that into account when factoring how many slots each worker should have.
Confirmed this resolved my issue. Closing.
Sorry to hijack an already closed issue, but how would you go about doing this for an hourly job?
Unless TimeSensor can sense for dynamic times (x:10 every hour), how would you cause Airflow to sense that 5 minutes have passed?
I think we need a TimeDeltaSensor that senses for a delta after execution_date. It should be very easy to write. Let me give it a shot.
It's in: https://github.com/airbnb/airflow/pull/237
Thank you. It works like a charm.
Slight changes to the operator: https://github.com/airbnb/airflow/pull/239