Skip to content

Commit

Permalink
upgrade to latest dependencies (#2345)
Browse files Browse the repository at this point in the history
bumping knative.dev/hack 29f86c2...96aac1c:
  > 96aac1c Add wait_until_object_exists library function (# 96)

Signed-off-by: Knative Automation <[email protected]>
  • Loading branch information
knative-automation authored Nov 9, 2021
1 parent 3cc697a commit 91d1932
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 4 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@ require (
k8s.io/code-generator v0.21.4
k8s.io/gengo v0.0.0-20210915205010-39e73c8a59cd
k8s.io/klog v1.0.0
knative.dev/hack v0.0.0-20211105231158-29f86c2653b5
knative.dev/hack v0.0.0-20211108170701-96aac1c30be3
sigs.k8s.io/yaml v1.3.0
)
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1136,8 +1136,8 @@ k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7 h1:vEx13qjvaZ4yfObSSXW7Br
k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7/go.mod h1:wXW5VT87nVfh/iLV8FpR2uDvrFyomxbtb1KivDbvPTE=
k8s.io/utils v0.0.0-20201110183641-67b214c5f920 h1:CbnUZsM497iRC5QMVkHwyl8s2tB3g7yaSHkYPkpgelw=
k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
knative.dev/hack v0.0.0-20211105231158-29f86c2653b5 h1:9scsqLnVcUh6wnMY0vYo8MGBy1NAkjpjoukyhhkChU4=
knative.dev/hack v0.0.0-20211105231158-29f86c2653b5/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
knative.dev/hack v0.0.0-20211108170701-96aac1c30be3 h1:oSvRgnKoU308k7aXbPV3iL5Zh5kBGM2Ptar4hyeda+A=
knative.dev/hack v0.0.0-20211108170701-96aac1c30be3/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
pgregory.net/rapid v0.3.3 h1:jCjBsY4ln4Atz78QoBWxUEvAHaFyNDQg9+WU62aCn1U=
pgregory.net/rapid v0.3.3/go.mod h1:UYpPVyjFHzYBGHIxLFoupi8vwk6rXNzRY9OMvVxFIOU=
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
Expand Down
26 changes: 26 additions & 0 deletions vendor/knative.dev/hack/library.sh
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,32 @@ function wait_until_object_does_not_exist() {
return 1
}

# Waits until the given object exists.
# Parameters: $1 - the kind of the object.
# $2 - object's name.
# $3 - namespace (optional).
function wait_until_object_exists() {
local KUBECTL_ARGS="get $1 $2"
local DESCRIPTION="$1 $2"

if [[ -n $3 ]]; then
KUBECTL_ARGS="get -n $3 $1 $2"
DESCRIPTION="$1 $3/$2"
fi
echo -n "Waiting until ${DESCRIPTION} exists"
for i in {1..150}; do # timeout after 5 minutes
if kubectl ${KUBECTL_ARGS} > /dev/null 2>&1; then
echo -e "\n${DESCRIPTION} exists"
return 0
fi
echo -n "."
sleep 2
done
echo -e "\n\nERROR: timeout waiting for ${DESCRIPTION} to exist"
kubectl ${KUBECTL_ARGS}
return 1
}

# Waits until all pods are running in the given namespace.
# This function handles some edge cases that `kubectl wait` does not support,
# and it provides nice debug info on the state of the pod if it failed,
Expand Down
2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1019,7 +1019,7 @@ k8s.io/utils/buffer
k8s.io/utils/integer
k8s.io/utils/pointer
k8s.io/utils/trace
# knative.dev/hack v0.0.0-20211105231158-29f86c2653b5
# knative.dev/hack v0.0.0-20211108170701-96aac1c30be3
## explicit
knative.dev/hack
# sigs.k8s.io/structured-merge-diff/v4 v4.1.2
Expand Down

0 comments on commit 91d1932

Please sign in to comment.