Skip to content

Commit e8a83b5

Browse files
authored
BUILD-9545 Fix: Remove typo 'I' in jitter calculation (#18)
Fix: Remove typo 'I' in jitter calculation The jitter calculation had a hardcoded 'I' character that caused bash arithmetic errors: local jitter=$((RANDOM % 3))I This resulted in values like '1I' or '2I' which are invalid for arithmetic operations. Fixed by removing the 'I': local jitter=$((RANDOM % 3)) This bug prevented proper retry logic and error reporting when OIDC token requests failed.
1 parent d92c2ec commit e8a83b5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/get-github-token.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ get_github_token() {
6969
# Exponential backoff with jitter
7070
if [[ $attempt -lt $MAX_ATTEMPTS ]]; then
7171
local base_wait=$((2 ** attempt))
72-
local jitter=$((RANDOM % 3))I
72+
local jitter=$((RANDOM % 3))
7373
local wait_time=$((base_wait + jitter))
7474
log_warning "Retrying in ${wait_time}s..."
7575
sleep "$wait_time"

0 commit comments

Comments
 (0)