airflow icon indicating copy to clipboard operation
airflow copied to clipboard

Fixing Errors (Update Connexion Library to version 3)

Open Satoshi-Sh opened this issue 1 year ago • 5 comments

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.

Satoshi-Sh avatar Feb 20 '24 00:02 Satoshi-Sh

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

vincbeck avatar Feb 20 '24 15:02 vincbeck

Thanks for picking up this effort though!

vincbeck avatar Feb 20 '24 15:02 vincbeck

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.

Satoshi-Sh avatar Feb 20 '24 15:02 Satoshi-Sh

This was my first time to use rebase.

The first time with git rebase it ever painful, after that things become much easier

Taragolis avatar Feb 20 '24 18:02 Taragolis

This was my first time to use rebase.

The first time with git rebase it ever painful, after that things become much easier

💯

vincbeck avatar Feb 20 '24 19:02 vincbeck

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?

sudiptob2 avatar Feb 22 '24 17:02 sudiptob2

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?

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

vincbeck avatar Feb 22 '24 18:02 vincbeck

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

vincbeck avatar Feb 22 '24 18:02 vincbeck

But I guess it is fair to ignore, git should handle it when we merge

vincbeck avatar Feb 22 '24 18:02 vincbeck

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?

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

vincbeck avatar Feb 22 '24 18:02 vincbeck

This PR had an issue with rebasing. We moved to #37638 instead of this PR.

Satoshi-Sh avatar Feb 22 '24 23:02 Satoshi-Sh