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 2020/04/15 21:47:32 UTC

[GitHub] [airflow] nadflinn opened a new issue #8388: Task instance details page blows up when no dagrun

nadflinn opened a new issue #8388: Task instance details page blows up when no dagrun
URL: https://github.com/apache/airflow/issues/8388
 
 
   <!--
   
   Welcome to Apache Airflow!  For a smooth issue process, try to answer the following questions.
   Don't worry if they're not all applicable; just try to include what you can :-)
   
   If you need to include code snippets or logs, please put them in fenced code
   blocks.  If they're super-long, please use the details tag like
   <details><summary>super-long log</summary> lots of stuff </details>
   
   Please delete these comment blocks before submitting the issue.
   
   -->
   
   <!--
   
   IMPORTANT!!!
   
   Please complete the next sections or the issue will be closed.
   This questions are the first thing we need to know to understand the context.
   
   -->
   
   **Apache Airflow version**:
   1.10.9 although I think it would apply to 1.10.10, 1.10.8, 1.10.7, and 1.10.6
   
   **Kubernetes version (if you are using kubernetes)** (use `kubectl version`):
   
   **Environment**:
   
   - **Cloud provider or hardware configuration**: aws
   - **OS** (e.g. from /etc/os-release):  Ubuntu 18.04.3 LTS
   - **Kernel** (e.g. `uname -a`): `Linux 567ff872fc2d 3.13.0-170-generic #220-Ubuntu SMP Thu May 9 12:40:49 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux`
   - **Install tools**:
   - **Others**:
   
   **What happened**:
   If you have a DAG that has not been turned on before and you click on that DAG in the admin page and then in the DAG graph click on one of the tasks and then click on `Task Instance Details` you get the "Ooops" explosion error page.   The error is:
   ```
   Traceback (most recent call last):
     File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 2447, in wsgi_app
       response = self.full_dispatch_request()
     File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1952, in full_dispatch_request
       rv = self.handle_user_exception(e)
     File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1821, in handle_user_exception
       reraise(exc_type, exc_value, tb)
     File "/usr/local/lib/python3.7/dist-packages/flask/_compat.py", line 39, in reraise
       raise value
     File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1950, in full_dispatch_request
       rv = self.dispatch_request()
     File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1936, in dispatch_request
       return self.view_functions[rule.endpoint](**req.view_args)
     File "/usr/local/lib/python3.7/dist-packages/flask_admin/base.py", line 69, in inner
       return self._run_view(f, *args, **kwargs)
     File "/usr/local/lib/python3.7/dist-packages/flask_admin/base.py", line 368, in _run_view
       return fn(self, *args, **kwargs)
     File "/usr/local/lib/python3.7/dist-packages/flask_login/utils.py", line 258, in decorated_view
       return func(*args, **kwargs)
     File "/usr/local/lib/python3.7/dist-packages/airflow/www/utils.py", line 290, in wrapper
       return f(*args, **kwargs)
     File "/usr/local/lib/python3.7/dist-packages/airflow/www/views.py", line 1041, in task
       dep_context=dep_context)]
     File "/usr/local/lib/python3.7/dist-packages/airflow/www/views.py", line 1039, in <listcomp>
       failed_dep_reasons = [(dep.dep_name, dep.reason) for dep in
     File "/usr/local/lib/python3.7/dist-packages/airflow/models/taskinstance.py", line 668, in get_failed_dep_statuses
       dep_context):
     File "/usr/local/lib/python3.7/dist-packages/airflow/ti_deps/deps/base_ti_dep.py", line 106, in get_dep_statuses
       for dep_status in self._get_dep_statuses(ti, session, dep_context):
     File "/usr/local/lib/python3.7/dist-packages/airflow/ti_deps/deps/dagrun_id_dep.py", line 51, in _get_dep_statuses
       if not dagrun.run_id or not match(BackfillJob.ID_PREFIX + '.*', dagrun.run_id):
   AttributeError: 'NoneType' object has no attribute 'run_id'
   ```
   
   
   **What you expected to happen**:
   No error page.  It should have loaded the standard task instance details page. 
   
   I believe the reason that this is happening is because there is no check to see if a dagrun exists in `DagrunIdDep`:
   https://github.com/apache/airflow/blob/master/airflow/ti_deps/deps/dagrun_id_dep.py#L50
   
   This is a bit of an edge case because there isn't really any reason someone should be checking out task instance details for a DAG that has never been run.  That said we should probably avoid the error page.
   
   <!-- What do you think went wrong? -->
   
   **How to reproduce it**:
   If you have a DAG that has not been turned on before and you click on that DAG in the admin page and then in the DAG graph click on one of the tasks and then click on `Task Instance Details` you get the "Ooops" explosion error page. 
   
   <!---
   
   As minimally and precisely as possible. Keep in mind we do not have access to your cluster or dags.
   
   If you are using kubernetes, please attempt to recreate the issue using minikube or kind.
   
   ## Install minikube/kind
   
   - Minikube https://minikube.sigs.k8s.io/docs/start/
   - Kind https://kind.sigs.k8s.io/docs/user/quick-start/
   
   If this is a UI bug, please provide a screenshot of the bug or a link to a youtube video of the bug in action
   
   You can include images using the .md sytle of
   ![alt text](http://url/to/img.png)
   
   To record a screencast, mac users can use QuickTime and then create an unlisted youtube video with the resulting .mov file.
   
   --->
   
   
   **Anything else we need to know**:
   
   <!--
   
   How often does this problem occur? Once? Every time etc?
   
   Any relevant logs to include? Put them here in side a detail tag:
   <details><summary>x.log</summary> lots of stuff </details>
   
   -->
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] mik-laj closed issue #8388: Task instance details page blows up when no dagrun

Posted by GitBox <gi...@apache.org>.
mik-laj closed issue #8388: Task instance details page blows up when no dagrun
URL: https://github.com/apache/airflow/issues/8388
 
 
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] boring-cyborg[bot] commented on issue #8388: Task instance details page blows up when no dagrun

Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on issue #8388: Task instance details page blows up when no dagrun
URL: https://github.com/apache/airflow/issues/8388#issuecomment-614296917
 
 
   Thanks for opening your first issue here! Be sure to follow the issue template!
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services