-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
Fixing Errors (Update Connexion Library to version 3) #37555
Fixing Errors (Update Connexion Library to version 3) #37555
Conversation
|
||
init_jinja_globals(flask_app) | ||
init_xframe_protection(flask_app) | ||
return flask_app | ||
return connexion_app |
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.
Why not returning the flask_app
instead of the connexion_app
? That would avoid making many changes around this
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.
Thanks, got it. here connexion_app.app
returns a FlaskApp
so we can return it. Can you explain or give some reference on the benefits you anticipate? We do not have the full context of this PR yet. Will help to understand the migration better 💯
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.
The will decrease the number of changes. There are many changes in this PR which replace cached_app(config={"FAB_UPDATE_PERMS": False}).appbuilder
by cached_app(config={"FAB_UPDATE_PERMS": False}).app.appbuilder
. By doing so, we will no longer need these changes
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.
Thanks! Got it 🚀
debug=True, # nosec | ||
use_reloader=not app.config["TESTING"], | ||
log_level="debug", | ||
# reload=not app.app.config["TESTING"], |
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.
What's the change here?
swagger_ui_options = SwaggerUIOptions( | ||
swagger_ui=conf.getboolean("webserver", "enable_swagger_ui", fallback=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.
I think this come from another PR? If so please rebase to make the review easier
) | ||
|
||
connexion_app.extensions["csrf"].exempt(api.blueprint) | ||
return api.blueprint if api else None |
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.
In which case api can be Falsy?
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. |
The first time with |
💯 |
7f68766
to
912e026
Compare
* Refactor DatasetAll and DatasetAny inheritance They are moved from airflow.models.datasets to airflow.datasets since the intention is to use them with Dataset, not DatasetModel. It is more natural for users to import from the latter module instead. A new (abstract) base class is added for the two classes, plus the OG Dataset class, to inherit from. This allows us to replace a few isinstance checks with simple molymorphism and make the logic a bit simpler. --------- Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com> Co-authored-by: Wei Lee <weilee.rx@gmail.com>
…pache#37615) We've been checking - for reproducibility - if python version used is Python 3.9 or above, but since we are also rebuilding sdist packages, we need to check if sdist packages can be converted to wheel packages as well so we need to check python version used.
* Enhancing breeze commands with PACKAGE_LIST env variable * removing from add-back-references as it is idempotent * review comments from potiuk * fixing doc building * fixing static checks
The error was misleading by saying envvar should be 'true', instead of the expected value.
…37613) When a task is terminated, it get sent a SIGTERM signal, (through standard_task_runner.terminate). This signal is picked up by taskinstance.py, where it injects an AirflowException into the current running task. The exception raised there is now changed into a new AirflowTaskTerminated exception. This new exception inherits BaseException, so that it is not caught and ignored accidentally by code that tries to perform ordinary error handling. Because termination requests should not be ignored. This will improve reliability of cancelling tasks and will make error logs and error categorization more clear about the reason for failure. (The terminate function does eventually send SIGKILL if the SIGTERM is ignored, but waiting for that should not be necessary) See https://docs.python.org/3/library/exceptions.html#exception-hierarchy
).blueprint | ||
) | ||
|
||
connexion_app.extensions["csrf"].exempt(api.blueprint) |
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.
'FlaskApp' object has no attribute 'extensions'
, So I think it is not possible to do it like this.
Signed-off-by: sudipto baral <sudiptobaral.me@gmail.com>
Signed-off-by: sudipto baral <sudiptobaral.me@gmail.com>
Hi @vincbeck 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 |
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: #37631 |
But I guess it is fair to ignore, git should handle it when we merge |
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 |
Signed-off-by: sudipto baral <sudiptobaral.me@gmail.com>
* Show dataset events above task/run details in grid view * Add extra to dataset event tables
…apache#37623) The version in docs has been out-of-sync with the README. This PR fixes it and adds instruction in release process to keep them in sync.
* Prepare docs ad hoc Teradata provider RC2 February 2024 * Update change log
* Add dataset nodes to dag graph * Clean up dataset nodes
* Initial filter datasets graph by dag_id * Fix bug with merging dataset subgraphs * Fix index for dataset group merging * Add tooltip
Fix GCSObjectsWithPrefixExistenceSensor found prefix in fist poke only in async mode of sensor then it does not push matches in xcom. This PR fix it.
…7633) * when deleting the whole .build folder, the www folder could not be created during asset compilation * -source packages were treated as sdist and we attempted to build wheel files with them * when building airflow packages, default settting (for security reasons) is to build everything in docker container, but building wheel for sdist was done outside. With this PR we only use sdist check when we use local hatch build - and sdist wheel check happens in docker container when sdists are built. * tarball was prepared before the pypi packages and it has been deleted by local hatch build
This PR had an issue with rebasing. We moved to #37638 instead of this PR. |
Description
This PR was created based on #36052
Todo
auth_mgr.get_api_endpoints(connexion_app)
returns None instead of a blueprint object^ 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.