From cfd304351613cafe1642c6431ac6c925b27dd196 Mon Sep 17 00:00:00 2001 From: Yuchao Yan Date: Tue, 16 Jun 2026 12:52:02 +0800 Subject: [PATCH 1/5] use posix path --- eng/tools/azure-sdk-tools/packaging_tools/sdk_generator.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/eng/tools/azure-sdk-tools/packaging_tools/sdk_generator.py b/eng/tools/azure-sdk-tools/packaging_tools/sdk_generator.py index 31778c325a4a..30f63bac1cd8 100644 --- a/eng/tools/azure-sdk-tools/packaging_tools/sdk_generator.py +++ b/eng/tools/azure-sdk-tools/packaging_tools/sdk_generator.py @@ -324,16 +324,15 @@ def main(generate_input, generate_output): "--extract-metadata", package_name, "--dest-dir", - package_path.absolute(), + package_path.absolute().as_posix(), ] _LOGGER.info(f"generate apiview file for package {package_name}") check_call( cmds, timeout=900 if data.get("runMode") == "spec-pull-request" else 36000, - cwd=".", # known issue that higher python version meet install warning with lower pylint. # we skip the output here to reduce confusion and will remove it after apiview tool upgrade to higher pylint version. - stderr=subprocess.DEVNULL, + # stderr=subprocess.DEVNULL, ) for file in os.listdir(package_path): if "_python.json" in file and package_name in file: From c9e9dae1e342a0a5ab34059dadaa62a88374d276 Mon Sep 17 00:00:00 2001 From: Yuchao Yan Date: Tue, 16 Jun 2026 13:09:05 +0800 Subject: [PATCH 2/5] add necessary dep for apiview tool --- scripts/automation_init.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/automation_init.sh b/scripts/automation_init.sh index edd62cef86e4..66aeb7c941d9 100644 --- a/scripts/automation_init.sh +++ b/scripts/automation_init.sh @@ -3,6 +3,7 @@ # init env python -m pip install -U pip > /dev/null python -m pip install eng/tools/azure-sdk-tools[ghtools] > /dev/null +python -m pip install eng/apiview_reqs.txt > /dev/null # install tsp-client echo Install tsp-client From 81613d6988e7abb6f27fc860a91ae1fbc3eb4560 Mon Sep 17 00:00:00 2001 From: Yuchao Yan Date: Tue, 16 Jun 2026 13:24:09 +0800 Subject: [PATCH 3/5] add necessary dep for apiview tool --- scripts/automation_init.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/automation_init.sh b/scripts/automation_init.sh index 66aeb7c941d9..c4ad65d91e14 100644 --- a/scripts/automation_init.sh +++ b/scripts/automation_init.sh @@ -3,7 +3,7 @@ # init env python -m pip install -U pip > /dev/null python -m pip install eng/tools/azure-sdk-tools[ghtools] > /dev/null -python -m pip install eng/apiview_reqs.txt > /dev/null +python -m pip install -r eng/apiview_reqs.txt > /dev/null # install tsp-client echo Install tsp-client From cf014c55f750f21e580462e5f8c4d6424027b0c9 Mon Sep 17 00:00:00 2001 From: Yuchao Yan Date: Tue, 16 Jun 2026 13:43:42 +0800 Subject: [PATCH 4/5] add necessary dep for apiview tool --- .../packaging_tools/sdk_generator.py | 17 ++++++++++++++++- scripts/automation_init.sh | 1 - 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/eng/tools/azure-sdk-tools/packaging_tools/sdk_generator.py b/eng/tools/azure-sdk-tools/packaging_tools/sdk_generator.py index 30f63bac1cd8..167c8ea3af40 100644 --- a/eng/tools/azure-sdk-tools/packaging_tools/sdk_generator.py +++ b/eng/tools/azure-sdk-tools/packaging_tools/sdk_generator.py @@ -315,6 +315,20 @@ def main(generate_input, generate_output): if data.get("runMode") in ["spec-pull-request", "release"]: apiview_start_time = time.time() try: + _LOGGER.info(f"install apiview generation tool") + check_call( + [ + "python", + "-m", + "pip", + "install", + "-r", + "eng/apiview_reqs.txt", + "--index-url=https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-python/pypi/simple/", + ], + timeout=600, + ) + _LOGGER.info("generate apiview artifacts") package_path = Path(sdk_folder, folder_name, package_name) cmds = [ @@ -332,7 +346,8 @@ def main(generate_input, generate_output): timeout=900 if data.get("runMode") == "spec-pull-request" else 36000, # known issue that higher python version meet install warning with lower pylint. # we skip the output here to reduce confusion and will remove it after apiview tool upgrade to higher pylint version. - # stderr=subprocess.DEVNULL, + # in "release" mode we keep stderr so the output is visible for debugging. + stderr=None if data.get("runMode") == "release" else subprocess.DEVNULL, ) for file in os.listdir(package_path): if "_python.json" in file and package_name in file: diff --git a/scripts/automation_init.sh b/scripts/automation_init.sh index c4ad65d91e14..edd62cef86e4 100644 --- a/scripts/automation_init.sh +++ b/scripts/automation_init.sh @@ -3,7 +3,6 @@ # init env python -m pip install -U pip > /dev/null python -m pip install eng/tools/azure-sdk-tools[ghtools] > /dev/null -python -m pip install -r eng/apiview_reqs.txt > /dev/null # install tsp-client echo Install tsp-client From e65b5a6de049248ed01de423935dc4fb16fec531 Mon Sep 17 00:00:00 2001 From: Yuchao Yan Date: Tue, 16 Jun 2026 13:44:55 +0800 Subject: [PATCH 5/5] add necessary dep for apiview tool --- eng/tools/azure-sdk-tools/packaging_tools/sdk_generator.py | 1 + 1 file changed, 1 insertion(+) diff --git a/eng/tools/azure-sdk-tools/packaging_tools/sdk_generator.py b/eng/tools/azure-sdk-tools/packaging_tools/sdk_generator.py index 167c8ea3af40..cb5c824a8dff 100644 --- a/eng/tools/azure-sdk-tools/packaging_tools/sdk_generator.py +++ b/eng/tools/azure-sdk-tools/packaging_tools/sdk_generator.py @@ -327,6 +327,7 @@ def main(generate_input, generate_output): "--index-url=https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-python/pypi/simple/", ], timeout=600, + stderr=None if data.get("runMode") == "release" else subprocess.DEVNULL, ) _LOGGER.info("generate apiview artifacts")