From f9b523a93dca3b8b19cc179fc758012d87b5d742 Mon Sep 17 00:00:00 2001 From: Hedi Nasr Date: Thu, 17 Sep 2026 16:30:43 +0200 Subject: [PATCH] PREQ-8673: Increase legacy build-number migration buffer to 10000 v1 already published far more than 1000 numbers into Artifactory after the property snapshot. A 10000 gap keeps v2 from re-claiming those numbers during migration. --- get-build-number/get_build_number.sh | 2 +- spec/get_build_number_spec.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/get-build-number/get_build_number.sh b/get-build-number/get_build_number.sh index eb38f35a..13155b71 100755 --- a/get-build-number/get_build_number.sh +++ b/get-build-number/get_build_number.sh @@ -149,7 +149,7 @@ if [[ "$MAX_CLAIMED" -eq 0 ]]; then fi echo "Seeding from legacy build_number property: ${LEGACY_BUILD_NUMBER}" # 10# forces base-10: a leading-zero property value would otherwise be parsed as an (invalid) octal literal. - MAX_CLAIMED=$((10#$LEGACY_BUILD_NUMBER + 1000)) # buffer against the legacy property still advancing elsewhere during migration + MAX_CLAIMED=$((10#$LEGACY_BUILD_NUMBER + 10000)) # buffer against the legacy property still advancing elsewhere during migration fi fi fi diff --git a/spec/get_build_number_spec.sh b/spec/get_build_number_spec.sh index 8312a99c..86e70bfc 100755 --- a/spec/get_build_number_spec.sh +++ b/spec/get_build_number_spec.sh @@ -75,8 +75,8 @@ Describe 'get_build_number.sh' When run script get-build-number/get_build_number.sh The status should be success The output should include "Seeding from legacy build_number property: 42" - The output should include "Claimed build number 1043" - The contents of file "$BUILD_NUMBER_FILE" should equal "1043" + The output should include "Claimed build number 10043" + The contents of file "$BUILD_NUMBER_FILE" should equal "10043" End It 'should return an error if the legacy build number property is invalid'