-
Notifications
You must be signed in to change notification settings - Fork 16.4k
fix: Make dry_run optional per docs #34564
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
Conversation
|
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst)
|
hussein-awala
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMHO it's a problem in the doc, dry_run should be True by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try to avoid unnecessary and unrelated changes
| session.query(TaskInstance).update( | |
| {TaskInstance.operator: None}, synchronize_session="fetch") | |
| session.query(TaskInstance).update({TaskInstance.operator: None}, synchronize_session="fetch") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Easy fix, will turn off my formatter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| self.create_task_instances(session, task_instances=[ | |
| {"state": State.REMOVED}], update_extras=True) | |
| self.create_task_instances(session, task_instances=[{"state": State.REMOVED}], update_extras=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| count = session.query(TaskInstance).filter( | |
| count = session.query(TaskInstance).filter(TaskInstance.dag_id == "example_python_operator").count() |
I don't care about what the default is, however that change would technically be a breaking change. Albeit, no one can be depending on the declared functionality from the docs as it is broken. |
|
I did not mean to close this. But will open a new PR. |
This fixes #34563. It makes SetSingleTaskInstanceStateFormSchema load dry_run as False by default.
This matches what is declared in the api docs
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an 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 a newsfragment file, named
{pr_number}.significant.rstor{issue_number}.significant.rst, in newsfragments.