upgrade to latest dependencies (#680)

bumping knative.dev/hack 103cdb3...7556452:
  > 7556452 🎁 Use modscope tool to get info about Go modules (# 223)

Signed-off-by: Knative Automation <automation@knative.team>

Signed-off-by: Knative Automation <automation@knative.team>
This commit is contained in:
knative-automation 2022-09-13 10:00:47 -04:00 committed by GitHub
parent 8bbae3ecf8
commit 7c9fb2c232
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 37 additions and 24 deletions

2
go.mod
View File

@ -11,7 +11,7 @@ require (
k8s.io/client-go v0.24.4
k8s.io/code-generator v0.24.4
k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42
knative.dev/hack v0.0.0-20220912134332-103cdb35f0d3
knative.dev/hack v0.0.0-20220913095247-7556452c2b54
knative.dev/pkg v0.0.0-20220912181545-3d24b8416bb4
)

4
go.sum
View File

@ -862,8 +862,8 @@ k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42/go.mod h1:Z/45zLw8lUo4wdi
k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 h1:HNSDgDCrr/6Ly3WEGKZftiE7IY19Vz2GdbOCyI4qqhc=
k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
knative.dev/hack v0.0.0-20220912134332-103cdb35f0d3 h1:ulW0QnBP/R4ZVNcvRLSFQ20HKXU3CMeF/VfFZ7/EHhs=
knative.dev/hack v0.0.0-20220912134332-103cdb35f0d3/go.mod h1:yk2OjGDsbEnQjfxdm0/HJKS2WqTLEFg/N6nUs6Rqx3Q=
knative.dev/hack v0.0.0-20220913095247-7556452c2b54 h1:JycKYjjK9+noO3IWvRES6gW65SMUf/efNhaXRqh3u+A=
knative.dev/hack v0.0.0-20220913095247-7556452c2b54/go.mod h1:yk2OjGDsbEnQjfxdm0/HJKS2WqTLEFg/N6nUs6Rqx3Q=
knative.dev/pkg v0.0.0-20220912181545-3d24b8416bb4 h1:EgtUQKs9Jn2w5+hyOTdxYtpORq53rsQBeOXE+99pWjE=
knative.dev/pkg v0.0.0-20220912181545-3d24b8416bb4/go.mod h1:UAUzJdWQbFz1bQh8YhKBFI0mVw12m/7cL37kANQf1Rs=
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=

View File

@ -54,6 +54,7 @@ function go_test_e2e() {
# Setup the test cluster for running the tests.
function setup_test_cluster() {
(
# Fail fast during setup.
set -o errexit
set -o pipefail
@ -108,6 +109,7 @@ function setup_test_cluster() {
if function_exists test_setup; then
test_setup || fail_test "test setup failed"
fi
)
}
# Signal (as return code and in the logs) that all E2E tests passed.

View File

@ -3,5 +3,5 @@ go 1.18
use (
.
schema
test/e2e
test
)

View File

@ -1,2 +1,12 @@
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd h1:O7DYs+zxREGLKzKoMQrtrEacpb0ZVXA5rIwylE2Xchk=
golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
k8s.io/apimachinery v0.20.6 h1:R5p3SlhaABYShQSO6LpPsYHjV05Q+79eBUR0Ut/f4tk=
k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8=
k8s.io/klog/v2 v2.4.0 h1:7+X0fUguPyrKEC4WjH8iGDg3laWgMo5tMnRTIGTTxGQ=
sigs.k8s.io/structured-merge-diff v1.0.1-0.20191108220359-b1b620dd3f06 h1:zD2IemQ4LmOcAumeiyDWXKUI2SO0NYDe3H6QGvPOVgU=
sigs.k8s.io/structured-merge-diff/v4 v4.0.3 h1:4oyYo8NREp49LBBhKxEqCulFjg26rawYKrnCmg+Sr6c=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=

View File

@ -133,5 +133,7 @@ function create_gke_test_cluster() {
if [[ "${ENABLE_PREEMPTIBLE_NODES:-}" == "true" ]]; then
extra_gcloud_flags="${extra_gcloud_flags} --preemptible"
fi
run_kntest kubetest2 gke "${_custom_flags[@]}" --test-command="${_test_command[*]}" --extra-gcloud-flags="${extra_gcloud_flags}"
run_kntest kubetest2 gke "${_custom_flags[@]}" \
--test-command="${_test_command[*]}" \
--extra-gcloud-flags="${extra_gcloud_flags}"
}

View File

@ -659,9 +659,8 @@ function foreach_go_module() {
local failed=0
local -r cmd="$1"
shift
local gomod_filepath gomod_dir
while read -r gomod_filepath; do
gomod_dir="$(dirname "$gomod_filepath")"
local gomod_dir
while read -r gomod_dir; do
pushd "$gomod_dir" > /dev/null
"$cmd" "$@" || failed=$?
popd > /dev/null
@ -669,7 +668,7 @@ function foreach_go_module() {
echo "Command '${cmd}' failed in module $gomod_dir: $failed" >&2
return $failed
fi
done < <(find . -name go.mod -type f ! -path "*/vendor/*" ! -path "*/third_party/*")
done < <(go_run knative.dev/test-infra/tools/modscope@latest ls -p)
}
# Update go deps.
@ -766,7 +765,7 @@ function __go_update_deps_for_module() {
# Intended to be used like:
# export MODULE_NAME=$(go_mod_module_name)
function go_mod_module_name() {
grep -E '^module ' go.mod | cut -d' ' -f2
go_run knative.dev/test-infra/tools/modscope@latest current
}
# Return a GOPATH to a temp directory. Works around the out-of-GOPATH issues

View File

@ -139,15 +139,14 @@ function __build_test_runner_for_module() {
# Don't merge these two lines, or return code will always be 0.
# Get all build tags in go code (ignore /vendor, /hack and /third_party)
local tags
tags="$(grep -I -r '// +build' . | \
grep -v '/vendor/' | \
tags="$(grep -I -r '// +build' . | grep -v '/vendor/' | \
grep -v '/hack/' | \
grep -v '/third_party' | \
cut -f3 -d' ' | \
tr ',' '\n' | \
sort | uniq | \
grep -v '^!' | \
tr '\n' ' ')"
paste -s -d, /dev/stdin)"
local go_pkg_dirs
go_pkg_dirs="$(go list -tags "${tags}" ./...)" || return $?
if [[ -z "${go_pkg_dirs}" ]]; then
@ -241,13 +240,14 @@ function run_integration_tests() {
function default_integration_test_runner() {
local failed=0
while IFS= read -r e2e_test; do
echo "Running integration test ${e2e_test}"
if ! ${e2e_test}; then
failed=1
step_failed "${e2e_test}"
while read -r e2e_test; do
subheader "Running integration test ${e2e_test}"
"${e2e_test}" || failed=$?
if (( failed )); then
echo "${e2e_test} failed: $failed" >&2
return $failed
fi
done < <(find test/ ! -name "$(printf "*\n*")" -name "e2e-*tests.sh" -maxdepth 1)
done < <(find test/ -maxdepth 1 ! -name "$(printf "*\n*")" -name "e2e-*tests.sh")
return ${failed}
}
@ -355,18 +355,18 @@ function main() {
exit 0
fi
for test_to_run in "${TESTS_TO_RUN[@]}"; do
${test_to_run} || { failed=1; step_failed "${test_to_run}"; }
${test_to_run} || { failed=$?; step_failed "${test_to_run}"; }
done
fi
run_build_tests || { failed=1; step_failed "run_build_tests"; }
run_build_tests || { failed=$?; step_failed "run_build_tests"; }
# If PRESUBMIT_TEST_FAIL_FAST is set to true, don't run unit tests if build tests failed
if (( ! PRESUBMIT_TEST_FAIL_FAST )) || (( ! failed )); then
run_unit_tests || { failed=1; step_failed "run_unit_tests"; }
run_unit_tests || { failed=$?; step_failed "run_unit_tests"; }
fi
# If PRESUBMIT_TEST_FAIL_FAST is set to true, don't run integration tests if build/unit tests failed
if (( ! PRESUBMIT_TEST_FAIL_FAST )) || (( ! failed )); then
run_integration_tests || { failed=1; step_failed "run_integration_tests"; }
run_integration_tests || { failed=$?; step_failed "run_integration_tests"; }
fi
exit ${failed}

2
vendor/modules.txt vendored
View File

@ -684,7 +684,7 @@ k8s.io/utils/internal/third_party/forked/golang/net
k8s.io/utils/net
k8s.io/utils/strings/slices
k8s.io/utils/trace
# knative.dev/hack v0.0.0-20220912134332-103cdb35f0d3
# knative.dev/hack v0.0.0-20220913095247-7556452c2b54
## explicit; go 1.18
knative.dev/hack
# knative.dev/pkg v0.0.0-20220912181545-3d24b8416bb4