Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_tasks api is broken #20

Closed
msumit opened this issue May 26, 2021 · 4 comments
Closed

get_tasks api is broken #20

msumit opened this issue May 26, 2021 · 4 comments

Comments

@msumit
Copy link
Contributor

msumit commented May 26, 2021

Client version: 2.1.0

Code:

    dag_id = "example_bash_operator"

    try:
        api_response = dag_api_instance.get_tasks(dag_id)
        pprint(api_response)
    except airflow_client.client.exceptions.OpenApiException as e:
        print("Exception when calling DagAPI->get_tasks: %s\n" % e)

Error:

Exception when calling DagAPI->get_tasks: Invalid type for variable 'execution_timeout'. Required value type is TimeDelta and passed type was NoneType at ['received_data']['tasks'][0]['execution_timeout']
@feluelle
Copy link
Member

@msumit do you have any idea why this is? I am running into this problem still on the latest version (2.2.0).

@feluelle
Copy link
Member

feluelle commented Jan 13, 2022

Isn't this a bug upstream? 🤔 I have the feeling the open api spec should allow execution_timeout to be Optional, no?

@feluelle
Copy link
Member

As a workaround you can set _check_return_type=False in get_tasks.

@pierrejeambrun
Copy link
Member

pierrejeambrun commented Aug 24, 2023

Closing, solved. Up to now we had to manually cherry pick some patches at released time. 2.7.0 does not have this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants