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/06/29 14:08:24 UTC

[GitHub] [airflow] bbovenzi opened a new pull request #16711: Add error message to dag dependency view

bbovenzi opened a new pull request #16711:
URL: https://github.com/apache/airflow/pull/16711


   Sometimes the node and edge data don't load. In that case we will show an error message to the user as opposed to just a blank screen.
   
   Short term fix for #16610
   
   <img width="1095" alt="Screen Shot 2021-06-29 at 10 04 16 AM" src="https://user-images.githubusercontent.com/4600967/123811966-55810400-d8b9-11eb-835d-73f0cc3a938d.png">
   
   
   <!--
   Thank you for contributing! Please make sure that your code changes
   are covered with tests. And in case of new features or big changes
   remember to adjust the documentation.
   
   Feel free to ping committers for the review!
   
   In case of existing issue, reference it using one of the following:
   
   closes: #ISSUE
   related: #ISSUE
   
   How to write a good git commit message:
   http://chris.beams.io/posts/git-commit/
   -->
   
   ---
   **^ Add meaningful description above**
   
   Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst#pull-request-guidelines)** for more information.
   In case of fundamental code change, Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvements+Proposals)) is needed.
   In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
   In case of backwards incompatible changes please leave a note in [UPDATING.md](https://github.com/apache/airflow/blob/main/UPDATING.md).
   


-- 
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 #16711: Add error message to dag dependency view

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



##########
File path: airflow/www/static/js/dag_dependencies.js
##########
@@ -37,6 +37,12 @@ const g = new dagreD3.graphlib.Graph()
   })
   .setDefaultEdgeLabel(() => ({ lineInterpolate: 'basis' }));
 
+// Sometimes the data doesn't load when the scheduler isn't running.
+if (!nodes.length) {
+  $('#error').show();
+  $('#error_msg').text('There was an issue loading dependencies. Make sure everything is up and running, then try again.');

Review comment:
       I'll update the copy to say make sure you have dags.




-- 
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 #16711: Add error message to dag dependency view

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


   This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions.


-- 
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] ashb commented on a change in pull request #16711: Add error message to dag dependency view

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



##########
File path: airflow/www/static/js/dag_dependencies.js
##########
@@ -37,6 +37,15 @@ const g = new dagreD3.graphlib.Graph()
   })
   .setDefaultEdgeLabel(() => ({ lineInterpolate: 'basis' }));
 
+// Sometimes the data doesn't load when the scheduler isn't running.
+if (!nodes.length) {
+  $('#error').show();
+  $('#error_msg').text(`
+    There was an issue loading dependencies.
+    Make sure you have dags loaded and that everything is running, then try again.

Review comment:
       I'm still not happy with this case when there are no DAGs -- i.e. a fresh install with out any dags, and with load_examples off -- in that case it shouldn't really show an error; it should just show nothing.




-- 
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 closed pull request #16711: Add error message to dag dependency view

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


   


-- 
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 #16711: Add error message to dag dependency view

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



##########
File path: airflow/www/static/js/dag_dependencies.js
##########
@@ -37,6 +37,15 @@ const g = new dagreD3.graphlib.Graph()
   })
   .setDefaultEdgeLabel(() => ({ lineInterpolate: 'basis' }));
 
+// Sometimes the data doesn't load when the scheduler isn't running.
+if (!nodes.length) {
+  $('#error').show();
+  $('#error_msg').text(`
+    There was an issue loading dependencies.
+    Make sure you have dags loaded and that everything is running, then try again.

Review comment:
       I agree. I was trying to keep it simple, but that didn't work out. I'll have it check if there are any dags before showing an error.




-- 
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 pull request #16711: Add error message to dag dependency view

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


   Closing this since this all should be handled in a better way.


-- 
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] ashb commented on a change in pull request #16711: Add error message to dag dependency view

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



##########
File path: airflow/www/static/js/dag_dependencies.js
##########
@@ -37,6 +37,12 @@ const g = new dagreD3.graphlib.Graph()
   })
   .setDefaultEdgeLabel(() => ({ lineInterpolate: 'basis' }));
 
+// Sometimes the data doesn't load when the scheduler isn't running.
+if (!nodes.length) {
+  $('#error').show();
+  $('#error_msg').text('There was an issue loading dependencies. Make sure everything is up and running, then try again.');

Review comment:
       Does this message show up if everything is running but there are just no dags?
   
   (I.e. if Load_examples is false but scheduler is up)




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