From fdcdb5eaee97c98d5cbb3944be4909f610e56dbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?As=C4=B1m=20Atasert?= Date: Thu, 16 Jul 2026 16:12:15 +0300 Subject: [PATCH] fix: map bwlimit and retries YAML/config keys to job args MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Both flags existed only on the CLI — a bwlimit or retries key in a jobs YAML or config file was silently ignored (same class of gap as the compress_where/from_stale mapping fixed in 3.10.0). Now wired into the batch YAML runner, the config loader and the job serializer; values pass through the existing strict validation. Version 3.11.1. --- debian/changelog | 8 ++++++++ src/00-header.sh | 2 +- src/50-config.sh | 2 ++ src/75-yaml.sh | 4 ++++ src/76-jobs.sh | 4 ++++ t-pgsql | 12 +++++++++++- 6 files changed, 30 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 4406265..c306c7d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +t-pgsql (3.11.1-1) unstable; urgency=medium + + * Fix: bwlimit and retries were CLI-only — a bwlimit/retries key in a jobs + YAML or config file was silently ignored. Both are now mapped in the + batch YAML runner, config loader and job serializer. + + -- Asim Atasert Wed, 16 Jul 2026 16:30:00 +0300 + t-pgsql (3.11.0-1) unstable; urgency=medium * New commands: diff --git a/src/00-header.sh b/src/00-header.sh index c5bab2c..0017e3d 100644 --- a/src/00-header.sh +++ b/src/00-header.sh @@ -21,7 +21,7 @@ # ============================================================================== # VERSION & PATHS # ============================================================================== -VERSION="3.11.0" +VERSION="3.11.1" SCRIPT_NAME="t-pgsql" SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" diff --git a/src/50-config.sh b/src/50-config.sh index 8b78654..4cfee48 100644 --- a/src/50-config.sh +++ b/src/50-config.sh @@ -52,6 +52,8 @@ load_config() { from_stale|from-stale) [ "$FROM_STALE_SET" != true ] && FROM_STALE="$value" ;; compress) [ "$COMPRESS_SET" != true ] && COMPRESS="$value" ;; compress_where|compress-where) [ "$COMPRESS_WHERE_SET" != true ] && COMPRESS_WHERE="$value" ;; + bwlimit) [ -z "$BWLIMIT" ] && BWLIMIT="$value" ;; + retries) [ "$RETRIES" = 0 ] && RETRIES="$value" ;; exclude_table|exclude-table) [ -z "$EXCLUDE_TABLES" ] && EXCLUDE_TABLES="$value" ;; exclude_schema|exclude-schema) [ -z "$EXCLUDE_SCHEMAS" ] && EXCLUDE_SCHEMAS="$value" ;; exclude_data|exclude-data) [ -z "$EXCLUDE_DATA" ] && EXCLUDE_DATA="$value" ;; diff --git a/src/75-yaml.sh b/src/75-yaml.sh index 54d0a6c..bdf6423 100644 --- a/src/75-yaml.sh +++ b/src/75-yaml.sh @@ -438,6 +438,10 @@ parse_job_to_args() { # Streaming options [ -n "$(get_job_value "$job" "stream_buffer")" ] && args+=" --stream-buffer $(pq "$(get_job_value "$job" "stream_buffer")")" + # Transfer options + [ -n "$(get_job_value "$job" "bwlimit")" ] && args+=" --bwlimit $(pq "$(get_job_value "$job" "bwlimit")")" + [ -n "$(get_job_value "$job" "retries")" ] && args+=" --retries $(pq "$(get_job_value "$job" "retries")")" + # Health check options [ "$(get_job_value "$job" "health_check")" = "true" ] && args+=" --health-check" [ "$(get_job_value "$job" "health_check_after")" = "true" ] && args+=" --health-check-after" diff --git a/src/76-jobs.sh b/src/76-jobs.sh index 1efb944..5fdfb29 100644 --- a/src/76-jobs.sh +++ b/src/76-jobs.sh @@ -41,6 +41,10 @@ save_job() { [ "$STREAM" = true ] && args="$args --stream" [ "$STREAM_BUFFER" != 64 ] && args="$args --stream-buffer $STREAM_BUFFER" + # Transfer + [ -n "$BWLIMIT" ] && args="$args --bwlimit $(pq "$BWLIMIT")" + [ "$RETRIES" != 0 ] && args="$args --retries $RETRIES" + # Retention (GFS) if [ "$RETENTION" = true ]; then args="$args --retention" diff --git a/t-pgsql b/t-pgsql index e087a4a..2b7c72b 100755 --- a/t-pgsql +++ b/t-pgsql @@ -21,7 +21,7 @@ # ============================================================================== # VERSION & PATHS # ============================================================================== -VERSION="3.11.0" +VERSION="3.11.1" SCRIPT_NAME="t-pgsql" SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" @@ -1706,6 +1706,8 @@ load_config() { from_stale|from-stale) [ "$FROM_STALE_SET" != true ] && FROM_STALE="$value" ;; compress) [ "$COMPRESS_SET" != true ] && COMPRESS="$value" ;; compress_where|compress-where) [ "$COMPRESS_WHERE_SET" != true ] && COMPRESS_WHERE="$value" ;; + bwlimit) [ -z "$BWLIMIT" ] && BWLIMIT="$value" ;; + retries) [ "$RETRIES" = 0 ] && RETRIES="$value" ;; exclude_table|exclude-table) [ -z "$EXCLUDE_TABLES" ] && EXCLUDE_TABLES="$value" ;; exclude_schema|exclude-schema) [ -z "$EXCLUDE_SCHEMAS" ] && EXCLUDE_SCHEMAS="$value" ;; exclude_data|exclude-data) [ -z "$EXCLUDE_DATA" ] && EXCLUDE_DATA="$value" ;; @@ -4071,6 +4073,10 @@ parse_job_to_args() { # Streaming options [ -n "$(get_job_value "$job" "stream_buffer")" ] && args+=" --stream-buffer $(pq "$(get_job_value "$job" "stream_buffer")")" + # Transfer options + [ -n "$(get_job_value "$job" "bwlimit")" ] && args+=" --bwlimit $(pq "$(get_job_value "$job" "bwlimit")")" + [ -n "$(get_job_value "$job" "retries")" ] && args+=" --retries $(pq "$(get_job_value "$job" "retries")")" + # Health check options [ "$(get_job_value "$job" "health_check")" = "true" ] && args+=" --health-check" [ "$(get_job_value "$job" "health_check_after")" = "true" ] && args+=" --health-check-after" @@ -4143,6 +4149,10 @@ save_job() { [ "$STREAM" = true ] && args="$args --stream" [ "$STREAM_BUFFER" != 64 ] && args="$args --stream-buffer $STREAM_BUFFER" + # Transfer + [ -n "$BWLIMIT" ] && args="$args --bwlimit $(pq "$BWLIMIT")" + [ "$RETRIES" != 0 ] && args="$args --retries $RETRIES" + # Retention (GFS) if [ "$RETENTION" = true ]; then args="$args --retention"