Skip to content

Commit

Permalink
Revert "Wait longer for bin/run-command log group to appear"
Browse files Browse the repository at this point in the history
This reverts commit 211485b. No need
for it since the problem was that the IAM Role didn't have permission to
read an SSM secret.
  • Loading branch information
tdooner committed Jun 28, 2024
1 parent 211485b commit ca8c75a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions bin/run-command.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ TASK_START_TIME_MILLIS=$((TASK_START_TIME * 1000))

AWS_ARGS=(
ecs run-task
--debug
--region="$CURRENT_REGION"
--cluster="$CLUSTER_NAME"
--task-definition="$TASK_DEFINITION_FAMILY"
Expand Down Expand Up @@ -141,13 +140,12 @@ echo " LOG_STREAM=$LOG_STREAM"
NUM_RETRIES_WAITIN_FOR_LOGS=0
while true; do
NUM_RETRIES_WAITIN_FOR_LOGS=$((NUM_RETRIES_WAITIN_FOR_LOGS+1))
if [ $NUM_RETRIES_WAITIN_FOR_LOGS -eq 120 ]; then
if [ $NUM_RETRIES_WAITIN_FOR_LOGS -eq 20 ]; then
echo "Timing out task $ECS_TASK_ID waiting for logs"
exit 1
fi
IS_LOG_STREAM_CREATED=$(aws logs describe-log-streams --no-cli-pager --log-group-name "$LOG_GROUP" --query "length(logStreams[?logStreamName==\`$LOG_STREAM\`])")
if [ "$IS_LOG_STREAM_CREATED" == "1" ]; then
echo "Found log stream after $((NUM_RETRIES_WAITIN_FOR_LOGS * 5)) seconds"
break
fi
sleep 5
Expand Down

0 comments on commit ca8c75a

Please sign in to comment.