This is an automated email from the ASF dual-hosted git repository.
kaxilnaik pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new bfba17bb37 Fix typo in `db upgrade` warning message (#33510)
bfba17bb37 is described below
commit bfba17bb37feea74247a06aaa65560d125247fee
Author: Kaxil Naik <[email protected]>
AuthorDate: Fri Aug 18 21:25:53 2023 +0100
Fix typo in `db upgrade` warning message (#33510)
`db updgrade` to `db upgrade`
---
airflow/cli/commands/db_command.py | 2 +-
tests/cli/commands/test_db_command.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/airflow/cli/commands/db_command.py
b/airflow/cli/commands/db_command.py
index f0d3ac4edc..dad068547c 100644
--- a/airflow/cli/commands/db_command.py
+++ b/airflow/cli/commands/db_command.py
@@ -61,7 +61,7 @@ def resetdb(args):
def upgradedb(args):
"""Upgrades the metadata database."""
- warnings.warn("`db updgrade` is deprecated. Use `db migrate` instead.",
DeprecationWarning)
+ warnings.warn("`db upgrade` is deprecated. Use `db migrate` instead.",
DeprecationWarning)
migratedb(args)
diff --git a/tests/cli/commands/test_db_command.py
b/tests/cli/commands/test_db_command.py
index e928dc66bf..4bfb80d4f5 100644
--- a/tests/cli/commands/test_db_command.py
+++ b/tests/cli/commands/test_db_command.py
@@ -127,7 +127,7 @@ class TestCliDb:
@mock.patch("airflow.cli.commands.db_command.migratedb")
def test_cli_upgrade(self, mock_migratedb):
- with pytest.warns(expected_warning=DeprecationWarning, match="`db
updgrade` is deprecated"):
+ with pytest.warns(expected_warning=DeprecationWarning, match="`db
upgrade` is deprecated"):
db_command.upgradedb(self.parser.parse_args(["db", "upgrade"]))
mock_migratedb.assert_called_once()