From 89e1573e77b53d9991ec40610a6c691dc95d2336 Mon Sep 17 00:00:00 2001 From: Bin Du <2686301+northtyphoon@users.noreply.github.com> Date: Mon, 11 Apr 2022 23:16:27 -0700 Subject: [PATCH] [ACR] `acr task run`: Add missing --no-format option (#21983) --- src/azure-cli/azure/cli/command_modules/acr/task.py | 6 ++++-- src/azure-cli/azure/cli/command_modules/acr/taskrun.py | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/azure-cli/azure/cli/command_modules/acr/task.py b/src/azure-cli/azure/cli/command_modules/acr/task.py index 8c0cb7732c5..88142c3a599 100644 --- a/src/azure-cli/azure/cli/command_modules/acr/task.py +++ b/src/azure-cli/azure/cli/command_modules/acr/task.py @@ -856,6 +856,7 @@ def acr_task_run(cmd, # pylint: disable=too-many-locals secret_arg=None, target=None, update_trigger_token=None, + no_format=False, no_logs=False, no_wait=False, resource_group_name=None, @@ -915,7 +916,7 @@ def acr_task_run(cmd, # pylint: disable=too-many-locals from ._run_polling import get_run_with_polling return get_run_with_polling(cmd, client, run_id, registry_name, resource_group_name) - return stream_logs(cmd, client, run_id, registry_name, resource_group_name, timeout, True) + return stream_logs(cmd, client, run_id, registry_name, resource_group_name, timeout, no_format, True) def acr_task_show_run(cmd, @@ -984,6 +985,7 @@ def acr_task_logs(cmd, run_id=None, task_name=None, image=None, + no_format=False, resource_group_name=None): _, resource_group_name = validate_managed_registry( cmd, registry_name, resource_group_name, TASK_NOT_SUPPORTED) @@ -1007,7 +1009,7 @@ def acr_task_logs(cmd, task_name=task_name, image=image)) - return stream_logs(cmd, client, run_id, registry_name, resource_group_name) + return stream_logs(cmd, client, run_id, registry_name, resource_group_name, None, no_format, False) def _get_list_runs_message(base_message, task_name=None, image=None): diff --git a/src/azure-cli/azure/cli/command_modules/acr/taskrun.py b/src/azure-cli/azure/cli/command_modules/acr/taskrun.py index 9b68b757c34..8cf4388eb32 100644 --- a/src/azure-cli/azure/cli/command_modules/acr/taskrun.py +++ b/src/azure-cli/azure/cli/command_modules/acr/taskrun.py @@ -48,6 +48,7 @@ def acr_taskrun_logs(cmd, client, # cf_acr_runs registry_name, taskrun_name, + no_format=False, resource_group_name=None): _, resource_group_name = validate_managed_registry( cmd, registry_name, resource_group_name, TASKRUN_NOT_SUPPORTED) @@ -57,4 +58,4 @@ def acr_taskrun_logs(cmd, response = client_taskruns.get(resource_group_name, registry_name, taskrun_name) run_id = response.run_result.run_id - return stream_logs(cmd, client, run_id, registry_name, resource_group_name) + return stream_logs(cmd, client, run_id, registry_name, resource_group_name, None, no_format, False)