Skip to content

Commit e893368

Browse files
authored
[SDK generation pipeline] optimize log when succeed to generate SDK (Azure#38852)
* optimize log * update log
1 parent 5dd74a3 commit e893368

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

scripts/automation_generate.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export PATH
77

88
TEMP_FILE="$TMPDIR/venv-sdk/auto_temp.json"
99
# generate code
10-
python -m packaging_tools.sdk_generator "$1" "$TEMP_FILE" 2>&1
10+
python -m packaging_tools.sdk_generator "$1" "$TEMP_FILE" --debug 2>&1
1111
echo "[Generate] codegen done!!!"
1212
if [ ! -f "$TEMP_FILE" ]; then
1313
echo "[Autorest]$TEMP_FILE does not exist!!!Error happened during codegen"
@@ -19,7 +19,7 @@ if [ -f "$2" ]; then
1919
fi
2020

2121
# package
22-
python -m packaging_tools.sdk_package "$TEMP_FILE" "$2" 2>&1
22+
python -m packaging_tools.sdk_package "$TEMP_FILE" "$2" --debug 2>&1
2323
echo "[Generate] generate done!!!"
2424
if [ ! -f "$2" ]; then
2525
echo "[Autorest]$2 does not exist!!!Error happened during package"

tools/azure-sdk-tools/packaging_tools/sdk_package.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def main(generate_input, generate_output):
7373
if "_python.json" in file and package_name in file:
7474
package["apiViewArtifact"] = str(Path(package_path, file))
7575
except Exception as e:
76-
_LOGGER.info(f"Fail to generate ApiView token file for {package_name}: {e}")
76+
_LOGGER.debug(f"Fail to generate ApiView token file for {package_name}: {e}")
7777
# Installation package
7878
package["installInstructions"] = {
7979
"full": "You can install the use using pip install of the artifacts.",
@@ -89,6 +89,10 @@ def main(generate_input, generate_output):
8989
with open(generate_output, "w") as writer:
9090
json.dump(result, writer)
9191

92+
_LOGGER.info(
93+
f"Congratulations! Succeed to build package for {[p['packageName'] for p in result['packages']]}. And you shall be able to see the generated code when running 'git status'."
94+
)
95+
9296

9397
def generate_main():
9498
"""Main method"""

0 commit comments

Comments
 (0)