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

Bugfix: Allow getting details of a DAG with null start_date(REST API) #13959

Merged
merged 1 commit into from
Jan 29, 2021

Conversation

ephraimbuddy
Copy link
Contributor

Currently, when you request for dag details of a DAG with no start_date, it throughs an error:

{
    "detail": "None is not of type 'string'\n\nFailed validating 'type' in schema['allOf'][1]['properties']['start_date']:\n    {'format': 'date-time', 'readOnly': True, 'type': 'string'}\n\nOn instance['start_date']:\n    None",
    "status": 500,
    "title": "Response body does not conform to specification",
    "type": "http://apache-airflow-docs.s3-website.eu-central-1.amazonaws.com/docs/apache-airflow/latest/stable-rest-api-ref.html#section/Errors/Unknown"
}

This PR resolves this by nullifying the start_date of DAG detail schema in openapi


^ Add meaningful description above

Read the Pull Request Guidelines for more information.
In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in UPDATING.md.

@boring-cyborg boring-cyborg bot added the area:API Airflow's REST/HTTP API label Jan 28, 2021
@ephraimbuddy ephraimbuddy changed the title Bugfix: Allow getting details of a DAG with null start_date Bugfix: Allow getting details of a DAG with null start_date(REST API) Jan 28, 2021
@ephraimbuddy
Copy link
Contributor Author

Please @mik-laj, can you take a look at this PR. I have a situation where the Get dag details endpoint fails when a DAG is triggered with the execution date in the future or when the task start date is before the dag start date

@github-actions
Copy link

The PR is likely OK to be merged with just subset of tests for default Python and Database versions without running the full matrix of tests, because it does not modify the core of Airflow. If the committers decide that the full tests matrix is needed, they will add the label 'full tests needed'. Then you should rebase to the latest master or amend the last commit of the PR, and push it with --force-with-lease.

@github-actions github-actions bot added the okay to merge It's ok to merge this PR as it does not require more tests label Jan 29, 2021
Copy link
Member

@kaxil kaxil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ephraimbuddy

@kaxil kaxil merged commit fdb83c7 into apache:master Jan 29, 2021
@kaxil kaxil deleted the fix-dagdetails-startdate branch January 29, 2021 18:45
@kaxil kaxil added this to the Airflow 2.0.1 milestone Jan 29, 2021
kaxil pushed a commit that referenced this pull request Jan 29, 2021
kaxil pushed a commit that referenced this pull request Feb 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:API Airflow's REST/HTTP API okay to merge It's ok to merge this PR as it does not require more tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants