From edcfef1f9f8fc49df4c81dcf0146853009d878c7 Mon Sep 17 00:00:00 2001 From: AllyW Date: Fri, 2 Feb 2024 10:26:42 +0800 Subject: [PATCH 1/4] add test py --- src/monitor-control-service/azext_amcs/_client_factory.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/monitor-control-service/azext_amcs/_client_factory.py b/src/monitor-control-service/azext_amcs/_client_factory.py index 89edd45e1d9..67afd6a18d2 100644 --- a/src/monitor-control-service/azext_amcs/_client_factory.py +++ b/src/monitor-control-service/azext_amcs/_client_factory.py @@ -12,6 +12,7 @@ def cf_monitor_control_service_cl(cli_ctx, *_): from azure.cli.core.commands.client_factory import get_mgmt_service_client from azext_amcs.vendored_sdks.amcs import MonitorClient + return get_mgmt_service_client(cli_ctx, MonitorClient) From 98762268f383ae4a022f01d72972b572c2054ec8 Mon Sep 17 00:00:00 2001 From: AllyW Date: Fri, 2 Feb 2024 10:59:00 +0800 Subject: [PATCH 2/4] add py --- src/monitor-control-service/azext_amcs/__init__.py | 1 + src/monitor-control-service/azext_amcs/_client_factory.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/monitor-control-service/azext_amcs/__init__.py b/src/monitor-control-service/azext_amcs/__init__.py index 9928de02bd1..17bc3f8a766 100644 --- a/src/monitor-control-service/azext_amcs/__init__.py +++ b/src/monitor-control-service/azext_amcs/__init__.py @@ -18,6 +18,7 @@ class MonitorClientCommandsLoader(AzCommandsLoader): def __init__(self, cli_ctx=None): from azure.cli.core.commands import CliCommandType from azext_amcs._client_factory import cf_monitor_control_service_cl + monitor_control_service_custom = CliCommandType( operations_tmpl='azext_amcs.custom#{}', client_factory=cf_monitor_control_service_cl) diff --git a/src/monitor-control-service/azext_amcs/_client_factory.py b/src/monitor-control-service/azext_amcs/_client_factory.py index 67afd6a18d2..fafd9ebd11f 100644 --- a/src/monitor-control-service/azext_amcs/_client_factory.py +++ b/src/monitor-control-service/azext_amcs/_client_factory.py @@ -12,7 +12,7 @@ def cf_monitor_control_service_cl(cli_ctx, *_): from azure.cli.core.commands.client_factory import get_mgmt_service_client from azext_amcs.vendored_sdks.amcs import MonitorClient - + return get_mgmt_service_client(cli_ctx, MonitorClient) From b3f04c1ed1a5c8015de8a028c33ecd7e0dbfb557 Mon Sep 17 00:00:00 2001 From: AllyW Date: Fri, 2 Feb 2024 12:30:10 +0800 Subject: [PATCH 3/4] test --- src/monitor-control-service/azext_amcs/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/monitor-control-service/azext_amcs/__init__.py b/src/monitor-control-service/azext_amcs/__init__.py index 17bc3f8a766..9334ae5ce87 100644 --- a/src/monitor-control-service/azext_amcs/__init__.py +++ b/src/monitor-control-service/azext_amcs/__init__.py @@ -22,6 +22,7 @@ def __init__(self, cli_ctx=None): monitor_control_service_custom = CliCommandType( operations_tmpl='azext_amcs.custom#{}', client_factory=cf_monitor_control_service_cl) + super().__init__(cli_ctx=cli_ctx, custom_command_type=monitor_control_service_custom) def load_command_table(self, args): From 9c5799959d81292a3272af1ca37070f6584730dd Mon Sep 17 00:00:00 2001 From: AllyW Date: Fri, 2 Feb 2024 13:29:00 +0800 Subject: [PATCH 4/4] add message id --- .github/workflows/AddPRComment.yml | 1 + .github/workflows/VersionCalPRComment.yml | 1 + src/monitor-control-service/azext_amcs/__init__.py | 2 -- src/monitor-control-service/azext_amcs/_client_factory.py | 1 - 4 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/AddPRComment.yml b/.github/workflows/AddPRComment.yml index 0f9127864e4..a6fc9816bcb 100644 --- a/.github/workflows/AddPRComment.yml +++ b/.github/workflows/AddPRComment.yml @@ -23,4 +23,5 @@ jobs: uses: mshick/add-pr-comment@v2 with: repo-token: ${{ secrets.CLI_BOT }} + message-id: prcommentbot message: "${{ env.message }}" diff --git a/.github/workflows/VersionCalPRComment.yml b/.github/workflows/VersionCalPRComment.yml index d3aea1227c4..1b2a539b08b 100644 --- a/.github/workflows/VersionCalPRComment.yml +++ b/.github/workflows/VersionCalPRComment.yml @@ -127,6 +127,7 @@ jobs: uses: mshick/add-pr-comment@v2 with: repo-token: ${{ secrets.AZCLIBOT_PAT }} + message-id: versioncommentbot message-path: | version_update.txt message-failure: | diff --git a/src/monitor-control-service/azext_amcs/__init__.py b/src/monitor-control-service/azext_amcs/__init__.py index 9334ae5ce87..9928de02bd1 100644 --- a/src/monitor-control-service/azext_amcs/__init__.py +++ b/src/monitor-control-service/azext_amcs/__init__.py @@ -18,11 +18,9 @@ class MonitorClientCommandsLoader(AzCommandsLoader): def __init__(self, cli_ctx=None): from azure.cli.core.commands import CliCommandType from azext_amcs._client_factory import cf_monitor_control_service_cl - monitor_control_service_custom = CliCommandType( operations_tmpl='azext_amcs.custom#{}', client_factory=cf_monitor_control_service_cl) - super().__init__(cli_ctx=cli_ctx, custom_command_type=monitor_control_service_custom) def load_command_table(self, args): diff --git a/src/monitor-control-service/azext_amcs/_client_factory.py b/src/monitor-control-service/azext_amcs/_client_factory.py index fafd9ebd11f..89edd45e1d9 100644 --- a/src/monitor-control-service/azext_amcs/_client_factory.py +++ b/src/monitor-control-service/azext_amcs/_client_factory.py @@ -12,7 +12,6 @@ def cf_monitor_control_service_cl(cli_ctx, *_): from azure.cli.core.commands.client_factory import get_mgmt_service_client from azext_amcs.vendored_sdks.amcs import MonitorClient - return get_mgmt_service_client(cli_ctx, MonitorClient)