Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SDK generation pipeline] optimize log when succeed to generate SDK #38852

Merged
merged 2 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions scripts/automation_generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export PATH

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

# package
python -m packaging_tools.sdk_package "$TEMP_FILE" "$2" 2>&1
python -m packaging_tools.sdk_package "$TEMP_FILE" "$2" --debug 2>&1
echo "[Generate] generate done!!!"
if [ ! -f "$2" ]; then
echo "[Autorest]$2 does not exist!!!Error happened during package"
Expand Down
3 changes: 2 additions & 1 deletion tools/azure-sdk-tools/packaging_tools/sdk_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def main(generate_input, generate_output):
if "_python.json" in file and package_name in file:
package["apiViewArtifact"] = str(Path(package_path, file))
except Exception as e:
_LOGGER.info(f"Fail to generate ApiView token file for {package_name}: {e}")
_LOGGER.debug(f"Fail to generate ApiView token file for {package_name}: {e}")
# Installation package
package["installInstructions"] = {
"full": "You can install the use using pip install of the artifacts.",
Expand All @@ -89,6 +89,7 @@ def main(generate_input, generate_output):
with open(generate_output, "w") as writer:
json.dump(result, writer)

_LOGGER.info(f"Succeed to build package for {[p['packageName'] for p in result['packages']]}")

def generate_main():
"""Main method"""
Expand Down
Loading