ashb commented on code in PR #29714:
URL: https://github.com/apache/airflow/pull/29714#discussion_r1115484690
##########
airflow/utils/cli.py:
##########
@@ -102,8 +102,9 @@ def wrapper(*args, **kwargs):
# Check and run migrations if necessary
if check_db:
from airflow.utils.db import check_and_run_migrations,
synchronize_log_template
-
- check_and_run_migrations()
+ from airflow.configuration import conf
+ if conf.get("database", "CHECK_MIGRATIONS"):
Review Comment:
```suggestion
if conf.getboolean("database", "check_migrations"):
```
(It is sort of a pattern of having the config name in uppercase, but one I'm
trying to slowly remove)
##########
tests/cli/commands/test_scheduler_command.py:
##########
@@ -73,6 +73,23 @@ def test_skip_serve_logs(self, mock_process,
mock_scheduler_job, executor):
scheduler_command.scheduler(args)
with pytest.raises(AssertionError):
mock_process.assert_has_calls([mock.call(target=serve_logs)])
+ @mock.patch.dict(
Review Comment:
Yeah, with the `with conf_vars` you have looks right. Let me take a look and
see.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]