Skip to content
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

Fix too specific parsing of False in LegacyUIDeprecated #14967

Merged
merged 2 commits into from
Jun 10, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions airflow/upgrade/rules/legacy_ui_deprecated.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ class LegacyUIDeprecated(BaseRule):

def check(self):
if conf.has_option("webserver", "rbac"):
rbac = conf.get("webserver", "rbac")
if rbac == "false":
rbac = conf.get("webserver", "rbac").strip().lower()
if rbac in ("f", "false", "0"):
return (
"rbac in airflow.cfg must be explicitly set empty as"
" RBAC mechanism is enabled by default."
Expand Down
2 changes: 1 addition & 1 deletion tests/upgrade/rules/test_legacy_ui_deprecated.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@


class TestLegacyUIDeprecated(TestCase):
@conf_vars({("webserver", "rbac"): "false"})
@conf_vars({("webserver", "rbac"): "False"})
def test_invalid_check(self):
rule = LegacyUIDeprecated()

Expand Down