diff --git a/go.mod b/go.mod index 5c64cc720..e50e65123 100644 --- a/go.mod +++ b/go.mod @@ -14,10 +14,10 @@ require ( k8s.io/api v0.21.4 k8s.io/apimachinery v0.21.4 k8s.io/client-go v0.21.4 - knative.dev/eventing v0.26.1-0.20211028192027-b498c7fd6eb7 - knative.dev/hack v0.0.0-20211028194650-b96d65a5ff5e - knative.dev/pkg v0.0.0-20211027105800-3b33e02e5b9c - knative.dev/serving v0.26.1-0.20211028155847-785c55ae7c0d + knative.dev/eventing v0.27.0 + knative.dev/hack v0.0.0-20211101195839-11d193bf617b + knative.dev/pkg v0.0.0-20211101212339-96c0204a70dc + knative.dev/serving v0.27.0 ) replace github.com/prometheus/client_golang => github.com/prometheus/client_golang v0.9.2 diff --git a/go.sum b/go.sum index dbfca7309..9af89084f 100644 --- a/go.sum +++ b/go.sum @@ -26,7 +26,6 @@ cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWc cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= -cloud.google.com/go v0.96.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= cloud.google.com/go v0.97.0 h1:3DXvAyifywvq64LfkKaMOmkWPS1CikIQdMe2lY9vxU8= cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= @@ -47,7 +46,6 @@ cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0Zeo cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -cloud.google.com/go/storage v1.16.1/go.mod h1:LaNorbty3ehnU3rEjXSNV/NRgQA0O8Y+uh6bPe5UOk4= cloud.google.com/go/storage v1.18.2 h1:5NQw6tOn3eMm0oE8vTkfjau18kjL79FlMjy/CHTpmoY= cloud.google.com/go/storage v1.18.2/go.mod h1:AiIj7BWXyhO5gGVmYJ+S8tbkCx3yb0IMjua8Aw4naVM= contrib.go.opencensus.io/exporter/ocagent v0.7.1-0.20200907061046-05415f1de66d h1:LblfooH1lKOpp1hIhukktmSAxFkqMPFk9KR6iZ0MJNI= @@ -1056,7 +1054,6 @@ golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96b golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210928044308-7d9f5e0b762b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f h1:OfiFi4JbukWwe3lzw+xunroH1mnC1e2Gy5cxNJApiSY= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -1385,7 +1382,6 @@ google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKr google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210825212027-de86158e7fda/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= @@ -1538,7 +1534,6 @@ k8s.io/csi-translation-lib v0.21.0/go.mod h1:edq+UMpgqEx3roTuGF/03uIuSOsI986jtu6 k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20201203183100-97869a43a9d9/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/gengo v0.0.0-20201214224949-b6c5ce23f027/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= -k8s.io/gengo v0.0.0-20210203185629-de9496dff47b/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/gengo v0.0.0-20210915205010-39e73c8a59cd h1:WEhFhsVrgII9WzLqf1VTUUtwPHm+vxbRq8Ib6y9Jt4g= k8s.io/gengo v0.0.0-20210915205010-39e73c8a59cd/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog v0.2.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= @@ -1558,25 +1553,19 @@ k8s.io/legacy-cloud-providers v0.21.0/go.mod h1:bNxo7gDg+PGkBmT/MFZswLTWdSWK9kAl k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20210111153108-fddb29f9d009 h1:0T5IaWHO3sJTEmCP6mUlBvMukxPKUQWqiI/YuiBNMiQ= k8s.io/utils v0.0.0-20210111153108-fddb29f9d009/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -knative.dev/caching v0.0.0-20211026205101-2ffdd31aa1e8/go.mod h1:WxzrnSGlNoMubORRhLc5lfrzActCvOiimFchaTvnMW4= -knative.dev/eventing v0.26.1-0.20211028192027-b498c7fd6eb7 h1:pVoxH01Kt7biw0mBqZ6hYGtBUk7ydmIykUf6bmllbKY= -knative.dev/eventing v0.26.1-0.20211028192027-b498c7fd6eb7/go.mod h1:27s/uaaUrAUKO/Wy7kR4R6mbj5zugQWCyEkod4dVw0I= -knative.dev/hack v0.0.0-20211018110626-47ac3b032e60/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI= -knative.dev/hack v0.0.0-20211019034732-ced8ce706528/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI= -knative.dev/hack v0.0.0-20211025203920-02860f59a556/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI= -knative.dev/hack v0.0.0-20211026141922-a71c865b5f66/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI= -knative.dev/hack v0.0.0-20211028194650-b96d65a5ff5e h1:0Hw2xdWYbcs2JRJnOLzAVh7APOtgro7gSno0228mnDg= -knative.dev/hack v0.0.0-20211028194650-b96d65a5ff5e/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI= -knative.dev/hack/schema v0.0.0-20211026141922-a71c865b5f66/go.mod h1:ffjwmdcrH5vN3mPhO8RrF2KfNnbHeCE2C60A+2cv3U0= -knative.dev/networking v0.0.0-20211027012100-31eca9c93514 h1:Gc9BtldtniEB2LeJoyISw89FCAcKgnUdO7gkYeurEhk= -knative.dev/networking v0.0.0-20211027012100-31eca9c93514/go.mod h1:JIzq6AOlhXrE/A84SHAWL2tLWFkvhcqprP1PRWMBVkQ= -knative.dev/pkg v0.0.0-20211018141937-a34efd6b409d/go.mod h1:/d1+Wklc8blR39M4oEBu+GeLav4vsiiJwq61tJay7mc= -knative.dev/pkg v0.0.0-20211025151738-819d556cdaa5/go.mod h1:Q3PrYqZsnHU9rNJhyH/zhVdTojGfEqrkNnNG4arrJgE= -knative.dev/pkg v0.0.0-20211027105800-3b33e02e5b9c h1:BcNIB0BtExl970heGJZHeHa10I9zVbpoSUmFELHmQDg= -knative.dev/pkg v0.0.0-20211027105800-3b33e02e5b9c/go.mod h1:xtF+ujTgEybZxA+e7NwKgHR8xMjYzHQUBxyaOUEFxwY= -knative.dev/reconciler-test v0.0.0-20211019133535-04ea7ddac7e3/go.mod h1:ltMDlEIFo5/9ES92BhIWQkdZaHRnGGJvXcYlvPxZj5s= -knative.dev/serving v0.26.1-0.20211028155847-785c55ae7c0d h1:17eq4WTgSM9K010Sp/vcvmja8Egi5sfOlID/peCuFzY= -knative.dev/serving v0.26.1-0.20211028155847-785c55ae7c0d/go.mod h1:Ncqz2QN+l1GhkKICVnw6ArgOaxJ3FhK4eQH0WqZNg8k= +knative.dev/caching v0.0.0-20211101215439-72577a3c0ce1/go.mod h1:hz6tnVAmRLvPoprw+0wsA9IrZC3MF5l2Hn/2JT28Yk0= +knative.dev/eventing v0.27.0 h1:P9rqKvsCeFb8sEhfK32WFTG7awdOAa7XO6p3umSq/wU= +knative.dev/eventing v0.27.0/go.mod h1:4ppWQEQ/2B66/YFENDmV1Gjxs4meLpz6UTUgLkkINt4= +knative.dev/hack v0.0.0-20211101195839-11d193bf617b h1:DaW1iliZlBAwq/I8gTqVu8UnfGxyb5yR7CDsJi5jyWk= +knative.dev/hack v0.0.0-20211101195839-11d193bf617b/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI= +knative.dev/hack/schema v0.0.0-20211101195839-11d193bf617b/go.mod h1:ffjwmdcrH5vN3mPhO8RrF2KfNnbHeCE2C60A+2cv3U0= +knative.dev/networking v0.0.0-20211101215640-8c71a2708e7d h1:nCnuNfcLWuyAdZYgVfwSooa3+p2ebx+V+qhGXXF/FIk= +knative.dev/networking v0.0.0-20211101215640-8c71a2708e7d/go.mod h1:7SKKM4MsBANrXNRZhb/zMkNjTdxYbNjwQDWgu+Fyye4= +knative.dev/pkg v0.0.0-20211101212339-96c0204a70dc h1:ldjbTpoMXUTgzw0IJsAFLdyA6/6QYRvz8IGPZOknEDg= +knative.dev/pkg v0.0.0-20211101212339-96c0204a70dc/go.mod h1:SkfDk9bWIiNZD7XtILGkG7AKVyF/M6M0bGxLgl0SYL8= +knative.dev/reconciler-test v0.0.0-20211101214439-9839937c9b13/go.mod h1:gTsbLk496j/M9xqMpx/liyCQ0X3bwDpRtcs2Zzws364= +knative.dev/serving v0.27.0 h1:pstGHQ8aSJsIwdofkjJV6TrmPN09u/2qN1Mgfc92LQs= +knative.dev/serving v0.27.0/go.mod h1:Lcqv3K/DeDt6ZoeWTgpjxc/0teS7uMebnnU+gXIw99c= pgregory.net/rapid v0.3.3 h1:jCjBsY4ln4Atz78QoBWxUEvAHaFyNDQg9+WU62aCn1U= pgregory.net/rapid v0.3.3/go.mod h1:UYpPVyjFHzYBGHIxLFoupi8vwk6rXNzRY9OMvVxFIOU= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= diff --git a/vendor/knative.dev/hack/release.sh b/vendor/knative.dev/hack/release.sh index 80b035fb4..0f7c47324 100644 --- a/vendor/knative.dev/hack/release.sh +++ b/vendor/knative.dev/hack/release.sh @@ -131,10 +131,18 @@ function master_version() { echo "${tokens[0]}.${tokens[1]}" } +# Return the minor version of a release. +# For example, "v0.2.1" returns "2" +# Parameters: $1 - release version label. +function minor_version() { + local tokens=(${1//\./ }) + echo "${tokens[1]}" +} + # Return the release build number of a release. # For example, "v0.2.1" returns "1". # Parameters: $1 - release version label. -function release_build_number() { +function patch_version() { local tokens=(${1//\./ }) echo "${tokens[2]}" } @@ -171,7 +179,10 @@ function prepare_auto_release() { PUBLISH_RELEASE=1 git fetch --all || abort "error fetching branches/tags from remote" - local tags="$(git tag | cut -d 'v' -f2 | cut -d '.' -f1-2 | sort -V | uniq)" + # Support two different formats for tags + # - knative-v1.0.0 + # - v1.0.0 + local tags="$(git tag | cut -d '-' -f2 | cut -d 'v' -f2 | cut -d '.' -f1-2 | sort -V | uniq)" local branches="$( { (git branch -r | grep upstream/release-) ; (git branch | grep release-); } | cut -d '-' -f2 | sort -V | uniq)" echo "Versions released (from tags): [" "${tags}" "]" @@ -210,7 +221,10 @@ function prepare_dot_release() { git fetch --all || abort "error fetching branches/tags from remote" # List latest release local releases # don't combine with the line below, or $? will be 0 - releases="$(hub_tool release)" + # Support tags in two formats + # - knative-v1.0.0 + # - v1.0.0 + releases="$(hub_tool release | cut -d '-' -f2)" echo "Current releases are: ${releases}" [[ $? -eq 0 ]] || abort "cannot list releases" # If --release-branch passed, restrict to that release @@ -234,7 +248,9 @@ function prepare_dot_release() { [[ -n "${major_minor_version}" ]] || abort "cannot get release major/minor version" # Ensure there are new commits in the branch, otherwise we don't create a new release setup_branch - local last_release_commit="$(git rev-list -n 1 "${last_version}")" + # 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 last_release_commit="$(git rev-list -n 1 "${github_tag}")" local release_branch_commit="$(git rev-list -n 1 upstream/"${RELEASE_BRANCH}")" [[ -n "${last_release_commit}" ]] || abort "cannot get last release commit" [[ -n "${release_branch_commit}" ]] || abort "cannot get release branch last commit" @@ -246,13 +262,13 @@ function prepare_dot_release() { exit 0 fi # Create new release version number - local last_build="$(release_build_number "${last_version}")" + local last_build="$(patch_version "${last_version}")" RELEASE_VERSION="${major_minor_version}.$(( last_build + 1 ))" echo "Will create release ${RELEASE_VERSION} at commit ${release_branch_commit}" # If --release-notes not used, copy from the latest release if [[ -z "${RELEASE_NOTES}" ]]; then RELEASE_NOTES="$(mktemp)" - hub_tool release show -f "%b" "${last_version}" > "${RELEASE_NOTES}" + hub_tool release show -f "%b" "${github_tag}" > "${RELEASE_NOTES}" echo "Release notes from ${last_version} copied to ${RELEASE_NOTES}" fi } @@ -595,6 +611,8 @@ function publish_to_github() { local description="$(mktemp)" local attachments_dir="$(mktemp -d)" local commitish="" + local github_tag="knative-${TAG}" + # Copy files to a separate dir for artifact in $@; do cp ${artifact} "${attachments_dir}"/ @@ -604,8 +622,22 @@ function publish_to_github() { if [[ -n "${RELEASE_NOTES}" ]]; then cat "${RELEASE_NOTES}" >> "${description}" fi - git tag -a "${TAG}" -m "${title}" - git_push tag "${TAG}" + git tag -a "${github_tag}" -m "${title}" + git_push tag "${github_tag}" + + # Include a tag for the go module version + # + # v1.0.0 = v0.27.0 + # v1.0.1 = v0.27.1 + # v1.1.1 = v0.28.1 + # + # See: https://github.com/knative/hack/pull/97 + if [[ "$TAG" == "v1"* ]]; then + local release_minor=$(minor_version $TAG) + local go_module_version="v0.$(( release_minor + 27 )).$(patch_version $TAG)" + git tag -a "${go_module_version}" -m "${title}" + git_push tag "${go_module_version}" + fi [[ -n "${RELEASE_BRANCH}" ]] && commitish="--commitish=${RELEASE_BRANCH}" for i in {2..0}; do @@ -613,7 +645,7 @@ function publish_to_github() { ${attachments[@]} \ --file="${description}" \ "${commitish}" \ - "${TAG}" && return 0 + "${github_tag}" && return 0 if [[ "${i}" -gt 0 ]]; then echo "Error publishing the release, retrying in 15s..." sleep 15 diff --git a/vendor/modules.txt b/vendor/modules.txt index bdad7b131..2dad12695 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -922,7 +922,7 @@ k8s.io/utils/buffer k8s.io/utils/integer k8s.io/utils/pointer k8s.io/utils/trace -# knative.dev/eventing v0.26.1-0.20211028192027-b498c7fd6eb7 +# knative.dev/eventing v0.27.0 ## explicit knative.dev/eventing/pkg/adapter/v2 knative.dev/eventing/pkg/adapter/v2/test @@ -990,14 +990,14 @@ knative.dev/eventing/test/test_images/heartbeats knative.dev/eventing/test/test_images/performance knative.dev/eventing/test/test_images/print knative.dev/eventing/test/test_images/recordevents -# knative.dev/hack v0.0.0-20211028194650-b96d65a5ff5e +# knative.dev/hack v0.0.0-20211101195839-11d193bf617b ## explicit knative.dev/hack -# knative.dev/networking v0.0.0-20211027012100-31eca9c93514 +# knative.dev/networking v0.0.0-20211101215640-8c71a2708e7d knative.dev/networking/pkg knative.dev/networking/pkg/apis/networking knative.dev/networking/pkg/apis/networking/v1alpha1 -# knative.dev/pkg v0.0.0-20211027105800-3b33e02e5b9c +# knative.dev/pkg v0.0.0-20211101212339-96c0204a70dc ## explicit knative.dev/pkg/apis knative.dev/pkg/apis/duck @@ -1077,7 +1077,7 @@ knative.dev/pkg/webhook/psbinding knative.dev/pkg/webhook/resourcesemantics knative.dev/pkg/webhook/resourcesemantics/defaulting knative.dev/pkg/webhook/resourcesemantics/validation -# knative.dev/serving v0.26.1-0.20211028155847-785c55ae7c0d +# knative.dev/serving v0.27.0 ## explicit knative.dev/serving/pkg/apis/autoscaling knative.dev/serving/pkg/apis/autoscaling/v1alpha1