upgrade to latest dependencies (#1730)

bumping knative.dev/pkg 4a03844...93b66e6:
  > 93b66e6 Update: report stats for request (# 2584)
  > a650186 Make request body available in admission context (# 2583)
  > a6afcab Fix # 2115, allow selective verbs / subresources for webhooks. (# 2547)
  > da71919 split warnings. Fix issue: 2581 (# 2582)
  > 0a3c1d6 upgrade to latest dependencies (# 2580)
  > 5fbe0c3 upgrade to latest dependencies (# 2579)
  > 2f06d64 Update community files (# 2578)
  > 2e08ca6 WaitForServiceEndpoints doesn't take into account not found endpoint (# 2576)
  > 766f70d fix double close of channel (# 2574)
bumping knative.dev/hack 8d1e4cc...664eac5:
  > 664eac5 Fixing go.mod foreach (# 217)
  > 97fd663 🎁 Support multiple Golang modules in a single project (# 205)
  > f472a96 fix go run invocation of github hub cli (# 212)
  > 7d3bed1 go run... (# 210)
  > e81d63a Update community files (# 209)
bumping knative.dev/eventing a9151b5...e1866d7:
  > e1866d7 Knative trigger dependency annotations test to rekt (# 6506)
  > ceaae24 We always have v1 ConfigMaps... (# 6502)
  > db235e7 upgrade to latest dependencies (# 6494)
bumping knative.dev/networking e51df7c...215bac9:
  > 215bac9 httpproxy test image can setup TLS client with CA certs (# 708)
  > 7c9b49e upgrade to latest dependencies (# 707)
  > dba99c4 upgrade to latest dependencies (# 706)
  > 9d28d41 Update community files (# 705)
  > 99830de upgrade to latest dependencies (# 704)
bumping knative.dev/serving 9402a71...62685b3:
  > 62685b3 upgrade to latest dependencies (# 13272)
  > ab56cfe Update net-kourier nightly (# 13273)
  > 6d3d676 Tests for encryption with Kourier local gateway (# 13263)
  > 3e07846 Update net-contour nightly (# 13268)
  > f43692b Update net-kourier nightly (# 13269)
  > 85d2eee Update net-gateway-api nightly (# 13267)
  > 89469ad Update net-certmanager nightly (# 13266)
  > 84be423 add e2e test for timeout with websocket (# 13232)
  > 4fc7743 Add timeout handler to activator to respect the revision timeouts (# 13261)
  > e9df8d9 Update net-kourier nightly (# 13264)
  > f517a90 Update net-istio nightly (# 13253)
  > 39f30aa Update net-gateway-api nightly (# 13251)
  > 79232f4 Update net-certmanager nightly (# 13249)
  > 17a970f Update net-kourier nightly (# 13250)
  > b7075ab Update net-contour nightly (# 13252)
  > b36de60 revision request start timeout should default to revision timeout second (# 13255)

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-06 07:44:42 -04:00 committed by GitHub
parent 6376f9a607
commit 59948bb372
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 113 additions and 48 deletions

10
go.mod
View File

@ -21,11 +21,11 @@ require (
k8s.io/cli-runtime v0.23.4
k8s.io/client-go v0.23.9
k8s.io/code-generator v0.23.9
knative.dev/eventing v0.34.1
knative.dev/hack v0.0.0-20220823140917-8d1e4ccf9dc3
knative.dev/networking v0.0.0-20220818010248-e51df7cdf571
knative.dev/pkg v0.0.0-20220818004048-4a03844c0b15
knative.dev/serving v0.34.1
knative.dev/eventing v0.34.1-0.20220902060017-e1866d7660ee
knative.dev/hack v0.0.0-20220902220419-664eac5c391e
knative.dev/networking v0.0.0-20220831065816-215bac90b28b
knative.dev/pkg v0.0.0-20220826162920-93b66e6a8700
knative.dev/serving v0.34.1-0.20220905171742-62685b3b4a5a
sigs.k8s.io/yaml v1.3.0
)

20
go.sum
View File

@ -1318,16 +1318,16 @@ k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/
k8s.io/utils v0.0.0-20211116205334-6203023598ed/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/eventing v0.34.1 h1:r6QuQmDCmmSANdTRLdbKb6YcYaJoeNpEuFfS8Bq0ZgQ=
knative.dev/eventing v0.34.1/go.mod h1:6UnNnPrEUNAM9PfCpf7L8N7G/1vq+HQlpOjzndY6ryw=
knative.dev/hack v0.0.0-20220823140917-8d1e4ccf9dc3 h1:umaeMRecA0g5g48L9tnEAkTBIitr9eKWMyJYo9YttAA=
knative.dev/hack v0.0.0-20220823140917-8d1e4ccf9dc3/go.mod h1:t/azP8I/Cygaw+87O7rkAPrNRjCelmtfSzWzu/9TM7I=
knative.dev/networking v0.0.0-20220818010248-e51df7cdf571 h1:Lu/TsJjxg1p+2CMr2LNHEdEFBNHYjDoZv2f1QZoM8jg=
knative.dev/networking v0.0.0-20220818010248-e51df7cdf571/go.mod h1:m3ataWRwmbHjOY9sCFvcDWRNLVITxVl0fH0RxdCa4jE=
knative.dev/pkg v0.0.0-20220818004048-4a03844c0b15 h1:GNmzHVaUo3zoi/wtIN71LPQaWy6DdoYzmb+GIq2s4fw=
knative.dev/pkg v0.0.0-20220818004048-4a03844c0b15/go.mod h1:YLjXbkQLlGHok+u0FLfMbBHFzY9WGu3GHhnrptoAy8I=
knative.dev/serving v0.34.1 h1:AKZk/oEWrtVrllTlp5L6uSX9sfJg5aERUtWeXMv8g2E=
knative.dev/serving v0.34.1/go.mod h1:IyfedOBq3KzcD5dZONjbix2BfS0jOwDq5td8UE9CjCk=
knative.dev/eventing v0.34.1-0.20220902060017-e1866d7660ee h1:sLpUumwYFWNXJ8odWlqL1YojHIWkzJq7vbkx8C90G2Y=
knative.dev/eventing v0.34.1-0.20220902060017-e1866d7660ee/go.mod h1:6UnNnPrEUNAM9PfCpf7L8N7G/1vq+HQlpOjzndY6ryw=
knative.dev/hack v0.0.0-20220902220419-664eac5c391e h1:9l6GKXiwXuiU8z7/AQIF6oBFISu8geBVQltjKshh+fk=
knative.dev/hack v0.0.0-20220902220419-664eac5c391e/go.mod h1:yk2OjGDsbEnQjfxdm0/HJKS2WqTLEFg/N6nUs6Rqx3Q=
knative.dev/networking v0.0.0-20220831065816-215bac90b28b h1:NhaGPmanHDyWMsl/LudsCmTMcdEEjZFk3qkSIUOW9Jw=
knative.dev/networking v0.0.0-20220831065816-215bac90b28b/go.mod h1:vMMT540KNAh6TWmpGEFnExTxJ/j9cee5qNV7Bs0kzUk=
knative.dev/pkg v0.0.0-20220826162920-93b66e6a8700 h1:6xjS69vf5Pbwu+dWckqPALmm5pc3p0/XScPpRBhugRc=
knative.dev/pkg v0.0.0-20220826162920-93b66e6a8700/go.mod h1:WIQZyPTLzT+z0V3/gB91aWugIi3E1mkU9rjCrLfjOwY=
knative.dev/serving v0.34.1-0.20220905171742-62685b3b4a5a h1:GT7gPwH4JkKScyZBKwNpE2w4hPDbbVFG66iZWbTxI4M=
knative.dev/serving v0.34.1-0.20220905171742-62685b3b4a5a/go.mod h1:F1+qPPtn78vmrDdOoOsapHEOCzVqRcmDcFFJolWVuE0=
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=

7
vendor/knative.dev/hack/go.work vendored Normal file
View File

@ -0,0 +1,7 @@
go 1.18
use (
.
schema
test/e2e
)

View File

@ -97,7 +97,7 @@ function patch_version() {
# Print error message and exit 1
# Parameters: $1..$n - error message to be displayed
function abort() {
echo "error: $*"
echo "error: $*" >&2
exit 1
}
@ -126,7 +126,7 @@ function subheader() {
# Simple warning banner for logging purposes.
function warning() {
make_banner "!" "$1"
make_banner '!' "$*" >&2
}
# Checks whether the given function exists.
@ -567,7 +567,6 @@ function go_run() {
export GORUN_PATH
GOPATH="${GORUN_PATH}" \
GOFLAGS='' \
GO111MODULE='' \
go run "$package" "$@"
}
@ -577,6 +576,7 @@ function go_run() {
# $3..$n - parameters passed to the tool.
# Deprecated: use go_run instead
function run_go_tool() {
warning 'The "run_go_tool" function is deprecated. Use "go_run" instead.'
local package=$1
# If no `@version` is provided, default to adding `@latest`
if [[ "$package" != *@* ]]; then
@ -601,6 +601,26 @@ function add_trap {
done
}
# Run a command, described by $1, for every go module in the project.
# Parameters: $1 - Description of the command being run,
# $2 - $n - Arguments to pass to the command.
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")"
pushd "$gomod_dir" > /dev/null
"$cmd" "$@" || failed=$?
popd > /dev/null
if (( failed )); then
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/*")
}
# Update go deps.
# Parameters (parsed as flags):
# "--upgrade", bool, do upgrade.
@ -613,14 +633,18 @@ function add_trap {
# global env var: FLOATING_DEPS
# --upgrade will set GOPROXY to direct unless it is already set.
function go_update_deps() {
cd "${REPO_ROOT_DIR}" || return 1
foreach_go_module __go_update_deps_for_module "$@"
}
function __go_update_deps_for_module() {
( # do not modify the environment
set -Eeuo pipefail
export GO111MODULE=on
export GOFLAGS=""
export GONOSUMDB="${GONOSUMDB:-},knative.dev/*"
export GONOPROXY="${GONOPROXY:-},knative.dev/*"
echo "=== Update Deps for Golang"
echo "=== Update Deps for Golang module: $(go_mod_module_name)"
local UPGRADE=0
local RELEASE="v9000.1" # release v9000 is so far in the future, it will always pick the default branch.
@ -646,7 +670,7 @@ function go_update_deps() {
else
group "Upgrading to release ${RELEASE}"
fi
FLOATING_DEPS+=( $(go_run knative.dev/test-infra/buoy@latest float ${REPO_ROOT_DIR}/go.mod "${buoyArgs[@]}") )
FLOATING_DEPS+=( $(go_run knative.dev/test-infra/buoy@latest float ./go.mod "${buoyArgs[@]}") )
if [[ ${#FLOATING_DEPS[@]} > 0 ]]; then
echo "Floating deps to ${FLOATING_DEPS[@]}"
go get -d ${FLOATING_DEPS[@]}
@ -664,6 +688,9 @@ function go_update_deps() {
go mod vendor 2>&1 | grep -v "ignoring symlink" || true
eval "$orig_pipefail_opt"
if ! [ -d vendor ]; then
return 0
fi
group "Removing unwanted vendor files"
# Remove unwanted vendor files
@ -680,13 +707,15 @@ function go_update_deps() {
group "Removing broken symlinks"
remove_broken_symlinks ./vendor
)
}
# Return the go module name of the current module.
# Intended to be used like:
# export MODULE_NAME=$(go_mod_module_name)
function go_mod_module_name() {
go mod graph | cut -d' ' -f 1 | grep -v '@' | head -1
grep -E '^module ' go.mod | cut -d' ' -f2
}
# Return a GOPATH to a temp directory. Works around the out-of-GOPATH issues
@ -717,11 +746,10 @@ function run_kntest() {
# Parameters: $1 - output file, relative to repo root dir.
# $2 - directory to inspect.
function update_licenses() {
cd "${REPO_ROOT_DIR}" || return 1
local dst=$1
local dir=$2
shift
go_run github.com/google/go-licenses@v1.2.0 \
go_run github.com/google/go-licenses@v1.2.1 \
save "${dir}" --save_path="${dst}" --force || \
{ echo "--- FAIL: go-licenses failed to update licenses"; return 1; }
}
@ -729,7 +757,7 @@ function update_licenses() {
# Run go-licenses to check for forbidden licenses.
function check_licenses() {
# Check that we don't have any forbidden licenses.
go_run github.com/google/go-licenses@v1.2.0 \
go_run github.com/google/go-licenses@v1.2.1 \
check "${REPO_ROOT_DIR}/..." || \
{ echo "--- FAIL: go-licenses failed the license check"; return 1; }
}
@ -762,7 +790,7 @@ function is_protected_project() {
# Remove symlinks in a path that are broken or lead outside the repo.
# Parameters: $1 - path name, e.g. vendor
function remove_broken_symlinks() {
for link in $(find $1 -type l); do
for link in $(find "$1" -type l); do
# Remove broken symlinks
if [[ ! -e ${link} ]]; then
unlink ${link}

View File

@ -122,7 +122,12 @@ function report_build_test() {
# * `go build` on the entire repo
# * check licenses in all go packages
function default_build_test_runner() {
foreach_go_module __build_test_runner_for_module
}
function __build_test_runner_for_module() {
local failed=0
subheader "Build tests for $(go_mod_module_name)"
# Run verify-codegen check
if [[ -f ./hack/verify-codegen.sh ]]; then
subheader "Checking autogenerated code is up-to-date"
@ -132,18 +137,26 @@ function default_build_test_runner() {
# verify-codegen (as md files can be auto-generated in some repos).
(( IS_DOCUMENTATION_PR )) && return ${failed}
# Don't merge these two lines, or return code will always be 0.
local go_pkg_dirs
go_pkg_dirs="$(go list ./...)" || return 1
# Skip build test if there is no go code
[[ -z "${go_pkg_dirs}" ]] && return ${failed}
# Ensure all the code builds
subheader "Checking that go code builds"
# Get all build tags in go code (ignore /vendor, /hack and /third_party)
local tags
tags="$(find . \
-path './vendor' -prune -o -path './hack' -prune -o -path './third_party' -prune \
-o -type f -name '*.go' -exec grep '// +build' {} + \
| cut -f3 -d' ' | tr ',' '\n' | uniq | sort | tr '\n' ' ')"
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' ' ')"
local go_pkg_dirs
go_pkg_dirs="$(go list -tags "${tags}" ./...)" || return $?
if [[ -z "${go_pkg_dirs}" ]]; then
subheader "No golang code found, skipping build tests"
return 0
fi
# Ensure all the code builds
subheader "Checking that go code builds"
report_build_test Build_Go \
go test -vet=off -tags "${tags}" -exec echo ./... || failed=2
@ -185,6 +198,11 @@ function run_unit_tests() {
# Default unit test runner that runs all go tests in the repo.
function default_unit_test_runner() {
foreach_go_module __unit_test_runner_for_module
}
function __unit_test_runner_for_module() {
subheader "Unit tests for $(go_mod_module_name)"
report_go_test -short -race -count 1 ./...
}

View File

@ -34,6 +34,7 @@ import (
"k8s.io/apimachinery/pkg/util/wait"
"k8s.io/client-go/kubernetes"
k8styped "k8s.io/client-go/kubernetes/typed/core/v1"
"knative.dev/pkg/test/logging"
)
@ -141,6 +142,9 @@ func WaitForServiceEndpoints(ctx context.Context, client kubernetes.Interface, s
waitErr := wait.PollImmediate(interval, podTimeout, func() (bool, error) {
var err error
endpoints, err = endpointsService.Get(ctx, svcName, metav1.GetOptions{})
if apierrs.IsNotFound(err) {
return false, nil
}
if err != nil {
return false, err
}

View File

@ -307,6 +307,10 @@ function install() {
YTT_FILES+=("${REPO_ROOT_DIR}/test/config/resource-quota/resource-quota.yaml")
fi
if (( ENABLE_TLS )); then
YTT_FILES+=("${REPO_ROOT_DIR}/test/config/tls/cert-secret.yaml")
fi
local ytt_result=$(mktemp)
local ytt_post_install_result=$(mktemp)
local ytt_flags=""
@ -360,11 +364,15 @@ function install() {
if (( ENABLE_TLS )); then
echo "Patch to config-network to enable internal encryption"
kubectl patch configmap/config-network \
-n ${SYSTEM_NAMESPACE} \
--type merge \
-p '{"data":{"internal-encryption":"true"}}'
toggle_feature internal-encryption true config-network
if [[ "$INGRESS_CLASS" == "kourier.ingress.networking.knative.dev" ]]; then
echo "Point Kourier local gateway to custom server certificates"
toggle_feature cluster-cert-secret server-certs config-kourier
# This needs to match the name of Secret in test/config/tls/cert-secret.yaml
export CA_CERT=ca-cert
# This needs to match $san from test/config/tls/generate.sh
export SERVER_NAME=knative.dev
fi
echo "Restart activator to mount the certificates"
kubectl delete pod -n ${SYSTEM_NAMESPACE} -l app=activator
kubectl wait --timeout=60s --for=condition=Available deployment -n ${SYSTEM_NAMESPACE} activator

12
vendor/modules.txt vendored
View File

@ -902,7 +902,7 @@ k8s.io/utils/lru
k8s.io/utils/net
k8s.io/utils/pointer
k8s.io/utils/trace
# knative.dev/eventing v0.34.1
# knative.dev/eventing v0.34.1-0.20220902060017-e1866d7660ee
## explicit; go 1.18
knative.dev/eventing/pkg/apis/config
knative.dev/eventing/pkg/apis/duck
@ -930,10 +930,10 @@ knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1
knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1/fake
knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1beta2
knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1beta2/fake
# knative.dev/hack v0.0.0-20220823140917-8d1e4ccf9dc3
## explicit; go 1.17
# knative.dev/hack v0.0.0-20220902220419-664eac5c391e
## explicit; go 1.18
knative.dev/hack
# knative.dev/networking v0.0.0-20220818010248-e51df7cdf571
# knative.dev/networking v0.0.0-20220831065816-215bac90b28b
## explicit; go 1.18
knative.dev/networking/pkg
knative.dev/networking/pkg/apis/networking
@ -948,7 +948,7 @@ knative.dev/networking/pkg/http/probe
knative.dev/networking/pkg/http/proxy
knative.dev/networking/pkg/http/stats
knative.dev/networking/pkg/k8s
# knative.dev/pkg v0.0.0-20220818004048-4a03844c0b15
# knative.dev/pkg v0.0.0-20220826162920-93b66e6a8700
## explicit; go 1.18
knative.dev/pkg/apis
knative.dev/pkg/apis/duck
@ -998,7 +998,7 @@ knative.dev/pkg/tracing/config
knative.dev/pkg/tracing/propagation
knative.dev/pkg/tracing/propagation/tracecontextb3
knative.dev/pkg/tracker
# knative.dev/serving v0.34.1
# knative.dev/serving v0.34.1-0.20220905171742-62685b3b4a5a
## explicit; go 1.18
knative.dev/serving/pkg/apis/autoscaling
knative.dev/serving/pkg/apis/autoscaling/v1alpha1