Skip to content

Commit 64990bc

Browse files
sntiwari1claude
andcommitted
Fix infinite loop in wait_for_port.sh and keycloak healthcheck race
1. wait_for_port.sh used [[ ]] (bash) but Makefile calls it via 'sh' (dash on Ubuntu). The counter never triggered exit, looping forever for 6h until GH Actions timeout. Fixed: use POSIX [ ] syntax. 2. Keycloak healthcheck tested management port 9990 (up in ~10s) but the HTTP server on 8080 takes ~29s. Registry started before 8080 was ready, failed to fetch OIDC config, crashed. Fixed: test 8080. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 64fc728 commit 64990bc

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

build/wait_for_port.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ i=0
55
while ! curl localhost:$1; do
66
sleep 10
77
((i=i+1))
8-
if [[ $i -gt 60 ]]; then
8+
if [ "$i" -gt 60 ]; then
99
echo "Failed to get the service in sane state!"
1010
exit 1;
1111
fi

docker-compose-v1.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ services:
145145
- KEYCLOAK_IMPORT=/opt/jboss/keycloak/imports/realm-export.json
146146
- PROXY_ADDRESS_FORWARDING=true
147147
healthcheck:
148-
test: ['CMD-SHELL', 'curl -f http://localhost:9990/ || exit 1']
148+
test: ['CMD-SHELL', 'curl -f http://localhost:8080/auth/ || exit 1']
149149
interval: 30s
150150
timeout: 10s
151151
retries: 10

0 commit comments

Comments
 (0)