Integration tests wait for external IP of knative-ingressgateway.#1427
Merged
google-prow-robot merged 2 commits intoknative:masterfrom Jun 29, 2018
Merged
Integration tests wait for external IP of knative-ingressgateway.#1427google-prow-robot merged 2 commits intoknative:masterfrom
google-prow-robot merged 2 commits intoknative:masterfrom
Conversation
mattmoor
approved these changes
Jun 29, 2018
Contributor
|
/lgtm |
adrcunha
reviewed
Jun 29, 2018
| local pods="$(kubectl get pods -n $1 2>/dev/null | grep -v NAME)" | ||
| local not_running=$(echo "${pods}" | grep -v Running | wc -l) | ||
| if [[ -n "${pods}" && ${not_running} == 0 ]]; then | ||
| if [[ -n "${pods}" && -z ${has_pending} ]]; then |
Contributor
There was a problem hiding this comment.
Better put "${has_pending}" in quotes to avoid surprises with spaces.
| echo -n "Waiting until all pods in namespace $1 are up" | ||
| local ns=$1 | ||
| for i in {1..150}; do # timeout after 5 minutes | ||
| local has_pending=$(kubectl get pods -n $ns -o jsonpath='{.items[*].status.phase}' | grep Pending) |
Contributor
There was a problem hiding this comment.
Better put "$(...)" in quotes to avoid surprises with spaces.
| return 1 | ||
| } | ||
|
|
||
| # Waits until the given service has an external IP address. |
Contributor
There was a problem hiding this comment.
You need 2 parameters in this function, I suggest documenting $1 and $2 just like line 80, for example.
Member
|
/hold |
Contributor
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: adrcunha, mattmoor, tcnghia The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In #1228 we added a new service
knative-ingressgatewaythat we will use the external IP address to receive all our ingress traffic.However, in the test I did not add a wait time for this IP address to come up. This PR will fix that.
In addition to that I notice that Pods in the
Completedstate will affect our logic inwait_for_running_pods. Fixing that also in this PR.