Skip to content

Call delete_dag on subdag without AttributeError#8017

Merged
dimberman merged 1 commit intoapache:masterfrom
robinedwards:hotfix/delete-dag-experimental-api
Apr 2, 2020
Merged

Call delete_dag on subdag without AttributeError#8017
dimberman merged 1 commit intoapache:masterfrom
robinedwards:hotfix/delete-dag-experimental-api

Conversation

@robinedwards
Copy link
Contributor

@robinedwards robinedwards commented Mar 30, 2020

Deleting a subdag through the experimental api causes an AttributeError as a DagRun doesn't have a task_id column. DagRun's are handled prior to the subdag if statement so there is no need to remove them here. I also doubt we wanted to remove the parent dags DagRuns when removing a DagRun.

I have adapted the existing test class a bit to avoid repetition and added a case which exercises the above issue.


Issue link: WILL BE INSERTED BY boring-cyborg

Make sure to mark the boxes below before creating PR: [x]


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.
Read the Pull Request Guidelines for more information.

The DagRun object does not have a task_id attribute, DagRuns are deleted in the
block above so no need to do it here or remove ones belonging to the
parent.
@robinedwards robinedwards force-pushed the hotfix/delete-dag-experimental-api branch from 9f91bef to 759d960 Compare March 30, 2020 17:35
Copy link
Contributor

@dimberman dimberman left a comment

Choose a reason for hiding this comment

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

LGTM thank you @robinedwards !

@dimberman dimberman merged commit 3b91ec9 into apache:master Apr 2, 2020
@robinedwards
Copy link
Contributor Author

robinedwards commented Apr 2, 2020 via email

@dimberman
Copy link
Contributor

Should be, dont think we've done a code freeze yet :)

@dimberman dimberman added this to the Airflow 1.10.10 milestone Apr 2, 2020
@rm3195
Copy link

rm3195 commented Dec 3, 2020

Did this ever got included in 1.10.x? We get AttributeError that's fixed by this PR in 1.10.13 :(

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

Successfully merging this pull request may close these issues.

3 participants