Use supports_read instead of is_supported in log endpoint (#9628)
This commit is contained in:
Родитель
ee20086b8c
Коммит
611d449a45
|
@ -50,7 +50,7 @@ def get_log(session, dag_id, dag_run_id, task_id, task_try_number,
|
|||
metadata['download_logs'] = False
|
||||
|
||||
task_log_reader = TaskLogReader()
|
||||
if not task_log_reader.is_supported:
|
||||
if not task_log_reader.supports_read:
|
||||
raise BadRequest("Task log handler does not support read logs.")
|
||||
|
||||
query = session.query(DagRun).filter(DagRun.dag_id == dag_id)
|
||||
|
|
|
@ -219,7 +219,7 @@ class TestGetLog(unittest.TestCase):
|
|||
|
||||
@mock.patch("airflow.api_connexion.endpoints.log_endpoint.TaskLogReader")
|
||||
def test_get_logs_for_handler_without_read_method(self, mock_log_reader):
|
||||
type(mock_log_reader.return_value).is_supported = PropertyMock(return_value=False)
|
||||
type(mock_log_reader.return_value).supports_read = PropertyMock(return_value=False)
|
||||
|
||||
key = self.app.config["SECRET_KEY"]
|
||||
serializer = URLSafeSerializer(key)
|
||||
|
|
Загрузка…
Ссылка в новой задаче