Skip to content

Commit

Permalink
Also retry test cluster creation during GKE updates (knative#827)
Browse files Browse the repository at this point in the history
  • Loading branch information
adrcunha authored and knative-prow-robot committed May 24, 2019
1 parent 685d32d commit fb48156
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions scripts/e2e-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -257,11 +257,17 @@ function create_test_cluster_with_retries() {
kubetest "$@" ${geoflag}; } 2>&1 | tee ${cluster_creation_log}

# Exit if test succeeded
[[ "$(get_test_return_code)" == "0" ]] && return
# If test failed not because of cluster creation stockout, return
[[ -z "$(grep -Eio 'does not have enough resources available to fulfill' ${cluster_creation_log})" ]] && return
[[ "$(get_test_return_code)" == "0" ]] && return 0
# Retry if cluster creation failed because of:
# - stockout (https://github.com/knative/test-infra/issues/592)
# - latest GKE not available in this region/zone yet (https://github.com/knative/test-infra/issues/694)
[[ -z "$(grep -Fo 'does not have enough resources available to fulfill' ${cluster_creation_log})" \
&& -z "$(grep -Fo 'ResponseError: code=400, message=No valid versions with the prefix' ${cluster_creation_log})" ]] \
&& return 1
done
done
echo "No more region/zones to try, quitting"
return 1
}

# Setup the test cluster for running the tests.
Expand Down

0 comments on commit fb48156

Please sign in to comment.