You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/11/19 11:27:20 UTC

[GitHub] [airflow] BasPH opened a new pull request #19705: Add DAG run details page

BasPH opened a new pull request #19705:
URL: https://github.com/apache/airflow/pull/19705


   This PR adds a DAG run details page showing information about one single DAG run.
   
   I have a couple of DAGs where every run is triggered with parameters and found it difficult to trace which parameters were used to trigger a DAG in the Airflow UI. The current flow is:
   
   1. Hover over DAG run in tree view
   2. Memorize a property to identify specific DAG run, usually the run id (memorize because toolbox disappears when cursor leaves the DAG run circle)
   3. Go to Browse -> DAG runs
   4. Filter using property from step 2
   
   This PR adds a new button to the modal clicking on a DAG run bar in the tree view:
   ![image](https://user-images.githubusercontent.com/6249654/142614378-e0702ad7-5e87-40ed-86e9-93e93724e056.png)
   
   That brings you to the DAG run details page:
   ![image](https://user-images.githubusercontent.com/6249654/142614767-3116bfb4-c9fd-4cac-8b3f-666bbfdf6169.png)
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] bbovenzi commented on a change in pull request #19705: Add DAG run details page

Posted by GitBox <gi...@apache.org>.
bbovenzi commented on a change in pull request #19705:
URL: https://github.com/apache/airflow/pull/19705#discussion_r753145168



##########
File path: airflow/www/templates/airflow/dagrun_details.html
##########
@@ -0,0 +1,44 @@
+{#
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+#}
+
+{% extends "airflow/dag.html" %}
+{% block page_title %}{{ dag_id }} - {{ run_id }} - DAG Run details - {{ appbuilder.app_name }}{% endblock %}
+
+{% block content %}
+  {{ super() }}
+  <hr>
+  <br>
+  <h4>
+    <span class="text-muted">DAG Run details:</span> <span>{{ dag_id }}</span>
+    <span class="text-muted">run id</span> <span>{{ run_id }}</span>
+    <span class="text-muted">at</span> <time datetime="{{ execution_date }}">{{ execution_date }}</time>
+  </h4>
+  <table class="table table-striped table-bordered">
+    <tr>
+      <th>Attribute</th>
+      <th>Value</th>
+    </tr>
+    {% for attribute, value in dagrun_attributes %}
+      <tr>
+        <td class="text-nowrap">{{ attribute }}</td>
+        <td>{{ value }}</td>

Review comment:
       Can you confirm that the dates here update when you change the app's timezone?




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] Acehaidrey commented on pull request #19705: Add DAG run details page

Posted by GitBox <gi...@apache.org>.
Acehaidrey commented on pull request #19705:
URL: https://github.com/apache/airflow/pull/19705#issuecomment-983942586


   Question about this -
   Will there be a simple way for the user to see the list of dagruns and their runtime / duration / state information. To me here, it still feels like we will need to click around to be able to see this and change from view to view. 
   Just want to know since there were two PRs today (one being from me) regarding this issue.
   
   Thanks!


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] BasPH commented on a change in pull request #19705: Add DAG run details page

Posted by GitBox <gi...@apache.org>.
BasPH commented on a change in pull request #19705:
URL: https://github.com/apache/airflow/pull/19705#discussion_r753324452



