I'm getting the same error for a couple DAGs running on the latest master branch: "AttributeError: 'NoneType' object has no attribute 'latest_execution_date'"
Also I'll confirm the same issue with the DAGs fileloc being incorrect in the RDS table 'dag' for the _server_ config. I emphasize the _server_ since we have a DAG merge blocking jenkins build test configured differently from the server, and the fileloc is correct for the jenkins build, but not for the server environment. We also do most airflow development locally, in yet another config (airflow in a virtualenv with the dags directory as a subfolder), but I haven't seen RDS references to files in the local configuration path. Note that in addition to the above noted error, other anomalous airflow behavior related to this misconfiguration includes at least: * Persistent "Broken DAG" messages on the DAGs page * The scheduler does not issue runs for these DAGs, even when they're enabled/not paused. After correcting the fileloc entries in the 'dag' table, the UI a-bomb's have gone away, but the "Broken DAG" messages return even after closing them then refreshing the UI. On 2017/07/19 11:56:34, Zsolt Tóth <[email protected]> wrote: > Follow-up: I found that this issue happens when the DAG file uses a common > utility method to create the Dag object, by passing some parameters to it. > By looking into the airflow DB, the fileloc column contains the path to the > utility file (e.g. $DAG_FOLDER/utils/dagfactory.py) instead of the path of > the dag itself (which would be $DAG_FOLDER/mydag.py). In 1.7.x, the > location is correct. I suspect that this may be related to the issue. > Any ideas on this? > > 2017-07-18 18:25 GMT+02:00 Zsolt Tóth <[email protected]>: > > > Hi, > > > > I'm using Airflow 1.8.1, but also tried with 1.8.0 and 1.8.2-rc1, with > > LocalExecutor, on a single node. When I click Refresh on the UI (either in > > the Dag's page, or in the main DAG list), there is a good chance that > > airflow somehow does not find the DAG anymore and displays the stacktrace > > with the usual error message, when it can't find a dag: > > > > AttributeError: 'NoneType' object has no attribute 'latest_execution_date' > > > > After some time (usually ~15s) if I refresh the browser, the DAG is found > > and everything is back to normal. > > Checked the webserver and scheduler logs, but couldn't find anything else > > than the stacktrace that's displayed on the UI. > > This happens frequently, usually 6-7 out of 10 refreshes. Any idea what > > goes wrong here? The permissions should be fine, and the postgres DB seems > > to contain all the dags. > > > > > > Thanks, > > Zsolt > > >
