ephraimbuddy opened a new issue #12276:
URL: https://github.com/apache/airflow/issues/12276


   
   The list event log endpoint is not working
   
   **Apache Airflow version**: 2.0
   
   **Environment**: Breeze
   
   **What happened**:
   
   Calling the list event logs endpoint 
`http://localhost:28080/api/v1/eventLogs` returns 500 status code with the 
below message:
   
   ```
   {
       "detail": "None is not of type 'string'\n\nFailed validating 'type' in 
schema['allOf'][0]['properties']['event_logs']['items']['properties']['dag_id']:\n
    {'description': 'The DAG ID', 'readOnly': True, 'type': 'string'}\n\nOn 
instance['event_logs'][0]['dag_id']:\n    None",
       "status": 500,
       "title": "Response body does not conform to specification",
       "type": 
"https://airflow.readthedocs.io/en/latest/stable-rest-api-ref.html#section/Errors/Unknown";
   }
   ```
   
   **What you expected to happen**:
   
   I expected it to produce a list of event logs:
   ```
   {
       "event_logs": [
           {
               "dag_id": null,
               "event": "cli_webserver",
               "event_log_id": 482,
               "execution_date": null,
               "extra": "{\"host_name\": \"e24b454f002a\", \"full_command\": 
\"['/usr/local/bin/airflow', 'webserver']\"}",
               "owner": "root",
               "task_id": null,
               "when": "2020-11-11T03:28:48.722814+00:00"
           },
           {
               "dag_id": null,
               "event": "cli_scheduler",
               "event_log_id": 483,
               "execution_date": null,
               "extra": "{\"host_name\": \"e24b454f002a\", \"full_command\": 
\"['/usr/local/bin/airflow', 'scheduler']\"}",
               "owner": "root",
               "task_id": null,
               "when": "2020-11-11T03:32:18.684231+00:00"
           },
        ],
       "total_entries": 2
   }
   ```
   
   **How to reproduce it**:
   1. Start airflow webserver and scheduler in breeze
   2. Call the endpoint `http://localhost:28080/api/v1/eventLogs`
   3. Check the response
   


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