-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
fix: Make dry_run optional per docs #34564
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)
|
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.
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.
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
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.
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) |
@@ -667,7 +669,8 @@ def test_should_respond_200_for_dag_id_filter(self, session): | |||
) | |||
|
|||
assert response.status_code == 200 | |||
count = session.query(TaskInstance).filter(TaskInstance.dag_id == "example_python_operator").count() | |||
count = session.query(TaskInstance).filter( |
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.rst
or{issue_number}.significant.rst
, in newsfragments.