Skip to content

Commit 2b1e898

Browse files
[main] Upgrade to latest dependencies (#3346)
* upgrade to latest dependencies bumping knative.dev/hack 54d1312...504af4d: > 504af4d Add env var to pass extra flag to license check, parametrize tool versions (# 470) Signed-off-by: Knative Automation <automation@knative.team> * fix compiliation issue --------- Signed-off-by: Knative Automation <automation@knative.team> Co-authored-by: Dave Protasowski <dprotaso@gmail.com>
1 parent a395c10 commit 2b1e898

5 files changed

Lines changed: 19 additions & 11 deletions

File tree

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ require (
4646
k8s.io/gengo/v2 v2.0.0-20250922181213-ec3ebc5fd46b
4747
k8s.io/klog/v2 v2.130.1
4848
k8s.io/utils v0.0.0-20251002143259-bc988d571ff4
49-
knative.dev/hack v0.0.0-20260415233235-54d1312ccc91
49+
knative.dev/hack v0.0.0-20260416140237-504af4d2178f
5050
sigs.k8s.io/randfill v1.0.0
5151
sigs.k8s.io/yaml v1.6.0
5252
)

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,8 @@ k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912 h1:Y3gxNAuB0OBLImH611+UDZ
249249
k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912/go.mod h1:kdmbQkyfwUagLfXIad1y2TdrjPFWp2Q89B3qkRwf/pQ=
250250
k8s.io/utils v0.0.0-20251002143259-bc988d571ff4 h1:SjGebBtkBqHFOli+05xYbK8YF1Dzkbzn+gDM4X9T4Ck=
251251
k8s.io/utils v0.0.0-20251002143259-bc988d571ff4/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
252-
knative.dev/hack v0.0.0-20260415233235-54d1312ccc91 h1:YkboMEJ48h7DxRQSPe2SePm1yKK0YYgrsQW5Mmc0SEk=
253-
knative.dev/hack v0.0.0-20260415233235-54d1312ccc91/go.mod h1:L5RzHgbvam0u8QFHfzCX6MKxu/a/gIGEdaRBqNiVbl0=
252+
knative.dev/hack v0.0.0-20260416140237-504af4d2178f h1:YTht2cGdhd++kSrhwcDutWpk1V1bi0vKpAs0h4xIjpw=
253+
knative.dev/hack v0.0.0-20260416140237-504af4d2178f/go.mod h1:L5RzHgbvam0u8QFHfzCX6MKxu/a/gIGEdaRBqNiVbl0=
254254
pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw=
255255
pgregory.net/rapid v1.1.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04=
256256
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 h1:IpInykpT6ceI+QxKBbEflcR5EXP7sU1kvOlxwZh5txg=

test/logstream/v2/stream_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ func TestNamespaceStream(t *testing.T) {
215215
logFuncInvoked := make(chan string)
216216
t.Cleanup(func() { close(logFuncInvoked) })
217217
logFunc := func(format string, args ...interface{}) {
218-
logFuncInvoked <- fmt.Sprintf(format, args)
218+
logFuncInvoked <- fmt.Sprintf(format, args...)
219219
}
220220

221221
ctx, cancel := context.WithCancel(context.Background())

vendor/knative.dev/hack/library.sh

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,13 @@ if [[ ! -v GOPATH ]]; then
3535
fi
3636
fi
3737

38+
# Pinned tool versions
39+
readonly GUM_VERSION="v0.14.1"
40+
readonly GOTESTSUM_VERSION="v1.13.0"
41+
readonly GOTESTFMT_VERSION="v2.5.0"
42+
readonly TERMINAL_TO_HTML_VERSION="v3.10.0"
43+
readonly GO_LICENSES_VERSION="v2.0.1"
44+
3845
# Useful environment variables
3946
[[ -v PROW_JOB_ID ]] && IS_PROW=1 || IS_PROW=0
4047
readonly IS_PROW
@@ -265,7 +272,7 @@ function gum_banner() {
265272

266273
# Simple info banner for logging purposes.
267274
function gum_style() {
268-
go_run github.com/charmbracelet/gum@v0.14.1 style "$@"
275+
go_run "github.com/charmbracelet/gum@${GUM_VERSION}" style "$@"
269276
}
270277

271278
# Checks whether the given function exists.
@@ -588,7 +595,7 @@ function report_go_test() {
588595
logfile="${logfile/.xml/.jsonl}"
589596
echo "Running go test with args: ${go_test_args[*]}"
590597
local gotest_retcode=0
591-
go_run gotest.tools/gotestsum@v1.13.0 \
598+
go_run "gotest.tools/gotestsum@${GOTESTSUM_VERSION}" \
592599
--format "${GO_TEST_VERBOSITY:-testname}" \
593600
--junitfile "${xml}" \
594601
--junitfile-testsuite-name relative \
@@ -601,14 +608,14 @@ function report_go_test() {
601608
echo "Test log (JSONL) written to ${logfile}"
602609

603610
ansilog="${logfile/.jsonl/-ansi.log}"
604-
go_run github.com/gotesttools/gotestfmt/v2/cmd/gotestfmt@v2.5.0 \
611+
go_run "github.com/gotesttools/gotestfmt/v2/cmd/gotestfmt@${GOTESTFMT_VERSION}" \
605612
-input "${logfile}" \
606613
-showteststatus \
607614
-nofail > "$ansilog"
608615
echo "Test log (ANSI) written to ${ansilog}"
609616

610617
htmllog="${logfile/.jsonl/.html}"
611-
go_run github.com/buildkite/terminal-to-html/v3/cmd/terminal-to-html@v3.10.0 \
618+
go_run "github.com/buildkite/terminal-to-html/v3/cmd/terminal-to-html@${TERMINAL_TO_HTML_VERSION}" \
612619
--preview < "$ansilog" > "$htmllog"
613620
echo "Test log (HTML) written to ${htmllog}"
614621

@@ -921,13 +928,14 @@ function run_kntest() {
921928
}
922929

923930
# Run go-licenses to check for forbidden licenses.
931+
# Extra flags can be passed via the GO_LICENSES_FLAGS environment variable.
924932
function check_licenses() {
925933
# Pin GOTOOLCHAIN to the project's Go version so that go-licenses is
926934
# compiled with the same toolchain. GOTOOLCHAIN=auto (the go_run default)
927935
# may select a different Go, causing isStdLib() path mismatches.
928936
GOTOOLCHAIN="$(go env GOVERSION)" \
929-
go_run github.com/google/go-licenses/v2@v2.0.1 \
930-
check "${REPO_ROOT_DIR}/..." || \
937+
go_run "github.com/google/go-licenses/v2@${GO_LICENSES_VERSION}" \
938+
check ${GO_LICENSES_FLAGS:-} "${REPO_ROOT_DIR}/..." || \
931939
{ echo "--- FAIL: go-licenses failed the license check"; return 1; }
932940
}
933941

vendor/modules.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1068,7 +1068,7 @@ k8s.io/utils/lru
10681068
k8s.io/utils/net
10691069
k8s.io/utils/ptr
10701070
k8s.io/utils/trace
1071-
# knative.dev/hack v0.0.0-20260415233235-54d1312ccc91
1071+
# knative.dev/hack v0.0.0-20260416140237-504af4d2178f
10721072
## explicit; go 1.24
10731073
knative.dev/hack
10741074
# sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730

0 commit comments

Comments
 (0)