| Files | Last commit | Last update |
|---|---|---|
fix(build): Add set -e to run package scripts and flatten nested defaults Co-authored-by: chengding888<chengding1@hisilicon.com> # message auto-generated for no-merge-commit merge: !7313 merge fix/package-shell-warnings into master fix(build): Add set -e to run package scripts and flatten nested defaults Created-by: chengding888 Commit-by: chengding888 Merged-by: cann-robot Description: fix(build): Add set -e to run package scripts and flatten nested defaults Fix CodeCheck warnings reported for the PyPTO run package scripts: - Five scripts ( pypto_custom_uninstall.sh, run_pypto_uninstall.sh, run_pypto_install.sh, pypto_func.sh, pypto_custom_install.sh) missed set -e at the script head. - Variable definitions such as PKG_WHL_INSTALL_PATH="${PKG_WHL_INSTALL_PATH:-${PKG_INSTALL_PATH}/python/site-packages}" nested more than two levels; they are rewritten with explicit empty checks while keeping the original semantics. Since pypto_func.sh is sourced by install.sh / uninstall.sh, enabling set -e makes errexit propagate into the entry scripts. To keep the existing error-handling behavior unchanged, every command whose failure was previously ignored is guarded with || true, including: - best-effort chmod / chown / chattr / find calls and grep misses; - installed/package version.info lookups (is_multi_version_pkg, get_version), so that a missing or corrupted version.info no longer aborts install.sh / uninstall.sh silently before the /etc/ascend_install.info fallback logic; - log initialization, which falls back to /dev/null when the log directory is not writable, so installation/uninstallation keeps running as before; - the first-install path (version.info does not exist yet), the legacy /etc/ascend_install.info uninstall path, and the invalid local statement in _set_mode. Changes: - Add set -e to the five run package scripts - Flatten nested variable defaults in pypto_custom_uninstall.sh and run_pypto_uninstall.sh - Guard benign failures, version.info lookups and log initialization in pypto_func.sh, install.sh, uninstall.sh, run_pypto_uninstall.sh and pypto_custom_uninstall.sh - Reset ARCH_NAME to empty when scene.info lookup fails, to avoid capturing the error log into the variable Validation: - bash -n on all touched scripts and git diff --check passed - A/B comparison against the base commit (eb60d7b58) with real CANN common_func*.inc: 36 scenarios (help/version/check/first install/uninstall/custom scripts, invalid arguments, missing or corrupted version.info, unwritable log directory) behave identically; only the redundant stderr lines from failed log-file writes disappear - Unit checks for the set -e sensitive functions Related Issues: #3757 See merge request: cann/pypto!7313 | 27 days ago | |
fix(machine): Add metadata memory usage print Co-authored-by: duanhaotian<duanhaotian@huawei.com> # message auto-generated for no-merge-commit merge: !7289 merge duanhaotian into master fix(machine): Add metadata memory usage print Created-by: duanhaotian Commit-by: duanhaotian Merged-by: cann-robot Description: 新增元数据运行时使用率打印,每一轮devicetask下发时,打印每一类元数据的当前使用量,总评估量,地址分布 See merge request: cann/pypto!7289 | 23 days ago | |
refactor(scripts): Split check_slice_spacing to lower cyclomatic complexity Co-authored-by: chai-hw<chaizhengtong@huawei.com> # message auto-generated for no-merge-commit merge: !6503 merge fix_precommit into master refactor(scripts): Split check_slice_spacing to lower cyclomatic complexity Created-by: chai-hw Commit-by: chai-hw Merged-by: cann-robot Description: 减少脚本中的圈复杂度 See merge request: cann/pypto!6503 | 2 months ago | |
style(config): Update .clang-format and .pre-commit-config.yaml rules Co-authored-by: junjieHuang<huangjunjie38@h-partners.com> # message auto-generated for no-merge-commit merge: !4877 merge style-config-ci into master style(config): Update .clang-format and .pre-commit-config.yaml rules Created-by: junjieHuang Commit-by: junjieHuang Merged-by: cann-robot Description: Update .clang-format and .pre-commit-config.yaml rules See merge request: cann/pypto!4877 | 4 months ago |
| Files | Last commit | Last update |
|---|---|---|
| 27 days ago | ||
| 23 days ago | ||
| 2 months ago | ||
| 4 months ago |