diff --git a/go.mod b/go.mod index d26fa15d39..dcbf3739b2 100644 --- a/go.mod +++ b/go.mod @@ -46,7 +46,7 @@ require ( k8s.io/gengo/v2 v2.0.0-20250922181213-ec3ebc5fd46b k8s.io/klog/v2 v2.130.1 k8s.io/utils v0.0.0-20251002143259-bc988d571ff4 - knative.dev/hack v0.0.0-20260415132636-9909d690ab4d + knative.dev/hack v0.0.0-20260415233235-54d1312ccc91 sigs.k8s.io/randfill v1.0.0 sigs.k8s.io/yaml v1.6.0 ) diff --git a/go.sum b/go.sum index 68e114fda6..42447dd460 100644 --- a/go.sum +++ b/go.sum @@ -249,8 +249,8 @@ k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912 h1:Y3gxNAuB0OBLImH611+UDZ k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912/go.mod h1:kdmbQkyfwUagLfXIad1y2TdrjPFWp2Q89B3qkRwf/pQ= k8s.io/utils v0.0.0-20251002143259-bc988d571ff4 h1:SjGebBtkBqHFOli+05xYbK8YF1Dzkbzn+gDM4X9T4Ck= k8s.io/utils v0.0.0-20251002143259-bc988d571ff4/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -knative.dev/hack v0.0.0-20260415132636-9909d690ab4d h1:ckrA4ssLeQF0dKfvL8Do9IKR+5tHE9Oiy1eNx+3YNz8= -knative.dev/hack v0.0.0-20260415132636-9909d690ab4d/go.mod h1:L5RzHgbvam0u8QFHfzCX6MKxu/a/gIGEdaRBqNiVbl0= +knative.dev/hack v0.0.0-20260415233235-54d1312ccc91 h1:YkboMEJ48h7DxRQSPe2SePm1yKK0YYgrsQW5Mmc0SEk= +knative.dev/hack v0.0.0-20260415233235-54d1312ccc91/go.mod h1:L5RzHgbvam0u8QFHfzCX6MKxu/a/gIGEdaRBqNiVbl0= pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw= pgregory.net/rapid v1.1.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 h1:IpInykpT6ceI+QxKBbEflcR5EXP7sU1kvOlxwZh5txg= diff --git a/vendor/knative.dev/hack/e2e-tests.sh b/vendor/knative.dev/hack/e2e-tests.sh index 331511cc41..426c1cd93b 100644 --- a/vendor/knative.dev/hack/e2e-tests.sh +++ b/vendor/knative.dev/hack/e2e-tests.sh @@ -54,10 +54,14 @@ function setup_test_cluster() { header "Setting up test cluster" kubectl get nodes - # Set the actual project the test cluster resides in - # It will be a project assigned by Boskos if test is running on Prow, - # otherwise will be ${E2E_GCP_PROJECT_ID} set up by user. - E2E_PROJECT_ID="$(gcloud config get-value project)" + # Set the actual project the test cluster resides in. For GKE this + # comes from the Boskos-configured gcloud context; for other + # providers (e.g. kind) it is not meaningful and is left empty. + if [[ "${CLOUD_PROVIDER}" == "gke" ]]; then + E2E_PROJECT_ID="$(gcloud config get-value project)" + else + E2E_PROJECT_ID="" + fi export E2E_PROJECT_ID readonly E2E_PROJECT_ID diff --git a/vendor/knative.dev/hack/infra-library.sh b/vendor/knative.dev/hack/infra-library.sh index e74b839e91..db364ed894 100644 --- a/vendor/knative.dev/hack/infra-library.sh +++ b/vendor/knative.dev/hack/infra-library.sh @@ -84,7 +84,8 @@ function dump_cluster_state() { # Create a test cluster and run the tests if provided. # Parameters: $1 - cluster provider name, e.g. gke # $2 - custom flags supported by kntest -# $3 - test command to run after cluster is created +# $3 - extra gcloud flags (gke only) +# $4 - test command to run after cluster is created function create_test_cluster() { # Fail fast during setup. set -o errexit @@ -96,7 +97,7 @@ function create_test_cluster() { case "$1" in gke) create_gke_test_cluster "$2" "$3" "$4" "${5:-}" ;; - kind) create_kind_test_cluster "$2" "$3" "${4:-}" ;; + kind) create_kind_test_cluster "$2" "${4:-}" ;; *) echo "unsupported provider: $1"; exit 1 ;; esac diff --git a/vendor/knative.dev/hack/library.sh b/vendor/knative.dev/hack/library.sh index 2dbe5a7a06..6eb5667958 100644 --- a/vendor/knative.dev/hack/library.sh +++ b/vendor/knative.dev/hack/library.sh @@ -922,7 +922,10 @@ function run_kntest() { # Run go-licenses to check for forbidden licenses. function check_licenses() { - # Check that we don't have any forbidden licenses. + # Pin GOTOOLCHAIN to the project's Go version so that go-licenses is + # compiled with the same toolchain. GOTOOLCHAIN=auto (the go_run default) + # may select a different Go, causing isStdLib() path mismatches. + GOTOOLCHAIN="$(go env GOVERSION)" \ go_run github.com/google/go-licenses/v2@v2.0.1 \ check "${REPO_ROOT_DIR}/..." || \ { echo "--- FAIL: go-licenses failed the license check"; return 1; } diff --git a/vendor/modules.txt b/vendor/modules.txt index 247742aa6a..ea1741b38d 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1068,7 +1068,7 @@ k8s.io/utils/lru k8s.io/utils/net k8s.io/utils/ptr k8s.io/utils/trace -# knative.dev/hack v0.0.0-20260415132636-9909d690ab4d +# knative.dev/hack v0.0.0-20260415233235-54d1312ccc91 ## explicit; go 1.24 knative.dev/hack # sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730