Uh oh!
There was an error while loading. Please reload this page.
Fix: make dry run optional for patch task instance - #34568
Conversation
This fixes an issue where dry_run is not actually and optional parameter in the patch task_instance api.
Calder-Ty
commented
Sep 22, 2023
This is a reopened version of #34564 which was closed by mistake (by myself). |
Calder-Ty
commented
Sep 22, 2023
I didn't want this comment to be forgotten: |
f0restron07
commented
Sep 24, 2023
Hi @Calder-Ty, Thank you for addressing this issue and for reopening the pull request. Making dry_run optional and setting the default to False aligns the behavior of the code with the documentation, which will certainly prevent confusion and errors for API users in the future. It is crucial that the API's behavior is consistent with the documentation to ensure a smooth and reliable user experience, and this change is a step in the right direction. Looking at the commits, it seems you have kept the changes concise and directly related to the issue at hand, which is appreciated. It's also good to see that the checks have mostly passed, indicating that this change doesn't introduce any apparent regressions or new issues. I look forward to seeing this change merged after the required reviews, and I believe it will be a valuable improvement to Apache Airflow. Thank you again for your contribution! Best regards, |
hussein-awala
commented
Sep 24, 2023
@pierrejeambrun in the first PR, I commented with:
WDYT? If you agree, should we fix the doc and the bug in the same PR? |
Yes, all other
I think defaulting to true makes more sense, and is more conservative, unless explicitly stated by the user with a dry_run=False, we should run in dry run mode. Also just for a consistency reason, dry_run should be True. Updating the doc and the schema in one place will fix both endpoints mentioned. Yes this is a very small located change, updating both the schema and the API spec and putting this under bug fix seems fine to me :) |
This updates the docs and the code so that they are in alignment while also being consistent with all other endpoints. All other Endpoints have dry run set to be True by default.
Calder-Ty
commented
Sep 25, 2023
made changes to have docs and code aligned, as well as be consistent with the rest of the API (i.e Set |
ephraimbuddy
left a comment
There was a problem hiding this comment.
We should only update here:
to usedata.get(‘dry_run’, False)Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
pierrejeambrun
left a comment
There was a problem hiding this comment.
LGTM, this is consistent with dry_run default value for other endpoints. (And the more conservative choice, I believe)
o-nikolas
left a comment
There was a problem hiding this comment.
Other than the static check failures (should be an easy fix to the generated ts) it lgtm.
I like the fix in the schema!
o-nikolas
commented
Sep 27, 2023
Also, are we considering this change to the default a breaking change to the API or a bugfix? CC @eladkal |
Calder-Ty
commented
Sep 27, 2023
Technically it is, however, I think we can be fairly sure no one was depending on the functionality since it was broken. |
hussein-awala
commented
Sep 27, 2023
Uh oh!
There was an error while loading. Please reload this page.
Yep, what Hussein said, not a breaking change. (Field was required before) |
Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions. |
* fix: Make dry_run optional per docs This fixes an issue where dry_run is not actually and optional parameter in the patch task_instance api. * chore: remove formatting changes * fix: Make changes for api docs This updates the docs and the code so that they are in alignment while also being consistent with all other endpoints. All other Endpoints have dry run set to be True by default. * fix: Update static ts file for api change * fix: Remove dump_default (cherry picked from commit a4357ca)
Fixes#34563. This sets Dry run to be optional as the docs indicate it should be and makes the default False per the 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.