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/10/26 18:35:55 UTC

[GitHub] [airflow] ephraimbuddy opened a new issue #11862: API request issue with the example_dags

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


   Getting the list of dags in the example dags using the rest API is broken due to an example dag with no file location
   
   **Apache Airflow version**:2.0
   
   
   **Kubernetes version (if you are using kubernetes)** (use `kubectl version`):
   
   **Environment**:
   
   - **Cloud provider or hardware configuration**:
   - **OS** (e.g. from /etc/os-release):
   - **Kernel** (e.g. `uname -a`):
   - **Install tools**:
   - **Others**:
   
   **What happened**:
   When you request for dags using the API dags endpoint, it returns an error as shown below:
   
   ```
   {
       "detail": "None is not of type 'string'\n\nFailed validating 'type' in schema['allOf'][0]['properties']['dags']['items']['properties']['fileloc']:\n    {'description': 'The absolute path to the file.',\n     'readOnly': True,\n     'type': 'string'}\n\nOn instance['dags'][25]['fileloc']:\n    None",
       "status": 500,
       "title": "Response body does not conform to specification",
       "type": "https://airflow.apache.org/docs/2.0.0a1/stable-rest-api-ref.html#section/Errors/Unknown"
   }
   ```
   The reason is that a DAG is introduced in the list of example dags it's supposed to return and that DAG has no fileloc. Here is the DAG:
   
   ```
   {
               "dag_id": "TEST_DAG_ID",
               "description": null,
               "fileloc": null,
               "is_paused": false,
               "is_subdag": false,
               "owners": [],
               "root_dag_id": null,
               "schedule_interval": null,
               "tags": []
           },
   ```
   I have not investigated to see where this dag is coming from.
   
   **What you expected to happen**:
   
   I expected to receive a list of dags in response
   
   **How to reproduce it**:
   
   1. Start breeze and start both the scheduler and webserver
   2. Using postman or any tool, request for this endpoint `http://localhost:28080/api/v1/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.

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



[GitHub] [airflow] ephraimbuddy commented on issue #11862: API request issue with the example dags

Posted by GitBox <gi...@apache.org>.
ephraimbuddy commented on issue #11862:
URL: https://github.com/apache/airflow/issues/11862#issuecomment-716902482


   Wow. This solved it!
   I should have asked around before opening the issue. Thanks so much


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



[GitHub] [airflow] kaxil commented on issue #11862: API request issue with the example dags

Posted by GitBox <gi...@apache.org>.
kaxil commented on issue #11862:
URL: https://github.com/apache/airflow/issues/11862#issuecomment-716881596


   Can you try with the following command:
   
   ```
    ./breeze start-airflow --backend postgres --db-reset
   ```
   
   and see


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



[GitHub] [airflow] ephraimbuddy closed issue #11862: API request issue with the example dags

Posted by GitBox <gi...@apache.org>.
ephraimbuddy closed issue #11862:
URL: https://github.com/apache/airflow/issues/11862


   


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