thejohnbackes opened a new issue, #52:
URL: https://github.com/apache/airflow-client-python/issues/52

   
   
   Observed Behavior:
   
   `DAGApi.get_dag_details` fails if `DAG Run Timeout` is `None`.
   
   To recreate:
   
   First, Create a DAG and set "DAG Run Timout" as None
   Next, try to access the DAG Details using the API:
   
   ```
       api = DAGApi(airflow_client.client)
       dag = api.get_dag_details(dag_id)
   ```
   
   Exception:
   
   ```
   airflow_client.client.exceptions.ApiTypeError: Invalid type for variable 
'dag_run_timeout'. Required value type is TimeDelta and passed type was 
NoneType at ['received_data']['dag_run_timeout']
   ```
   
   Proposed fix:
   
   The [DAG 
schema](https://github.com/apache/airflow-client-python/blob/3547adf28757f05544d6308157a9ae5c95c03e81/airflow_client/client/model/dag_detail_all_of.py#L113)
 at `dagrun_timeout` should support NoneType, as [this is what is supported in 
the Airflow API 
documentation](https://airflow.apache.org/docs/apache-airflow/stable/_api/airflow/models/dag/index.html#:~:text=active%20DAG%20runs-,dagrun_timeout,-(timedelta%20%7C%20None)%20%E2%80%93%20specify).
   
   


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

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to