psigen opened a new issue #13602:
URL: https://github.com/apache/airflow/issues/13602


   <!--
   
   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 CHECK "SIMILAR TO X EXISTING ISSUES" OPTION IF VISIBLE
   NEXT TO "SUBMIT NEW ISSUE" BUTTON!!!
   
   PLEASE CHECK IF THIS ISSUE HAS BEEN REPORTED PREVIOUSLY USING SEARCH!!!
   
   Please complete the next sections or the issue will be closed.
   These questions are the first thing we need to know to understand the 
context.
   
   -->
   
   **Apache Airflow version**: 2.0.0
   
   
   **Kubernetes version (if you are using kubernetes)** (use `kubectl 
version`): N/A
   
   **Environment**:
   
   - **Cloud provider or hardware configuration**: docker-compose 
   - **OS** (e.g. from /etc/os-release): Docker `apache/airflow` 
`sha256:b4f957bef5a54ca0d781ae1431d8485f125f0b5d18f3bc7e0416c46e617db265`
   - **Kernel** (e.g. `uname -a`): Linux c697ae3a0397 5.4.0-58-generic 
#64~18.04.1-Ubuntu SMP Wed Dec 9 17:11:11 UTC 2020 x86_64 GNU/Linux
   - **Install tools**: docker
   - **Others**:
   
   **What happened**:
   
   When an event that does not include a DAG is logged in the UI, this event 
lists the DAG ID as "None".  This "None" is treated as an actual DAG ID with a 
link, which throws an error if clicked.
   
   ```
   Something bad has happened.
   Please consider letting us know by creating a bug report using GitHub.
   
   Python version: 3.6.12
   Airflow version: 2.0.0
   Node: 9097c882a712
   
-------------------------------------------------------------------------------
   Traceback (most recent call last):
     File "/home/airflow/.local/lib/python3.6/site-packages/flask/app.py", line 
2447, in wsgi_app
       response = self.full_dispatch_request()
     File "/home/airflow/.local/lib/python3.6/site-packages/flask/app.py", line 
1952, in full_dispatch_request
       rv = self.handle_user_exception(e)
     File "/home/airflow/.local/lib/python3.6/site-packages/flask/app.py", line 
1821, in handle_user_exception
       reraise(exc_type, exc_value, tb)
     File "/home/airflow/.local/lib/python3.6/site-packages/flask/_compat.py", 
line 39, in reraise
       raise value
     File "/home/airflow/.local/lib/python3.6/site-packages/flask/app.py", line 
1950, in full_dispatch_request
       rv = self.dispatch_request()
     File "/home/airflow/.local/lib/python3.6/site-packages/flask/app.py", line 
1936, in dispatch_request
       return self.view_functions[rule.endpoint](**req.view_args)
     File 
"/home/airflow/.local/lib/python3.6/site-packages/airflow/www/auth.py", line 
34, in decorated
       return func(*args, **kwargs)
     File 
"/home/airflow/.local/lib/python3.6/site-packages/airflow/www/decorators.py", 
line 97, in view_func
       return f(*args, **kwargs)
     File 
"/home/airflow/.local/lib/python3.6/site-packages/airflow/www/decorators.py", 
line 60, in wrapper
       return f(*args, **kwargs)
     File 
"/home/airflow/.local/lib/python3.6/site-packages/airflow/utils/session.py", 
line 65, in wrapper
       return func(*args, session=session, **kwargs)
     File 
"/home/airflow/.local/lib/python3.6/site-packages/airflow/www/views.py", line 
2028, in graph
       dag = current_app.dag_bag.get_dag(dag_id)
     File 
"/home/airflow/.local/lib/python3.6/site-packages/airflow/utils/session.py", 
line 65, in wrapper
       return func(*args, session=session, **kwargs)
     File 
"/home/airflow/.local/lib/python3.6/site-packages/airflow/models/dagbag.py", 
line 171, in get_dag
       self._add_dag_from_db(dag_id=dag_id, session=session)
     File 
"/home/airflow/.local/lib/python3.6/site-packages/airflow/models/dagbag.py", 
line 227, in _add_dag_from_db
       raise SerializedDagNotFound(f"DAG '{dag_id}' not found in serialized_dag 
table")
   airflow.exceptions.SerializedDagNotFound: DAG 'None' not found in 
serialized_dag table
   ```
   
   <!-- (please include exact error messages if you can) -->
   
   **What you expected to happen**:
   
   I expected `None` to not be a link or have it link to some sort of error 
page.  Instead it throws an error.
   
   **How to reproduce it**:
   
   Run a CLI command such as `airflow dags list`, then go to `/log/list/` in 
the web UI, and click on the `None` *Dag Id* for the logged event for the 
command.
   
   
![image](https://user-images.githubusercontent.com/2805291/104140901-d7b85300-5381-11eb-87e3-25a22dc842ec.png)
   
   **Anything else we need to know**:
   
   This problem appears to occur every time.


----------------------------------------------------------------
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:
[email protected]


Reply via email to