Skip to content

fix: deployer fixes#1549

Open
phutchins wants to merge 4 commits intomainfrom
fix/deployer-fixes
Open

fix: deployer fixes#1549
phutchins wants to merge 4 commits intomainfrom
fix/deployer-fixes

Conversation

@phutchins
Copy link
Contributor

@phutchins phutchins commented Mar 18, 2026

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-binaries command to copy prebuilt ipc-cli/fendermint to validators (optionally targeting a single validator) with auto-detection of the local target/*/release output path.

Extends update-binaries with --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 running make.

Written by Cursor Bugbot for commit 9de9cd0. This will update automatically on new commits. Configure here.

- 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.
@phutchins phutchins requested a review from a team as a code owner March 18, 2026 01:08
@phutchins phutchins enabled auto-merge (squash) March 18, 2026 01:09
@phutchins phutchins changed the title Fix/deployer fixes Fix: deployer fixes Mar 18, 2026
@phutchins phutchins changed the title Fix: deployer fixes fix: deployer fixes Mar 18, 2026
fi

local result_file="/tmp/ipc-manager-build-result.$$"
trap "rm -f $result_file" EXIT
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Fix in Cursor Fix in Web

- 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.
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

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
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant