Skip to content

Commit

Permalink
Upgrade FAB to 4.5.1 (#43251)
Browse files Browse the repository at this point in the history
FAB 4.5.1 has been released in September with a few small
fixes. This change updates fab to 4.5.1 including changing the
rate limiter creation that is vendored in. It has been changed
in dpgaspar/Flask-AppBuilder#2254 and
relased in 4.5.1. That's the only dfference in security manager
between 4.5.0 and 4.5.1.

(cherry picked from commit 84ff10b)
  • Loading branch information
potiuk committed Oct 23, 2024
1 parent a6d0583 commit 022d449
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion airflow/providers/fab/provider.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ dependencies:
# Every time we update FAB version here, please make sure that you review the classes and models in
# `airflow/providers/fab/auth_manager/security_manager/override.py` with their upstream counterparts.
# In particular, make sure any breaking changes, for example any new methods, are accounted for.
- flask-appbuilder==4.5.0
- flask-appbuilder==4.5.1
- flask-login>=0.6.2
- google-re2>=1.0
- jmespath>=0.7.0
Expand Down
5 changes: 3 additions & 2 deletions airflow/www/security_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,9 @@ def before_request():
g.user = get_auth_manager().get_user()

def create_limiter(self) -> Limiter:
limiter = Limiter(key_func=get_remote_address)
limiter.init_app(self.appbuilder.get_app)
app = self.appbuilder.get_app
limiter = Limiter(key_func=app.config.get("RATELIMIT_KEY_FUNC", get_remote_address))
limiter.init_app(app)
return limiter

def register_views(self):
Expand Down
6 changes: 3 additions & 3 deletions dev/breeze/tests/test_packages.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def test_get_documentation_package_path():
"",
"""
"apache-airflow>=2.9.0",
"flask-appbuilder==4.5.0",
"flask-appbuilder==4.5.1",
"flask-login>=0.6.2",
"flask>=2.2,<2.3",
"google-re2>=1.0",
Expand All @@ -179,7 +179,7 @@ def test_get_documentation_package_path():
"dev0",
"""
"apache-airflow>=2.9.0.dev0",
"flask-appbuilder==4.5.0",
"flask-appbuilder==4.5.1",
"flask-login>=0.6.2",
"flask>=2.2,<2.3",
"google-re2>=1.0",
Expand All @@ -192,7 +192,7 @@ def test_get_documentation_package_path():
"beta0",
"""
"apache-airflow>=2.9.0b0",
"flask-appbuilder==4.5.0",
"flask-appbuilder==4.5.1",
"flask-login>=0.6.2",
"flask>=2.2,<2.3",
"google-re2>=1.0",
Expand Down
2 changes: 1 addition & 1 deletion generated/provider_dependencies.json
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@
"fab": {
"deps": [
"apache-airflow>=2.9.0",
"flask-appbuilder==4.5.0",
"flask-appbuilder==4.5.1",
"flask-login>=0.6.2",
"flask>=2.2,<2.3",
"google-re2>=1.0",
Expand Down

0 comments on commit 022d449

Please sign in to comment.