Skip to content

Commit

Permalink
Fix Authentication Token Expiration Issue (#158)
Browse files Browse the repository at this point in the history
* fix timeout

* Change timeout to 10 minutes

---------

Co-authored-by: James Kwon <[email protected]>
  • Loading branch information
james03160927 and james03160927 authored Feb 2, 2025
1 parent ce43711 commit 09822a8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
1 change: 0 additions & 1 deletion node-pack-extract/cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ steps:
args:
- -c
- gcloud auth print-identity-token --audiences="$_REGISTRY_BACKEND_URL" | tee /workspace/token
waitFor: ["-"]

- name: "badouralix/curl-jq"
entrypoint: "sh"
Expand Down
4 changes: 1 addition & 3 deletions node-pack-extract/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,16 @@ set -e
init.sh &

# loop until we can extract the node information
TIMEOUT=${TIMEOUT:-3600}
TIMEOUT=${TIMEOUT:-600}
OUTPUTFILE=${1:-"/tmp/output.json"}
echo -n >"$OUTPUTFILE"
until cat "$OUTPUTFILE" | grep ''; do
sleep 1

echo "$SECONDS $TIMEOUT"
if ((SECONDS >= TIMEOUT)); then
jq -n '{success: false, reason: "timeout"}' | tee "$OUTPUTFILE"
break
fi
echo "here"

curl -sf localhost:8188/object_info |
jq -c '
Expand Down

0 comments on commit 09822a8

Please sign in to comment.