Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing the default base date of the Tree View #455

Merged
merged 2 commits into from
Sep 24, 2015

Conversation

kerzhner
Copy link

This PR intends to solve the following pain points:

  1. We have a daily DAG with a non-midnight start date. When we click on the Tree View icon on http://myairflowinstance.com/admin/, rightmost DAG instance in the Tree View is not the latest instance of the DAG. It is the second to latest instance.
  2. For other DAGs with midnight start dates, the Tree View rightmost DAG instance is often a fully finished DAG instance. It is nice to see at least one column of an un-started DAG instance. This makes it clear what the next DAG instance is and when it will run.

In other words, we currently see this:
screen shot 2015-09-23 at 2 22 51 pm
But this is clearer:
screen shot 2015-09-23 at 2 30 51 pm

@@ -1055,7 +1055,7 @@ def tree(self):
num_runs = int(num_runs) if num_runs else 25

if not base_date:
base_date = dag.latest_execution_date or datetime.now()
base_date = (dag.latest_execution_date + 2 * dag.schedule_interval) or datetime.now()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the case of a new DAG dag.latest_execution_date will be None and this will raise an error, you'll need an if here...

@kerzhner
Copy link
Author

@mistercrunch Good catch. Fixed in kerzhner@8f64275.

mistercrunch added a commit that referenced this pull request Sep 24, 2015
Changing the default base date of the Tree View
@mistercrunch mistercrunch merged commit 678987e into apache:master Sep 24, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants