test(perf): tolerate empty paired runner node args (#5275)

Co-authored-by: heihutu <heihutu@gmail.com>
This commit is contained in:
houseme
2026-07-26 15:06:27 +08:00
committed by GitHub
parent 4e63ee962f
commit a539b33583
2 changed files with 28 additions and 4 deletions
+8 -4
View File
@@ -243,21 +243,18 @@ build_runner_cmd_for_product() {
local bucket="$3" local bucket="$3"
local leg_out_dir="$4" local leg_out_dir="$4"
local endpoint image_ref image_digest revision_or_release ack_contract local endpoint image_ref image_digest revision_or_release ack_contract
local -a node_args
if [[ "$product" == "rustfs" ]]; then if [[ "$product" == "rustfs" ]]; then
endpoint="$RUSTFS_ENDPOINT" endpoint="$RUSTFS_ENDPOINT"
image_ref="$RUSTFS_IMAGE_REF" image_ref="$RUSTFS_IMAGE_REF"
image_digest="$RUSTFS_IMAGE_DIGEST" image_digest="$RUSTFS_IMAGE_DIGEST"
revision_or_release="$RUSTFS_REVISION" revision_or_release="$RUSTFS_REVISION"
ack_contract="$RUSTFS_ACK_CONTRACT" ack_contract="$RUSTFS_ACK_CONTRACT"
node_args=("${RUSTFS_NODE_ARGS[@]}")
else else
endpoint="$MINIO_ENDPOINT" endpoint="$MINIO_ENDPOINT"
image_ref="$MINIO_IMAGE_REF" image_ref="$MINIO_IMAGE_REF"
image_digest="$MINIO_IMAGE_DIGEST" image_digest="$MINIO_IMAGE_DIGEST"
revision_or_release="$MINIO_RELEASE" revision_or_release="$MINIO_RELEASE"
ack_contract="$MINIO_ACK_CONTRACT" ack_contract="$MINIO_ACK_CONTRACT"
node_args=("${MINIO_NODE_ARGS[@]}")
fi fi
RUNNER_CMD=( RUNNER_CMD=(
@@ -286,7 +283,14 @@ build_runner_cmd_for_product() {
--bucket "$bucket" \ --bucket "$bucket" \
--out-dir "$leg_out_dir" --out-dir "$leg_out_dir"
) )
RUNNER_CMD+=("${COMMON_LABELS[@]}" "${node_args[@]}") if ((${#COMMON_LABELS[@]} > 0)); then
RUNNER_CMD+=("${COMMON_LABELS[@]}")
fi
if [[ "$product" == "rustfs" && ${#RUSTFS_NODE_ARGS[@]} -gt 0 ]]; then
RUNNER_CMD+=("${RUSTFS_NODE_ARGS[@]}")
elif [[ "$product" == "minio" && ${#MINIO_NODE_ARGS[@]} -gt 0 ]]; then
RUNNER_CMD+=("${MINIO_NODE_ARGS[@]}")
fi
if [[ "$DRY_RUN" == "true" ]]; then if [[ "$DRY_RUN" == "true" ]]; then
RUNNER_CMD+=(--dry-run) RUNNER_CMD+=(--dry-run)
fi fi
+20
View File
@@ -34,6 +34,26 @@ if "$RUNNER" \
exit 1 exit 1
fi fi
"$RUNNER" \
--access-key minioadmin \
--secret-key minioadmin \
--rustfs-endpoint http://127.0.0.1:9000 \
--rustfs-image-ref rustfs/rustfs:bench \
--rustfs-image-digest sha256:0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef \
--rustfs-revision 42fc84063 \
--rustfs-ack-contract relaxed \
--minio-endpoint http://127.0.0.1:9100 \
--minio-image-ref quay.io/minio/minio:RELEASE.2025-07-18T21-56-31Z \
--minio-image-digest sha256:1111222233334444111122223333444411112222333344441111222233334444 \
--minio-release RELEASE.2025-07-18T21-56-31Z \
--minio-ack-contract strict \
--concurrencies 1 \
--sizes 1048576B \
--rounds-per-leg 1 \
--cooldown-secs 0 \
--out-dir "$TMP_DIR/good-no-optional-arrays" \
--dry-run >"$TMP_DIR/dry-run-no-optional-arrays.log"
"$RUNNER" \ "$RUNNER" \
--access-key minioadmin \ --access-key minioadmin \
--secret-key minioadmin \ --secret-key minioadmin \