hyperlane-xyz / hyperlane-monorepo

The home for Hyperlane core contracts, sdk packages, and other infrastructure
https://hyperlane.xyz
Other
339 stars 378 forks source link

CLI's `--yes` flag doesn't skip confirmation prompts #3056

Closed shaspitz closed 11 months ago

shaspitz commented 11 months ago

In upgrading our ref of hyperlane to v3.3, including usage of the new cli tool, I'm seeing that the --yes flag relevant to both hyperlane deploy core and hyperlane deploy warp is not working as intended. It just doesn't actually skip confirmation prompts. This functionality is necessary to deploy in a dockerized environment

Version

3.3 -> https://github.com/hyperlane-xyz/hyperlane-monorepo/commit/8b16adee486a6b1a1f0d4fbd1b419369241813b2

Example

Running

  hyperlane deploy core \
    --yes \
    --targets sepolia,mevcommitsettlement \
    --chains /chain-config.yml \
    --ism /multisig-ism.yml \
    --out "/hyperlane-monorepo/artifacts" \
    --key $CONTRACT_DEPLOYER_PRIVATE_KEY

in a docker container produces the following logs, where the container eventually exits

hyperlane deploy core --yes --targets sepolia,mevcommitsettlement --chains /chain-config.yml --ism /multisig-ism.yml --out /hyperlane-monorepo/artifacts --key <KEY>
2023-12-14 00:09:44 ██╗  ██╗██╗   ██╗██████╗ ███████╗██████╗ ██╗      █████╗ ███╗   ██╗███████╗
2023-12-14 00:09:44 ██║  ██║╚██╗ ██╔╝██╔══██╗██╔════╝██╔══██╗██║     ██╔══██╗████╗  ██║██╔════╝
2023-12-14 00:09:44 ███████║ ╚████╔╝ ██████╔╝█████╗  ██████╔╝██║     ███████║██╔██╗ ██║█████╗  
2023-12-14 00:09:44 ██╔══██║  ╚██╔╝  ██╔═══╝ ██╔══╝  ██╔══██╗██║     ██╔══██║██║╚██╗██║██╔══╝  
2023-12-14 00:09:44 ██║  ██║   ██║   ██║     ███████╗██║  ██║███████╗██║  ██║██║ ╚████║███████╗
2023-12-14 00:09:44 ╚═╝  ╚═╝   ╚═╝   ╚═╝     ╚══════╝╚═╝  ╚═╝╚══════╝╚═╝  ╚═╝╚═╝  ╚═══╝╚══════╝
2023-12-14 00:09:44                                                                            
2023-12-14 00:09:44 Hyperlane permissionless core deployment
2023-12-14 00:09:44 ----------------------------------------
2023-12-14 00:09:44 Reading file configs in /chain-config.yml
2023-12-14 00:09:44 All chain configs in /chain-config.yml are valid
2023-12-14 00:09:44 
2023-12-14 00:09:44 Deployments can be totally new or can use some existing contract addresses.
2023-12-14 00:09:44 ? Do you want use some existing contract addresses? (Y/n)
shaspitz commented 11 months ago

Note an expect script on our side previously bypassed this issue. I believe in upgrading to a newer version of hyperlane, the cli workflow has changed and I cannot get an expect script to work anymore

nambrot commented 11 months ago

@shaspitz Thanks for filing this. We have identified the issue and will fix it as soon as we can

avious00 commented 11 months ago

@shaspitz thanks for all the CLI feedback recently btw, much appreciated. doing our best to patch as fast you point out 🫡