From e07da2d52a2691ba5467e177b0d887d51fc2d367 Mon Sep 17 00:00:00 2001 From: ZelinWang Date: Fri, 28 Jul 2023 12:42:07 +0800 Subject: [PATCH 1/3] Update update_ext_cmd_tree.py --- scripts/ci/update_ext_cmd_tree.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/ci/update_ext_cmd_tree.py b/scripts/ci/update_ext_cmd_tree.py index ab746a53606..c676f1a0342 100644 --- a/scripts/ci/update_ext_cmd_tree.py +++ b/scripts/ci/update_ext_cmd_tree.py @@ -96,6 +96,8 @@ def upload_cmd_tree(): if __name__ == '__main__': for ext in sys.argv[1:]: - update_cmd_tree(ext) - print() + # Exception: Key: show already exists in containerapp. 2 extensions cannot have the same command! + if ext != 'containerapp-preview': + update_cmd_tree(ext) + print() upload_cmd_tree() From bb433fdc5d57f81fbe245245ba54cf7763ec1f70 Mon Sep 17 00:00:00 2001 From: ZelinWang Date: Fri, 28 Jul 2023 13:52:07 +0800 Subject: [PATCH 2/3] Update update_ext_cmd_tree.py --- scripts/ci/update_ext_cmd_tree.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/ci/update_ext_cmd_tree.py b/scripts/ci/update_ext_cmd_tree.py index c676f1a0342..418418d294b 100644 --- a/scripts/ci/update_ext_cmd_tree.py +++ b/scripts/ci/update_ext_cmd_tree.py @@ -96,7 +96,12 @@ def upload_cmd_tree(): if __name__ == '__main__': for ext in sys.argv[1:]: - # Exception: Key: show already exists in containerapp. 2 extensions cannot have the same command! + # When two extensions have the same command, the following error will be reported: + # `Exception: Key: show already exists in containerapp. 2 extensions cannot have the same command!` + # Temporarily skip the containerapp-preview extension, + # Which will cause the containerapp-preview extension to be unable to use the dynamic load function. + # That is, when using the unique command of containerapp-preview, the extension cannot be automatically prompted to install. + # TODO: remove this after support for building dependencies in command index between extensions if ext != 'containerapp-preview': update_cmd_tree(ext) print() From a8cf5d3c77f33342e38f42a6f58bb23cff1e7d9d Mon Sep 17 00:00:00 2001 From: ZelinWang Date: Fri, 28 Jul 2023 13:55:24 +0800 Subject: [PATCH 3/3] update --- scripts/ci/build_ext_cmd_tree.sh | 10 +++++++++- scripts/ci/update_ext_cmd_tree.py | 11 ++--------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/scripts/ci/build_ext_cmd_tree.sh b/scripts/ci/build_ext_cmd_tree.sh index 53bed033b85..bc8552d1c91 100644 --- a/scripts/ci/build_ext_cmd_tree.sh +++ b/scripts/ci/build_ext_cmd_tree.sh @@ -20,7 +20,15 @@ export AZURE_EXTENSION_INDEX_URL=https://raw.githubusercontent.com/Azure/azure-c output=$(az extension list-available --query [].name -otsv) # azure-cli-ml is replaced by ml # disable alias which relies on Jinja2 2.10 -blocklist=("azure-cli-ml" "alias") +# ----------------------------------------------- +# When two extensions have the same command, the following error will be reported: +# `Exception: Key: show already exists in containerapp. 2 extensions cannot have the same command!` +# Temporarily skip the containerapp-preview extension, +# Which will cause the containerapp-preview extension to be unable to use the dynamic load function. +# That is, when using the unique command of containerapp-preview, the extension cannot be automatically prompted to install. +# TODO: remove this after support for building dependencies in command index between extensions +# ----------------------------------------------- +blocklist=("azure-cli-ml" "alias" "containerapp-preview") rm -f ~/.azure/extCmdTreeToUpload.json diff --git a/scripts/ci/update_ext_cmd_tree.py b/scripts/ci/update_ext_cmd_tree.py index 418418d294b..ab746a53606 100644 --- a/scripts/ci/update_ext_cmd_tree.py +++ b/scripts/ci/update_ext_cmd_tree.py @@ -96,13 +96,6 @@ def upload_cmd_tree(): if __name__ == '__main__': for ext in sys.argv[1:]: - # When two extensions have the same command, the following error will be reported: - # `Exception: Key: show already exists in containerapp. 2 extensions cannot have the same command!` - # Temporarily skip the containerapp-preview extension, - # Which will cause the containerapp-preview extension to be unable to use the dynamic load function. - # That is, when using the unique command of containerapp-preview, the extension cannot be automatically prompted to install. - # TODO: remove this after support for building dependencies in command index between extensions - if ext != 'containerapp-preview': - update_cmd_tree(ext) - print() + update_cmd_tree(ext) + print() upload_cmd_tree()