-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
upgrade to latest dependencies (#471)
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/eventing a9151b5...7f1f49f: > 7f1f49f Knative port prefer header check test to rekt (# 6499) > f63a073 Knative containersource test to rekt (# 6507) > 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/hack 8d1e4cc...f9dc722: > f9dc722 Format go code (# 218) > 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/serving d79b8bb...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) bumping knative.dev/client 6d86bf7...59948bb: > 59948bb upgrade to latest dependencies (# 1730) > 6376f9a Add --scale-activation flag to match new Serving option (# 1729) > 794cdef upgrade to latest dependencies (# 1728) 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) Signed-off-by: Knative Automation <[email protected]> Signed-off-by: Knative Automation <[email protected]>
- Loading branch information
1 parent
015646f
commit 1843b3f
Showing
16 changed files
with
264 additions
and
84 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
go 1.18 | ||
|
||
use ( | ||
. | ||
schema | ||
test/e2e | ||
) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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,19 +746,18 @@ 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/[email protected].0 \ | ||
go_run github.com/google/[email protected].1 \ | ||
save "${dir}" --save_path="${dst}" --force || \ | ||
{ echo "--- FAIL: go-licenses failed to update licenses"; return 1; } | ||
} | ||
|
||
# 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/[email protected].0 \ | ||
go_run github.com/google/[email protected].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} | ||
|
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.