From 76ffaf19f23b468556e29b9f02047f4e778566d0 Mon Sep 17 00:00:00 2001 From: Yann Hodique Date: Wed, 8 Jan 2025 15:01:28 -0600 Subject: [PATCH] fix: remove some UUOC given that run_sh uses /bin/sh, which doesn't support pipefail option, the previous state allowed failures to not stop kurtosis execution (the whole step itself didn't fail). Beyond the inconvenience of having to scroll up to see the real failure, it also potentially allowed kurtosis to *cache* the faulty step, which would be very confusing at the next run. --- src/contracts/contract_deployer.star | 4 ++-- src/util.star | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/contracts/contract_deployer.star b/src/contracts/contract_deployer.star index 61be674b..182e2b42 100644 --- a/src/contracts/contract_deployer.star +++ b/src/contracts/contract_deployer.star @@ -201,7 +201,7 @@ def deploy_contracts(plan, priv_key, l1_config_env_vars, optimism_args, l1_netwo }, run=" && ".join( [ - "cat /network-data/intent.toml | dasel put -r toml -t {0} -v {2} '{1}' -o /network-data/intent.toml".format( + "dasel put -r toml -t {0} -v {2} '{1}' -o /network-data/intent.toml < /network-data/intent.toml".format( t, k, v ) for t, k, v in intent_updates @@ -258,7 +258,7 @@ def deploy_contracts(plan, priv_key, l1_config_env_vars, optimism_args, l1_netwo "/network-data": op_deployer_output.files_artifacts[0], "/fund-script": fund_script_artifact, }, - run='cat "/network-data/genesis-$CHAIN_ID.json" | jq --from-file /fund-script/gen2spec.jq > "/network-data/chainspec-$CHAIN_ID.json"', + run='jq --from-file /fund-script/gen2spec.jq < "/network-data/genesis-$CHAIN_ID.json" > "/network-data/chainspec-$CHAIN_ID.json"', ) return op_deployer_output.files_artifacts[0] diff --git a/src/util.star b/src/util.star index c1d1c494..91f3e662 100644 --- a/src/util.star +++ b/src/util.star @@ -13,7 +13,7 @@ def read_json_value(plan, json_file, json_path, mounts=None): description="Read JSON value", image=DEPLOYMENT_UTILS_IMAGE, files=mounts, - run="cat {0} | jq -j '{1}'".format(json_file, json_path), + run="jq -j '{1}' < {0}".format(json_file, json_path), ) return run.output