airflow
airflow copied to clipboard
Fixing Errors (Update Connexion Library to version 3)
Description
On this PR, I'm fixing the bugs mentioned in Attempt to update Connexion library to version 3 #36052
Blueprint can't be retrieved due to Connexion Upgrade
Update the code as Vincebeck mentioned in the comment on the same PR.
- Rename get_api_endpoints to set_api_endpoints. The return type should be updated to None. Documentation should be updated as well to something like "Set API endpoint(s) definition for the auth manager.". This is a breaking change but nobody uses this interface yet, so it is a good time to do it.
- This piece of code flask_app.extensions["csrf"].exempt(blueprint) should be moved in the set_api_endpoints method using appbuilder.app.extensions["csrf"].exempt(api.blueprint)
^ 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.
I just added few comments. The code changes look massive, some changes do not look related to the PR. Could you please rebase your PR against main?
Also, I think some renaming would help reducing the number of code changes, unless you think this is needed
Thanks for picking up this effort though!
Thanks for the feedback, Vincebeck. This was my first time to use rebase. I think I made some mistakes during the process. I will try it with Jarek tomorrow.
This was my first time to use rebase.
The first time with git rebase it ever painful, after that things become much easier
This was my first time to use rebase.
The first time with
git rebaseit ever painful, after that things become much easier
💯
Hi @vincbeck
we rebased the branch with main. Still, the PR is massive because this PR is based on this made by VladaZakharova. So basically, it contains the entire changes required for upgrading to connexion v3
Can you share your opinion on what should be a proper way to work on this so that we can make a contribution and review process easy?
Hi @vincbeck we rebased the branch with
main. Still, the PR is massive because this PR is based on this made by VladaZakharova. So basically, it contains the entire changes required for upgrading toconnexion v3Can you share your opinion on what should be a proper way to work on this so that we can make a contribution and review process easy?
Unfortunately this PR still contain changes unrelated to your changes. If you look at the commits, I can see for example one commit from me that is now merged in main. I'll try to take a look and see if I can clean this PR
By looking at it, I think the code changes make sense, just the list of commit does not make sense. As an example I created (and closed) this PR which contain all your changes and only the related commit: https://github.com/apache/airflow/pull/37631
But I guess it is fair to ignore, git should handle it when we merge
Hi @vincbeck we rebased the branch with
main. Still, the PR is massive because this PR is based on this made by VladaZakharova. So basically, it contains the entire changes required for upgrading toconnexion v3Can you share your opinion on what should be a proper way to work on this so that we can make a contribution and review process easy?
I dont think it is possible to split this PR, everything is connected. Though I think we can reduce the number of changes, the first one would be to not change the returned type of cached_app. I left an line comment. The idea basically is to still returning the Flask app and not the connexion app
This PR had an issue with rebasing. We moved to #37638 instead of this PR.