diff --git a/cardano_node_tests/cluster_scripts/testnets/start-cluster b/cardano_node_tests/cluster_scripts/testnets/start-cluster index d1a0c6b2c..6c98862e9 100644 --- a/cardano_node_tests/cluster_scripts/testnets/start-cluster +++ b/cardano_node_tests/cluster_scripts/testnets/start-cluster @@ -179,7 +179,11 @@ tn_start_node() { echo "Waiting until replay is finished" sleep 10 - while tail -n 10 "${STATE_CLUSTER}/relay1.stdout" | grep -E -q "replay progress|IPSubscriptionTarget"; do + # No `-q`: it exits on the first match, leaving `tail` writing into a closed pipe, and + # `pipefail` would promote that SIGPIPE status and end the wait early. Plain `grep` scans + # all of its input, so `tail` always finishes writing. + while tail -n 10 "${STATE_CLUSTER}/relay1.stdout" | + grep -E "replay progress|IPSubscriptionTarget" > /dev/null; do sleep 10 done diff --git a/pyproject.toml b/pyproject.toml index e53b355fe..8de2ac3bb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,7 +26,7 @@ classifiers = [ dependencies = [ "allure-pytest (>=2.15.2,<3.0.0)", "cardano-clusterlib (>=0.10.5,<0.11.0)", - "cardonnay (>=0.4.3,<0.5.0)", + "cardonnay (>=0.4.4,<0.5.0)", "cbor2 (>=5.7.1,<6.0.0)", "filelock (>=3.20.0,<4.0.0)", "hypothesis (>=6.148.7,<7.0.0)", diff --git a/runner/runc.sh b/runner/runc.sh index a690bca7c..bcc2547f2 100755 --- a/runner/runc.sh +++ b/runner/runc.sh @@ -142,7 +142,9 @@ add_worktree_git_mount() { local gitdir main_git_dir [ -f "$repo_dir/.git" ] || return 0 - gitdir="$(sed -n 's/^gitdir: //p' "$repo_dir/.git" | head -n 1)" + # `exit` after the first match keeps this to the first `gitdir:` line. One process, so the + # status is awk's own and an unreadable `.git` still aborts under `errexit`. + gitdir="$(awk '/^gitdir: /{print substr($0, 9); exit}' "$repo_dir/.git")" if [ -z "$gitdir" ]; then echo "Warning: '$repo_dir/.git' has no 'gitdir:' line; git will not work inside the container." >&2 return 0 diff --git a/scripts/postgres-start.sh b/scripts/postgres-start.sh index 86db1b897..8fbfec9de 100755 --- a/scripts/postgres-start.sh +++ b/scripts/postgres-start.sh @@ -23,8 +23,9 @@ is_postgres_pid() { local cmdline cmdline="$(ps -o args= -p "$pid" 2>/dev/null || echo "")" # verify process is postgres serving expected data directory - # use grep -F for literal string match (glob metacharacters in pg_dir are safe) - [[ "$cmdline" == *postgres* ]] && printf '%s' "$cmdline" | grep -qF "$pg_dir/data" + # the quoted right-hand side makes this a literal match, so glob metacharacters in + # pg_dir are safe + [[ "$cmdline" == *postgres* && "$cmdline" == *"$pg_dir/data"* ]] } kill_postgres() { diff --git a/uv.lock b/uv.lock index 52bba4112..2fd5b9a7b 100644 --- a/uv.lock +++ b/uv.lock @@ -135,7 +135,7 @@ docs = [ requires-dist = [ { name = "allure-pytest", specifier = ">=2.15.2,<3.0.0" }, { name = "cardano-clusterlib", specifier = ">=0.10.5,<0.11.0" }, - { name = "cardonnay", specifier = ">=0.4.3,<0.5.0" }, + { name = "cardonnay", specifier = ">=0.4.4,<0.5.0" }, { name = "cbor2", specifier = ">=5.7.1,<6.0.0" }, { name = "filelock", specifier = ">=3.20.0,<4.0.0" }, { name = "hypothesis", specifier = ">=6.148.7,<7.0.0" }, @@ -173,7 +173,7 @@ docs = [ [[package]] name = "cardonnay" -version = "0.4.3" +version = "0.4.4" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "click" }, @@ -183,9 +183,9 @@ dependencies = [ { name = "setuptools" }, { name = "supervisor" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/80/36/9efccb9119a1b30790eb9c01ffdb357d8be385684d2895c5f8d4cdb8545f/cardonnay-0.4.3.tar.gz", hash = "sha256:13c5cf797f933c76dca765b4ecf0d4f83934493e52899e8ca7957cccf654466b", size = 101269, upload-time = "2026-08-18T15:33:24.435Z" } +sdist = { url = "https://files.pythonhosted.org/packages/51/2b/290f2615bec116b30756ba248bf388cc919c9098d9b25941bb891aabd8be/cardonnay-0.4.4.tar.gz", hash = "sha256:50e02ea987f74bb9ec18fb2905e5bca1a044c6a7edf1a9b4b949bfb9fa29776e", size = 101541, upload-time = "2026-08-20T20:25:43.285Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/44/75/682c9713ba21d4ef8bee590bc4a999475b8a98587a69e3edbef502b63181/cardonnay-0.4.3-py3-none-any.whl", hash = "sha256:84d37f92ae2bff4e633957def4bd9999fc81d3715ed06e38f28872f9b84a9c2a", size = 105898, upload-time = "2026-08-18T15:33:22.886Z" }, + { url = "https://files.pythonhosted.org/packages/de/d2/93b6b349c055ed89bba79c4f69f45a94c7ccae2003296e2c713d08f60417/cardonnay-0.4.4-py3-none-any.whl", hash = "sha256:f3e95e7937cb5fadba4b9d6b3e6e77c1422d7cfc21eb88874e7c0a1214ad3800", size = 106211, upload-time = "2026-08-20T20:25:41.767Z" }, ] [[package]]