Skip to content

Commit

Permalink
Update to Go 1.23 (GoogleCloudPlatform#12176)
Browse files Browse the repository at this point in the history
  • Loading branch information
BBBmau authored and niharika-98 committed Nov 1, 2024
1 parent e5e36c7 commit e2fe4fa
Show file tree
Hide file tree
Showing 28 changed files with 54 additions and 48 deletions.
2 changes: 1 addition & 1 deletion .ci/containers/build-environment/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Stage 1: Building Go dependencies
FROM golang:1.21-bullseye AS builder
FROM golang:1.23-bullseye AS builder

# Set working directory
WORKDIR /app
Expand Down
2 changes: 1 addition & 1 deletion .ci/magician/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module magician

go 1.21
go 1.23

replace github.com/GoogleCloudPlatform/magic-modules/tools/issue-labeler => ../../tools/issue-labeler

Expand Down
2 changes: 1 addition & 1 deletion .ci/unit-tests/gcb-membership-checker-test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
steps:
- name: 'golang:1.21'
- name: 'golang:1.23'
args:
- '-c'
- |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-downstream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: '^1.21'
go-version: '^1.23'

# Cache Go modules
- name: Cache Go modules
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/changelog-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: '^1.21.0'
go-version: '^1.23.0'

- name: Build
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gofmt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
cache: false
go-version: '^1.21'
go-version: '^1.23'
- name: gofmt
run: |
GOFMT_OUTPUT="$(gofmt -l .)"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/request-reviewer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: '^1.21'
go-version: '^1.23'
# Disable caching for now due to issues with large provider dependency caches
cache: false
- name: Build magician
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scheduled-pr-reminders.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: '^1.21'
go-version: '^1.23'
# Disable caching for now due to issues with large provider dependency caches
cache: false
- name: Build magician
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-tgc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
if: ${{ !failure() && steps.pull_request.outputs.has_changes == 'true' }}
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: '^1.21'
go-version: '^1.23'
- name: Build Terraform Google Conversion
if: ${{ !failure() && steps.pull_request.outputs.has_changes == 'true' }}
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-tpg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
if: ${{ !failure() && steps.pull_request.outputs.has_changes == 'true' }}
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: '^1.21'
go-version: '^1.23'
- name: Build Provider
if: ${{ !failure() && steps.pull_request.outputs.has_changes == 'true' }}
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit-test-magician.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: '^1.21'
go-version: '^1.23'
- name: Run magician unit tests
run: |
cd .ci/magician
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit-test-tgc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: '^1.21'
go-version: '^1.23'

- name: Build Terraform Google Conversion
run: |
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/unit-test-tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: '^1.21.0'
go-version: '^1.23.0'

- name: Build diff-processor with TPG
run: |
Expand Down Expand Up @@ -53,7 +53,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: '^1.21.0'
go-version: '^1.23.0'

- name: Build go-changelog
run: |
Expand All @@ -73,7 +73,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: '^1.21.0'
go-version: '^1.23.0'

- name: Build issue-labeler
run: |
Expand All @@ -93,7 +93,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: '^1.21.0'
go-version: '^1.23.0'

- name: Build template-check
run: |
Expand All @@ -113,7 +113,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: '^1.21.0'
go-version: '^1.23.0'

- name: Build test-reader
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit-test-tpg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: '^1.21'
go-version: '^1.23'

- name: Build Provider
run: |
Expand Down
8 changes: 1 addition & 7 deletions docs/go.mod
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
module github.com/GoogleCloudPlatform/magic-modules/docs

go 1.21

require (
github.com/alex-shpak/hugo-book v0.0.0-20230424134111-d86d5e70c7c0 // indirect
github.com/h-enk/doks-child-theme v0.5.0 // indirect
github.com/theNewDynamic/gohugo-theme-ananke v0.0.0-20221031153459-b393088d0930 // indirect
)
go 1.23
8 changes: 0 additions & 8 deletions docs/go.sum
Original file line number Diff line number Diff line change
@@ -1,8 +0,0 @@
github.com/alex-shpak/hugo-book v0.0.0-20221111100854-d5b75f4fb3aa h1:VthswmcR+7NtpamidIRuFq+8JRAz4v+s7xVJ0MmeLqM=
github.com/alex-shpak/hugo-book v0.0.0-20221111100854-d5b75f4fb3aa/go.mod h1:L4NMyzbn15fpLIpmmtDg9ZFFyTZzw87/lk7M2bMQ7ds=
github.com/alex-shpak/hugo-book v0.0.0-20230424134111-d86d5e70c7c0 h1:Bj/rhvEOix4TXwbzlZttiIi+5fTOqT3aQs1zMsprIXQ=
github.com/alex-shpak/hugo-book v0.0.0-20230424134111-d86d5e70c7c0/go.mod h1:L4NMyzbn15fpLIpmmtDg9ZFFyTZzw87/lk7M2bMQ7ds=
github.com/h-enk/doks-child-theme v0.5.0 h1:OrLbcGv6GfhDMs8O2OK93e0hUMvV1aygJWeAdKMcdiU=
github.com/h-enk/doks-child-theme v0.5.0/go.mod h1:SCLBJIX7W4LH6rbaY9v31i1fwk0DRYoVwDWNMiRpE78=
github.com/theNewDynamic/gohugo-theme-ananke v0.0.0-20221031153459-b393088d0930 h1:HH3nIivNlAVSYE9dvB0MD/cWunI1FpN6RDS6FziSFcs=
github.com/theNewDynamic/gohugo-theme-ananke v0.0.0-20221031153459-b393088d0930/go.mod h1:yY14BLqqh5G61rO81YcJKMHY1rClY5iIiUK+K2JKSUM=
8 changes: 5 additions & 3 deletions mmv1/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/GoogleCloudPlatform/magic-modules/mmv1

go 1.21
go 1.23

require (
golang.org/x/exp v0.0.0-20240222234643-814bf88cf225
Expand All @@ -9,10 +9,12 @@ require (

require github.com/golang/glog v1.2.0

require github.com/otiai10/copy v1.9.0
require (
github.com/getkin/kin-openapi v0.127.0
github.com/otiai10/copy v1.9.0
)

require (
github.com/getkin/kin-openapi v0.127.0 // indirect
github.com/go-openapi/jsonpointer v0.21.0 // indirect
github.com/go-openapi/swag v0.23.0 // indirect
github.com/invopop/yaml v0.3.1 // indirect
Expand Down
20 changes: 19 additions & 1 deletion mmv1/go.sum
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/getkin/kin-openapi v0.127.0 h1:Mghqi3Dhryf3F8vR370nN67pAERW+3a95vomb3MAREY=
github.com/getkin/kin-openapi v0.127.0/go.mod h1:OZrfXzUfGrNbsKj+xmFBx6E5c6yH3At/tAKSc2UszXM=
github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ=
github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY=
github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE=
github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ=
github.com/go-test/deep v1.0.8 h1:TDsG77qcSprGbC6vTN8OuXp5g+J+b5Pcguhf7Zt61VM=
github.com/go-test/deep v1.0.8/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE=
github.com/golang/glog v1.2.0 h1:uCdmnmatrKCgMBlM4rMuJZWOkPDqdbZPnrMXDY4gI68=
github.com/golang/glog v1.2.0/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
Expand All @@ -12,6 +16,10 @@ github.com/invopop/yaml v0.3.1 h1:f0+ZpmhfBSS4MhG+4HYseMdJhoeeopbSKbq5Rpeelso=
github.com/invopop/yaml v0.3.1/go.mod h1:PMOp3nn4/12yEZUFfmOuNHJsZToEEOwoWsT+D81KkeA=
github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY=
github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9M+97sNutRR1RKhG96O6jWumTTnw=
Expand All @@ -21,15 +29,25 @@ github.com/otiai10/copy v1.9.0/go.mod h1:hsfX19wcn0UWIHUQ3/4fHuehhk2UyArQ9dVFAn3
github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE=
github.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6j4vs=
github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo=
github.com/otiai10/mint v1.4.0 h1:umwcf7gbpEwf7WFzqmWwSv0CzbeMsae2u9ZvpP8j2q4=
github.com/otiai10/mint v1.4.0/go.mod h1:gifjb2MYOoULtKLqUAEILUG/9KONW6f7YsJ6vQLTlFI=
github.com/perimeterx/marshmallow v1.1.5 h1:a2LALqQ1BlHM8PZblsDdidgv1mWi1DgC2UmX50IvK2s=
github.com/perimeterx/marshmallow v1.1.5/go.mod h1:dsXbUu8CRzfYP5a87xpp0xq9S3u0Vchtcl8we9tYaXw=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8=
github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0=
github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY=
golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 h1:LfspQV/FYTatPTr/3HzIcmiUFH7PGP+OQ6mgDYo3yuQ=
golang.org/x/exp v0.0.0-20240222234643-814bf88cf225/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 h1:0A+M6Uqn+Eje4kHMK80dtF3JCXC4ykBgQG4Fe06QRhQ=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
Expand Down
2 changes: 1 addition & 1 deletion mmv1/third_party/terraform/.go-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.21
1.23
2 changes: 1 addition & 1 deletion mmv1/third_party/terraform/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/hashicorp/terraform-provider-google

go 1.21
go 1.23

require (
cloud.google.com/go/bigtable v1.33.0
Expand Down
2 changes: 1 addition & 1 deletion mmv1/third_party/terraform/scripts/go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module github.com/hashicorp/terraform-provider-google/scripts

go 1.21
go 1.23
4 changes: 2 additions & 2 deletions scripts/doctor
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ if [ $found -eq 0 ]; then
else
version=($(go version))
version=${version[2]}
if [[ "$version" < "go1.21.0" ]]; then
if [[ "$version" < "go1.23.0" ]]; then
exitcode=1
warn "yel" " $version is installed, but go 1.21 or later is required. See https://golang.org/doc/install for information on installing it."
warn "yel" " $version is installed, but go 1.23 or later is required. See https://golang.org/doc/install for information on installing it."
fi
if [[ -z "${GOPATH}" ]]; then
exitcode=1
Expand Down
2 changes: 1 addition & 1 deletion tools/diff-processor/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/GoogleCloudPlatform/magic-modules/tools/diff-processor

go 1.21
go 1.23

replace google/provider/old => ./old

Expand Down
2 changes: 1 addition & 1 deletion tools/issue-labeler/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/GoogleCloudPlatform/magic-modules/tools/issue-labeler

go 1.21
go 1.23

require (
github.com/golang/glog v1.1.1
Expand Down
2 changes: 1 addition & 1 deletion tools/teamcity-generator/go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module github.com/GoogleCloudPlatform/magic-modules/tools/teamcity-generator

go 1.21
go 1.23

require golang.org/x/text v0.11.0
2 changes: 1 addition & 1 deletion tools/template-check/go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module github.com/GoogleCloudPlatform/magic-modules/tools/template-check

go 1.21
go 1.23
2 changes: 1 addition & 1 deletion tools/test-reader/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/GoogleCloudPlatform/magic-modules/tools/test-reader

go 1.21
go 1.23

require (
github.com/hashicorp/hcl/v2 v2.20.1
Expand Down
2 changes: 1 addition & 1 deletion tpgtools/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/GoogleCloudPlatform/magic-modules/tpgtools

go 1.21
go 1.23

require (
bitbucket.org/creachadair/stringset v0.0.11
Expand Down

0 comments on commit e2fe4fa

Please sign in to comment.