upgrade to latest dependencies

bumping knative.dev/hack 05b2fb3...b5e4ff8:
  > b5e4ff8 [release-1.16] Update GKE version to 1.29 (# 415)
  > 6cb0feb [release-1.16] Refactor release script to gh CLI (# 410)
  > 30344ae Export KO_FLAGS for consuming scripts (# 402)

Signed-off-by: Knative Automation <automation@knative.team>
This commit is contained in:
Knative Automation 2025-02-27 10:29:21 +00:00
parent 41bbaf964d
commit 973a71f52e
5 changed files with 28 additions and 30 deletions

2
go.mod
View File

@ -10,7 +10,7 @@ require (
k8s.io/client-go v0.30.3 k8s.io/client-go v0.30.3
k8s.io/code-generator v0.30.3 k8s.io/code-generator v0.30.3
k8s.io/kube-openapi v0.0.0-20240808142205-8e686545bdb8 k8s.io/kube-openapi v0.0.0-20240808142205-8e686545bdb8
knative.dev/hack v0.0.0-20241010131451-05b2fb30cb4d knative.dev/hack v0.0.0-20250220110655-b5e4ff820460
knative.dev/pkg v0.0.0-20241021183759-9b9d535af5ad knative.dev/pkg v0.0.0-20241021183759-9b9d535af5ad
) )

4
go.sum
View File

@ -662,8 +662,8 @@ k8s.io/kube-openapi v0.0.0-20240808142205-8e686545bdb8 h1:1Wof1cGQgA5pqgo8MxKPtf
k8s.io/kube-openapi v0.0.0-20240808142205-8e686545bdb8/go.mod h1:Os6V6dZwLNii3vxFpxcNaTmH8LJJBkOTg1N0tOA0fvA= k8s.io/kube-openapi v0.0.0-20240808142205-8e686545bdb8/go.mod h1:Os6V6dZwLNii3vxFpxcNaTmH8LJJBkOTg1N0tOA0fvA=
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 h1:pUdcCO1Lk/tbT5ztQWOBi5HBgbBP1J8+AsQnQCKsi8A= k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 h1:pUdcCO1Lk/tbT5ztQWOBi5HBgbBP1J8+AsQnQCKsi8A=
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= k8s.io/utils v0.0.0-20240711033017-18e509b52bc8/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
knative.dev/hack v0.0.0-20241010131451-05b2fb30cb4d h1:aCfX7kwkvgGxXXGbso5tLqdwQmzBkJ9d+EIRwksKTvk= knative.dev/hack v0.0.0-20250220110655-b5e4ff820460 h1:N82WjXiv6RlXnA+qV4cA2tUbTnE3B6C3BWE+dcM/F9A=
knative.dev/hack v0.0.0-20241010131451-05b2fb30cb4d/go.mod h1:R0ritgYtjLDO9527h5vb5X6gfvt5LCrJ55BNbVDsWiY= knative.dev/hack v0.0.0-20250220110655-b5e4ff820460/go.mod h1:R0ritgYtjLDO9527h5vb5X6gfvt5LCrJ55BNbVDsWiY=
knative.dev/pkg v0.0.0-20241021183759-9b9d535af5ad h1:Nrjtr2H168rJeamH4QdyLMV1lEKHejNhaj1ymgQMfLk= knative.dev/pkg v0.0.0-20241021183759-9b9d535af5ad h1:Nrjtr2H168rJeamH4QdyLMV1lEKHejNhaj1ymgQMfLk=
knative.dev/pkg v0.0.0-20241021183759-9b9d535af5ad/go.mod h1:StJI72GWcm/iErmk4RqFJiOo8RLbVqPbHxUqeVwAzeo= knative.dev/pkg v0.0.0-20241021183759-9b9d535af5ad/go.mod h1:StJI72GWcm/iErmk4RqFJiOo8RLbVqPbHxUqeVwAzeo=
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=

View File

@ -21,7 +21,7 @@ source "$(dirname "${BASH_SOURCE[0]:-$0}")/library.sh"
# Default Kubernetes version to use for GKE, if not overridden with # Default Kubernetes version to use for GKE, if not overridden with
# the `--cluster-version` parameter. # the `--cluster-version` parameter.
readonly GKE_DEFAULT_CLUSTER_VERSION="1.28" readonly GKE_DEFAULT_CLUSTER_VERSION="1.29"
# Dumps the k8s api server metrics. Spins up a proxy, waits a little bit and # Dumps the k8s api server metrics. Spins up a proxy, waits a little bit and
# dumps the metrics to ${ARTIFACTS}/k8s.metrics.txt # dumps the metrics to ${ARTIFACTS}/k8s.metrics.txt

View File

@ -75,7 +75,7 @@ RELEASE_NOTES=""
RELEASE_BRANCH="" RELEASE_BRANCH=""
RELEASE_GCS_BUCKET="knative-nightly/${REPO_NAME}" RELEASE_GCS_BUCKET="knative-nightly/${REPO_NAME}"
RELEASE_DIR="" RELEASE_DIR=""
KO_FLAGS="-P --platform=all" export KO_FLAGS="-P --platform=all"
VALIDATION_TESTS="./test/presubmit-tests.sh" VALIDATION_TESTS="./test/presubmit-tests.sh"
ARTIFACTS_TO_PUBLISH="" ARTIFACTS_TO_PUBLISH=""
FROM_NIGHTLY_RELEASE="" FROM_NIGHTLY_RELEASE=""
@ -90,11 +90,10 @@ export GOFLAGS="-ldflags=-s -ldflags=-w"
export GITHUB_TOKEN="" export GITHUB_TOKEN=""
readonly IMAGES_REFS_FILE="${IMAGES_REFS_FILE:-$(mktemp -d)/images_refs.txt}" readonly IMAGES_REFS_FILE="${IMAGES_REFS_FILE:-$(mktemp -d)/images_refs.txt}"
# Convenience function to run the hub tool. # Convenience function to run the GitHub CLI tool `gh`.
# Parameters: $1..$n - arguments to hub. # Parameters: $1..$n - arguments to gh.
function hub_tool() { function gh_tool() {
# Pinned to SHA because of https://github.com/github/hub/issues/2517 go_run github.com/cli/cli/v2/cmd/gh@v2.65.0 "$@"
go_run github.com/github/hub/v2@363513a "$@"
} }
# Shortcut to "git push" that handles authentication. # Shortcut to "git push" that handles authentication.
@ -193,7 +192,7 @@ function prepare_dot_release() {
# Support tags in two formats # Support tags in two formats
# - knative-v1.0.0 # - knative-v1.0.0
# - v1.0.0 # - v1.0.0
releases="$(hub_tool release | cut -d '-' -f2)" releases="$(gh_tool release list --json tagName --jq '.[].tagName' | cut -d '-' -f2)"
echo "Current releases are: ${releases}" echo "Current releases are: ${releases}"
[[ $? -eq 0 ]] || abort "cannot list releases" [[ $? -eq 0 ]] || abort "cannot list releases"
# If --release-branch passed, restrict to that release # If --release-branch passed, restrict to that release
@ -218,7 +217,7 @@ function prepare_dot_release() {
# Ensure there are new commits in the branch, otherwise we don't create a new release # Ensure there are new commits in the branch, otherwise we don't create a new release
setup_branch setup_branch
# Use the original tag (ie. potentially with a knative- prefix) when determining the last version commit sha # Use the original tag (ie. potentially with a knative- prefix) when determining the last version commit sha
local github_tag="$(hub_tool release | grep "${last_version}")" local github_tag="$(gh_tool release list --json tagName --jq '.[].tagName' | grep "${last_version}")"
local last_release_commit="$(git rev-list -n 1 "${github_tag}")" local last_release_commit="$(git rev-list -n 1 "${github_tag}")"
local last_release_commit_filtered="$(git rev-list --invert-grep --grep "\[skip-dot-release\]" -n 1 "${github_tag}")" local last_release_commit_filtered="$(git rev-list --invert-grep --grep "\[skip-dot-release\]" -n 1 "${github_tag}")"
local release_branch_commit="$(git rev-list -n 1 upstream/"${RELEASE_BRANCH}")" local release_branch_commit="$(git rev-list -n 1 upstream/"${RELEASE_BRANCH}")"
@ -239,7 +238,7 @@ function prepare_dot_release() {
# If --release-notes not used, copy from the latest release # If --release-notes not used, copy from the latest release
if [[ -z "${RELEASE_NOTES}" ]]; then if [[ -z "${RELEASE_NOTES}" ]]; then
RELEASE_NOTES="$(mktemp)" RELEASE_NOTES="$(mktemp)"
hub_tool release show -f "%b" "${github_tag}" > "${RELEASE_NOTES}" gh_tool release view "${github_tag}" --json "body" --jq '.body' > "${RELEASE_NOTES}"
echo "Release notes from ${last_version} copied to ${RELEASE_NOTES}" echo "Release notes from ${last_version} copied to ${RELEASE_NOTES}"
fi fi
} }
@ -640,18 +639,12 @@ function set_latest_to_highest_semver() {
local last_version release_id # don't combine with assignment else $? will be 0 local last_version release_id # don't combine with assignment else $? will be 0
last_version="$(hub_tool -p release | cut -d'-' -f2 | grep '^v[0-9]\+\.[0-9]\+\.[0-9]\+$'| sort -r -V | head -1)" last_version="$(gh_tool release list --json tagName --jq '.[].tagName' | cut -d'-' -f2 | grep '^v[0-9]\+\.[0-9]\+\.[0-9]\+$'| sort -r -V | head -1)"
if ! [[ $? -eq 0 ]]; then if ! [[ $? -eq 0 ]]; then
abort "cannot list releases" abort "cannot list releases"
fi fi
release_id="$(hub_tool api "/repos/${ORG_NAME}/${REPO_NAME}/releases/tags/knative-${last_version}" | jq .id)" gh_tool release edit "knative-${last_version}" --latest > /dev/null || abort "error setting $last_version to 'latest'"
if [[ $? -ne 0 ]]; then
abort "cannot get relase id from github"
fi
hub_tool api --method PATCH "/repos/${ORG_NAME}/${REPO_NAME}/releases/$release_id" \
-F make_latest=true > /dev/null || abort "error setting $last_version to 'latest'"
echo "Github release ${last_version} set as 'latest'" echo "Github release ${last_version} set as 'latest'"
} }
@ -742,12 +735,14 @@ function publish_to_github() {
local description="$(mktemp)" local description="$(mktemp)"
local attachments_dir="$(mktemp -d)" local attachments_dir="$(mktemp -d)"
local commitish="" local commitish=""
local target_branch=""
local github_tag="knative-${TAG}" local github_tag="knative-${TAG}"
# Copy files to a separate dir # Copy files to a separate dir
# shellcheck disable=SC2068
for artifact in $@; do for artifact in $@; do
cp ${artifact} "${attachments_dir}"/ cp ${artifact} "${attachments_dir}"/
attachments+=("--attach=${artifact}#$(basename ${artifact})") attachments+=("${artifact}#$(basename ${artifact})")
done done
echo -e "${title}\n" > "${description}" echo -e "${title}\n" > "${description}"
if [[ -n "${RELEASE_NOTES}" ]]; then if [[ -n "${RELEASE_NOTES}" ]]; then
@ -774,13 +769,16 @@ function publish_to_github() {
git tag -a "${github_tag}" -m "${title}" git tag -a "${github_tag}" -m "${title}"
git_push tag "${github_tag}" git_push tag "${github_tag}"
[[ -n "${RELEASE_BRANCH}" ]] && commitish="--commitish=${RELEASE_BRANCH}" [[ -n "${RELEASE_BRANCH}" ]] && target_branch="--target=${RELEASE_BRANCH}"
for i in {2..0}; do for i in {2..0}; do
hub_tool release create \ # shellcheck disable=SC2068
${attachments[@]} \ gh_tool release create \
--file="${description}" \ "${github_tag}" \
"${commitish}" \ --title "${title}" \
"${github_tag}" && return 0 --notes-file "${description}" \
"${target_branch}" \
${attachments[@]} && return 0
if [[ "${i}" -gt 0 ]]; then if [[ "${i}" -gt 0 ]]; then
echo "Error publishing the release, retrying in 15s..." echo "Error publishing the release, retrying in 15s..."
sleep 15 sleep 15

2
vendor/modules.txt vendored
View File

@ -702,7 +702,7 @@ k8s.io/utils/pointer
k8s.io/utils/ptr k8s.io/utils/ptr
k8s.io/utils/strings/slices k8s.io/utils/strings/slices
k8s.io/utils/trace k8s.io/utils/trace
# knative.dev/hack v0.0.0-20241010131451-05b2fb30cb4d # knative.dev/hack v0.0.0-20250220110655-b5e4ff820460
## explicit; go 1.21 ## explicit; go 1.21
knative.dev/hack knative.dev/hack
# knative.dev/pkg v0.0.0-20241021183759-9b9d535af5ad # knative.dev/pkg v0.0.0-20241021183759-9b9d535af5ad