diff --git a/.go-version b/.go-version index 013173af5e9..a6c2798a482 100644 --- a/.go-version +++ b/.go-version @@ -1 +1 @@ -1.22.6 +1.23.0 diff --git a/README.md b/README.md index a454d0adb12..7408cdaa669 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ To get started with APM, see our [Quick start guide](https://www.elastic.co/guid ### Requirements -* [Go][golang-download] 1.22.x +* [Go][golang-download] [golang-download]: https://golang.org/dl/ diff --git a/cmd/intake-receiver/go.mod b/cmd/intake-receiver/go.mod index 0833f7b5920..e1d81b98e24 100644 --- a/cmd/intake-receiver/go.mod +++ b/cmd/intake-receiver/go.mod @@ -1,8 +1,6 @@ module github.com/elastic/apm-server/cmd/intake-receiver -go 1.22 - -toolchain go1.22.1 +go 1.23.0 require ( github.com/stretchr/testify v1.6.1 diff --git a/go.mod b/go.mod index e0ad3a59402..62efc200be4 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/elastic/apm-server -go 1.22.5 +go 1.23.0 require ( github.com/cespare/xxhash/v2 v2.3.0 diff --git a/internal/glog/go.mod b/internal/glog/go.mod index 117d275f9eb..cff28a1260b 100644 --- a/internal/glog/go.mod +++ b/internal/glog/go.mod @@ -1,5 +1,3 @@ module github.com/golang/glog -go 1.22 - -toolchain go1.22.1 +go 1.23.0 diff --git a/script/update_go_version.sh b/script/update_go_version.sh index 80c0a7a0277..2d7cd0b3874 100755 --- a/script/update_go_version.sh +++ b/script/update_go_version.sh @@ -7,20 +7,10 @@ set -e SDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" cd $SDIR/.. -# Use gimme to find the latest patch release for the major.minor # Go version defined in go.mod. -GOMOD_VERSION=$(grep '^go' go.mod | cut -d' ' -f2 | cut -d. -f1-2) +MAJOR_MINOR_VERSION=$(grep '^go' go.mod | cut -d' ' -f2 | cut -d. -f1-2) -# TODO(axw) arrange for Go 1.21+ to always be available, and stop using gimme. -eval $(script/gimme/gimme $GOMOD_VERSION.x) -GOVERSION=$(go env GOVERSION | sed 's/^go//') +find ./ -type f -name "go.mod" -execdir go get go@$MAJOR_MINOR_VERSION \; -execdir go get toolchain@none \; -find -name go.mod -execdir go get toolchain@$GOVERSION \; -echo $GOVERSION > .go-version -sed -i "s/golang:[[:digit:]]\+\(\.[[:digit:]]\+\)\{1,2\}/golang:$GOVERSION/" packaging/docker/Dockerfile -sed -i "s/\(\[Go\]\[golang-download\]\) [[:digit:]].*/\1 $GOMOD_VERSION.x/" README.md -sed -i "s/toolchain go[[:digit:]]\+\(\.[[:digit:]]\+\)\{1,2\}/toolchain go$GOVERSION/" tools/go.mod -sed -i "s/toolchain go[[:digit:]]\+\(\.[[:digit:]]\+\)\{1,2\}/toolchain go$GOVERSION/" internal/glog/go.mod -sed -i "s/toolchain go[[:digit:]]\+\(\.[[:digit:]]\+\)\{1,2\}/toolchain go$GOVERSION/" go.mod -sed -i "s/toolchain go[[:digit:]]\+\(\.[[:digit:]]\+\)\{1,2\}/toolchain go$GOVERSION/" systemtest/go.mod -sed -i "s/toolchain go[[:digit:]]\+\(\.[[:digit:]]\+\)\{1,2\}/toolchain go$GOVERSION/" cmd/intake-receiver/go.mod +GO_VERSION=$(grep '^go' go.mod | cut -d' ' -f2) +echo $GO_VERSION > .go-version diff --git a/systemtest/go.mod b/systemtest/go.mod index d5475875a8f..021be5dbaad 100644 --- a/systemtest/go.mod +++ b/systemtest/go.mod @@ -1,8 +1,6 @@ module github.com/elastic/apm-server/systemtest -go 1.22 - -toolchain go1.22.1 +go 1.23.0 require ( github.com/docker/docker v27.0.3+incompatible diff --git a/tools/go.mod b/tools/go.mod index 9fee9f0ff6c..65ea10fc4c0 100644 --- a/tools/go.mod +++ b/tools/go.mod @@ -1,8 +1,6 @@ module github.com/elastic/apm-server/tools -go 1.22 - -toolchain go1.22.1 +go 1.23.0 require ( github.com/elastic/apm-tools v0.0.0-20230828065051-3f799314cc8b @@ -14,7 +12,7 @@ require ( github.com/terraform-docs/terraform-docs v0.18.0 go.elastic.co/go-licence-detector v0.6.1 gotest.tools/gotestsum v1.12.0 - honnef.co/go/tools v0.4.7 + honnef.co/go/tools v0.5.0 ) require ( @@ -27,7 +25,7 @@ require ( require ( dario.cat/mergo v1.0.0 // indirect github.com/AlekSi/pointer v1.2.0 // indirect - github.com/BurntSushi/toml v1.4.0 // indirect + github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c // indirect github.com/Masterminds/goutils v1.1.1 // indirect github.com/Masterminds/semver/v3 v3.2.1 // indirect github.com/Masterminds/sprig/v3 v3.2.3 // indirect @@ -129,14 +127,14 @@ require ( go.uber.org/multierr v1.11.0 // indirect golang.org/x/crypto v0.24.0 // indirect golang.org/x/exp v0.0.0-20240525044651-4c93da0ed11d // indirect - golang.org/x/exp/typeparams v0.0.0-20221208152030-732eee02a75a // indirect + golang.org/x/exp/typeparams v0.0.0-20231108232855-2478ac86f678 // indirect golang.org/x/mod v0.18.0 // indirect golang.org/x/net v0.26.0 // indirect golang.org/x/sync v0.7.0 // indirect golang.org/x/sys v0.21.0 // indirect golang.org/x/term v0.21.0 // indirect golang.org/x/text v0.16.0 // indirect - golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect + golang.org/x/tools v0.21.1-0.20240531212143-b6235391adb3 // indirect golang.org/x/tools/go/vcs v0.1.0-deprecated // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240521202816-d264139d666e // indirect google.golang.org/grpc v1.64.1 // indirect diff --git a/tools/go.sum b/tools/go.sum index 05899822906..74a3776afe9 100644 --- a/tools/go.sum +++ b/tools/go.sum @@ -2,8 +2,8 @@ dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= github.com/AlekSi/pointer v1.2.0 h1:glcy/gc4h8HnG2Z3ZECSzZ1IX1x2JxRVuDzaJwQE0+w= github.com/AlekSi/pointer v1.2.0/go.mod h1:gZGfd3dpW4vEc/UlyfKKi1roIqcCgwOIvb0tSNSBle0= -github.com/BurntSushi/toml v1.4.0 h1:kuoIxZQy2WRRk1pttg9asf+WVv6tWQuBNVmK8+nqPr0= -github.com/BurntSushi/toml v1.4.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= +github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c h1:pxW6RcqyfI9/kWtOwnv/G+AzdKuy2ZrqINhenH4HyNs= +github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ= github.com/DataDog/zstd v1.5.5/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= @@ -362,8 +362,8 @@ golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= golang.org/x/exp v0.0.0-20240525044651-4c93da0ed11d h1:N0hmiNbwsSNwHBAvR3QB5w25pUwH4tK0Y/RltD1j1h4= golang.org/x/exp v0.0.0-20240525044651-4c93da0ed11d/go.mod h1:XtvwrStGgqGPLc4cjQfWqZHG1YFdYs6swckp8vpsjnc= -golang.org/x/exp/typeparams v0.0.0-20221208152030-732eee02a75a h1:Jw5wfR+h9mnIYH+OtGT2im5wV1YGGDora5vTv/aa5bE= -golang.org/x/exp/typeparams v0.0.0-20221208152030-732eee02a75a/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= +golang.org/x/exp/typeparams v0.0.0-20231108232855-2478ac86f678 h1:1P7xPZEwZMoBoz0Yze5Nx2/4pxj6nw9ZqHWXqP0iRgQ= +golang.org/x/exp/typeparams v0.0.0-20231108232855-2478ac86f678/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= @@ -465,8 +465,8 @@ golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.11.0/go.mod h1:anzJrxPjNtfgiYQYirP2CPGzGLxrH2u2QBhn6Bf3qY8= golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= golang.org/x/tools v0.19.0/go.mod h1:qoJWxmGSIBmAeriMx19ogtrEPrGtDbPK634QFIcLAhc= -golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= -golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= +golang.org/x/tools v0.21.1-0.20240531212143-b6235391adb3 h1:SHq4Rl+B7WvyM4XODon1LXtP7gcG49+7Jubt1gWWswY= +golang.org/x/tools v0.21.1-0.20240531212143-b6235391adb3/go.mod h1:bqv7PJ/TtlrzgJKhOAGdDUkUltQapRik/UEHubLVBWo= golang.org/x/tools/go/vcs v0.1.0-deprecated h1:cOIJqWBl99H1dH5LWizPa+0ImeeJq3t3cJjaeOWUAL4= golang.org/x/tools/go/vcs v0.1.0-deprecated/go.mod h1:zUrvATBAvEI9535oC0yWYsLsHIV4Z7g63sNPVMtuBy8= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -499,7 +499,7 @@ gotest.tools/gotestsum v1.12.0 h1:CmwtaGDkHxrZm4Ib0Vob89MTfpc3GrEFMJKovliPwGk= gotest.tools/gotestsum v1.12.0/go.mod h1:fAvqkSptospfSbQw26CTYzNwnsE/ztqLeyhP0h67ARY= gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= -honnef.co/go/tools v0.4.7 h1:9MDAWxMoSnB6QoSqiVr7P5mtkT9pOc1kSxchzPCnqJs= -honnef.co/go/tools v0.4.7/go.mod h1:+rnGS1THNh8zMwnd2oVOTL9QF6vmfyG6ZXBULae2uc0= +honnef.co/go/tools v0.5.0 h1:29uoiIormS3Z6R+t56STz/oI4v+mB51TSmEOdJPgRnE= +honnef.co/go/tools v0.5.0/go.mod h1:e9irvo83WDG9/irijV44wr3tbhcFeRnfpVlRqVwpzMs= mvdan.cc/xurls/v2 v2.5.0 h1:lyBNOm8Wo71UknhUs4QTFUNNMyxy2JEIaKKo0RWOh+8= mvdan.cc/xurls/v2 v2.5.0/go.mod h1:yQgaGQ1rFtJUzkmKiHYSSfuQxqfYmd//X6PxvholpeE=