-
Notifications
You must be signed in to change notification settings - Fork 14.5k
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
AIP-84 Migrate patch a connection to FastAPI API #43102
AIP-84 Migrate patch a connection to FastAPI API #43102
Conversation
f33126e
to
e58dae7
Compare
94bfe26
to
fa62ca2
Compare
fa62ca2
to
104d004
Compare
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.
I think we should also make consistant the behavior for PATCH
regarding None
value.
Here when there is a mask you take them. And when there is no mask, you filter them out.
I did something different for Pool
which I think can be extented. When there is a mask, same thing, we use values. When there is no mask, we validate that the payload is valide by it's own, i.e it's a valid db entity by its own, and we use everything. (none or not).
The idea is to allow someone to not specify mask
and reset some fields to None
if needed.
I just pushed one commit to remove a remnent of old code |
104d004
to
f4c90dd
Compare
I think we have the same issue here, we cannot |
I totally missed this one, thanks for the changes! :) |
I think I looked from the lazy path when no parameter, no value to you :) Saw your changes. Looks good and makes sense! I agree, we should have a common approach for common methods because what we are doing at the end is pretty similar. |
For 'common' behavior of null values we can do that in another PR. That is not really specific to this one. I think we can just handle the 'password', then merge it, maybe you can take care of making all |
Yeap, it sounds perfect! I am going to take care of that after finishing the |
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.
We need to handle the password
2b85e78
to
0b67aae
Compare
3ea9442
to
591657d
Compare
591657d
to
d26497a
Compare
Tests should be fixed in #43654. |
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.
Looking good.
Need rebasing to fix conflicts, we can merge after.
…ameter Field default value for backward compatibility
…on for backward compat and fix for variables serialisation won't update val in setattr()
…date_mask breaking change
d26497a
to
7c19e96
Compare
Many thanks for rebasing and merging the other PR! You saved me from facing the conflict twice 🙏 Rebased. |
* Migrate Patch Connection endpoint to FastAPI and Include Optional parameter Field default value for backward compatibility * Make all tests parametrized * Make UpdateMask Annotated for Patch endpoints, update the serialisation for backward compat and fix for variables serialisation won't update val in setattr() * Merge duplicate imports * Revert update_mask to explode true and include significant.rst for update_mask breaking change * Amend update_mask as array * generalize handling of list query parameters in newsfragment * Include password field * Include password to response and tests, rebase and rerun pre-commit * Fix copy&paste mistakes for method and naming * Convert redact_password to agreed approach, rebase and pre-commits * Include new exception doc generation * Run pre-commit after rebase
closes: #42592.
Include, making fields nullable for patch endpoints for backward compatibility.
^ 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.