##########
File path: airflow/www/templates/airflow/dagrun_details.html
##########
@@ -0,0 +1,44 @@
+{#
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+#}
+
+{% extends "airflow/dag.html" %}
+{% block page_title %}{{ dag_id }} - {{ run_id }} - DAG Run details - {{ appbuilder.app_name }}{% endblock %}
+
+{% block content %}
+  {{ super() }}
+  <hr>
+  <br>
+  <h4>
+    <span class="text-muted">DAG Run details:</span> <span>{{ dag_id }}</span>
+    <span class="text-muted">run id</span> <span>{{ run_id }}</span>
+    <span class="text-muted">at</span> <time datetime="{{ execution_date }}">{{ execution_date }}</time>
+  </h4>
+  <table class="table table-striped table-bordered">
+    <tr>
+      <th>Attribute</th>
+      <th>Value</th>
+    </tr>
+    {% for attribute, value in dagrun_attributes %}
+      <tr>
+        <td class="text-nowrap">{{ attribute }}</td>
+        <td>{{ value }}</td>

Review comment:
       Done. By default, the milliseconds are not displayed so it now looks like:
   ![image](https://user-images.githubusercontent.com/6249654/142653530-0af8b0ec-fc8b-4c64-bd6f-8bedd0ceab85.png)
   




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] bbovenzi commented on a change in pull request #19705: Add DAG run details page

Posted by GitBox <gi...@apache.org>.
bbovenzi commented on a change in pull request #19705:
URL: https://github.com/apache/airflow/pull/19705#discussion_r753164783



##########
File path: airflow/www/templates/airflow/dagrun_details.html
##########
@@ -0,0 +1,44 @@
+{#
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+#}
+
+{% extends "airflow/dag.html" %}
+{% block page_title %}{{ dag_id }} - {{ run_id }} - DAG Run details - {{ appbuilder.app_name }}{% endblock %}
+
+{% block content %}
+  {{ super() }}
+  <hr>
+  <br>
+  <h4>
+    <span class="text-muted">DAG Run details:</span> <span>{{ dag_id }}</span>
+    <span class="text-muted">run id</span> <span>{{ run_id }}</span>
+    <span class="text-muted">at</span> <time datetime="{{ execution_date }}">{{ execution_date }}</time>
+  </h4>
+  <table class="table table-striped table-bordered">
+    <tr>
+      <th>Attribute</th>
+      <th>Value</th>
+    </tr>
+    {% for attribute, value in dagrun_attributes %}
+      <tr>
+        <td class="text-nowrap">{{ attribute }}</td>
+        <td>{{ value }}</td>

Review comment:
       Yes, I believe we'd want all of them to update. I think we have another spot where we check if an attribute value is a date and wrap it in a `<timezone>`




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] github-actions[bot] commented on pull request #19705: Add DAG run details page

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #19705:
URL: https://github.com/apache/airflow/pull/19705#issuecomment-974122338


   The PR is likely OK to be merged with just subset of tests for default Python and Database versions without running the full matrix of tests, because it does not modify the core of Airflow. If the committers decide that the full tests matrix is needed, they will add the label 'full tests needed'. Then you should rebase to the latest main or amend the last commit of the PR, and push it with --force-with-lease.


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] bbovenzi merged pull request #19705: Add DAG run details page

Posted by GitBox <gi...@apache.org>.
bbovenzi merged pull request #19705:
URL: https://github.com/apache/airflow/pull/19705


   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] BasPH commented on a change in pull request #19705: Add DAG run details page

Posted by GitBox <gi...@apache.org>.
BasPH commented on a change in pull request #19705:
URL: https://github.com/apache/airflow/pull/19705#discussion_r753160508



##########
File path: airflow/www/templates/airflow/dagrun_details.html
##########
@@ -0,0 +1,44 @@
+{#
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+#}
+
+{% extends "airflow/dag.html" %}
+{% block page_title %}{{ dag_id }} - {{ run_id }} - DAG Run details - {{ appbuilder.app_name }}{% endblock %}
+
+{% block content %}
+  {{ super() }}
+  <hr>
+  <br>
+  <h4>
+    <span class="text-muted">DAG Run details:</span> <span>{{ dag_id }}</span>
+    <span class="text-muted">run id</span> <span>{{ run_id }}</span>
+    <span class="text-muted">at</span> <time datetime="{{ execution_date }}">{{ execution_date }}</time>
+  </h4>
+  <table class="table table-striped table-bordered">
+    <tr>
+      <th>Attribute</th>
+      <th>Value</th>
+    </tr>
+    {% for attribute, value in dagrun_attributes %}
+      <tr>
+        <td class="text-nowrap">{{ attribute }}</td>
+        <td>{{ value }}</td>

Review comment:
       Currently only this date updates:
   ![image](https://user-images.githubusercontent.com/6249654/142624260-ee8022c4-af63-42d7-8e29-817c6d2d83e0.png)
   
   The other dates include timezone offsets, shall I make them all update when changing the timezone?




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] BasPH commented on pull request #19705: Add DAG run details page

Posted by GitBox <gi...@apache.org>.
BasPH commented on pull request #19705:
URL: https://github.com/apache/airflow/pull/19705#issuecomment-983955135


   It sounds like you're looking for an overview of multiple DAG runs. I'd say the DAG runs list (Browse -> DAG Runs) and/or the new tree view in Airflow 2.3 should provide that information. Anything in specific that you're currently missing? The view added in this PR is meant for showing details of one single DAG run (my main reason for adding it was to inspect the DAG run conf).


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] Acehaidrey commented on pull request #19705: Add DAG run details page

Posted by GitBox <gi...@apache.org>.
Acehaidrey commented on pull request #19705:
URL: https://github.com/apache/airflow/pull/19705#issuecomment-984105781


   Ah sorry @BasPH think I got confused when linked here. Yeah essentially the case is that for many users in our experience, asking them to navigate to the dag run list and fill in the filters is too much work. They want at the same view as the graph/tree/code/etc. to have a view to see the dag runs to quickly at a glance figure out outliers, and other information. Internally we have provided this and originally was told this was desired by greater community, but I think there are some reservations now, so want to know is there any plan to provide a quick view of this with some of the ongoing work or is it still going to be recommended to go to this other view to do the search for it. 
   It's in regards to this: https://github.com/apache/airflow/pull/19921 


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org