Conversation
- Added `--compile` option to `update-binaries` command for selecting between local and remote builds. - Introduced local build functionality in `health.sh` for cross-compilation from macOS to Linux. - Updated configuration file to include a path for local IPC repository. - Enhanced documentation in the script for clarity on new options and usage examples.
- Enhanced the cross-compilation logic in `health.sh` to prefer `cargo-zigbuild` over `cross`, providing clearer installation instructions. - Updated documentation in `ipc-subnet-manager.sh` to reflect the new requirements for macOS to Linux builds. - Improved error handling and user guidance for cross-compilation failures.
| fi | ||
|
|
||
| local result_file="/tmp/ipc-manager-build-result.$$" | ||
| trap "rm -f $result_file" EXIT |
There was a problem hiding this comment.
EXIT trap override prevents lock file cleanup
High Severity
In update_all_binaries, trap "rm -f $result_file" EXIT replaces the EXIT trap set by acquire_lock (trap 'rm -f "$LOCK_FILE"' EXIT). After running update-binaries --compile local, the lock file /tmp/ipc-subnet-manager.lock is never cleaned up, blocking all future init, restart, update-binaries, and deploy-binaries commands until manually removed.
Additional Locations (1)
- Replaced direct SSH commands with `exec_on_host` for creating remote directories, improving code clarity and maintainability. - Updated binary transfer functions to use `copy_to_host`, enhancing consistency in deployment logic. - Removed redundant variable assignments for SSH user and IP, simplifying the function's parameters.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
| if [ -z "$binary_path" ]; then | ||
| log_error "Invalid path" | ||
| exit 1 | ||
| fi |
There was a problem hiding this comment.
Unreachable error message due to set -e exit
Low Severity
The script runs with set -euo pipefail. When a user provides an invalid directory via --path, the assignment binary_path=$(cd "$binary_path" 2>/dev/null && pwd) yields a non-zero exit code, causing set -e to terminate the script immediately. The intended "Invalid path" error message on the following lines is unreachable — the user gets a silent exit with no explanation instead.


Note
Medium Risk
Adds new binary deployment paths (local build + SCP, and copy-only deploy) that change how validator executables get updated; mistakes could roll out wrong/arch-incompatible binaries across the fleet. Remote build behavior is mostly preserved but now depends on sourcing shell env and PATH setup during SSH builds.
Overview
Adds a new
deploy-binariescommand to copy prebuiltipc-cli/fendermintto validators (optionally targeting a single validator) with auto-detection of the localtarget/*/releaseoutput path.Extends
update-binarieswith--compile {local|remote}so updates can either build on each validator (default) or build once locally (including macOS→Linux cross-compile support) and then deploy the resulting binaries to all validators.Updates the YAML config template to document
paths.local_ipc_repo, and tweaks remote build execution to source common shell env files and set PATH before runningmake.Written by Cursor Bugbot for commit 9de9cd0. This will update automatically on new commits. Configure here.