Skip to content

Commit 7515dbe

Browse files
authored
Bump Go from 1.16.x to 1.18.x (#1413)
* Bump Go version for docker & github actions * Use of go 1.18 instead of 1.16 to support latest hashicorp/hcl/v2 Otherwise, get following error when compiling: ``` vendor/github.com/hashicorp/hcl/v2/diagnostic_typeparams.go:22:22: type parameter requires go1.18 or later (-lang was set to go1.16; check go.mod) vendor/github.com/hashicorp/hcl/v2/diagnostic_typeparams.go:22:24: undeclared name: any (requires version go1.18 or later) ```
1 parent 3cf1c72 commit 7515dbe

File tree

7 files changed

+70
-43
lines changed

7 files changed

+70
-43
lines changed

.devcontainer/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG VARIANT=1.16-bullseye
1+
ARG VARIANT=1.18-bullseye
22
FROM mcr.microsoft.com/vscode/devcontainers/go:${VARIANT}
33

44
ARG TERRAFORM_VERSION=1.0.0
@@ -37,6 +37,6 @@ RUN \
3737
# # --> Go symbols and outline for go to symbol support and test support
3838
&& go install github.com/acroca/[email protected] \
3939
# # --> Static checker
40-
&& go install honnef.co/go/tools/cmd/staticcheck@v0.2.2 \
40+
&& go install honnef.co/go/tools/cmd/staticcheck@v0.3.2 \
4141
# # --> TF formatter
42-
&& go get github.com/katbyte/terrafmt
42+
&& go get github.com/katbyte/terrafmt

.devcontainer/devcontainer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// Update the VARIANT arg to pick a version of Go: 1, 1.18, 1.17
99
// Append -bullseye or -buster to pin to an OS version.
1010
// Use -bullseye variants on local arm64/Apple Silicon.
11-
"VARIANT": "1.16-bullseye",
11+
"VARIANT": "1.18-bullseye",
1212
// Options
1313
"NODE_VERSION": "none"
1414
}
@@ -64,4 +64,4 @@
6464
"ms-vsliveshare.vsliveshare"
6565
],
6666
"remoteUser": "vscode"
67-
}
67+
}

.github/workflows/push.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- name: Set up Go
2020
uses: actions/setup-go@v1
2121
with:
22-
go-version: 1.16.x
22+
go-version: 1.18.x
2323

2424
- name: Cache packages
2525
uses: actions/cache@v2
@@ -37,8 +37,8 @@ jobs:
3737
run: |
3838
echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV
3939
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
40-
go get gotest.tools/gotestsum
41-
go install honnef.co/go/tools/cmd/staticcheck@v0.2.2
40+
go install gotest.tools/gotestsum@latest
41+
go install honnef.co/go/tools/cmd/staticcheck@v0.3.2
4242
4343
- name: Pull external libraries
4444
run: make vendor

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
name: Set up Go
2020
uses: actions/setup-go@v1
2121
with:
22-
go-version: 1.16.x
22+
go-version: 1.18.x
2323
-
2424
name: Import GPG key
2525
id: import_gpg
@@ -40,4 +40,4 @@ jobs:
4040
# use GITHUB_TOKEN that is already available in secrets.GITHUB_TOKEN
4141
# https://docs.github.com/en/free-pro-team@latest/actions/reference/authentication-in-a-workflow#permissions-for-the-github_token
4242
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43-
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
43+
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ Make sure you have `$GOPATH/bin` in your `$PATH`:
5959
echo "export PATH=\$PATH:$(go env GOPATH)/bin" >> ~/.bash_profile
6060
```
6161

62-
Installing `staticcheck`:
62+
Installing `staticcheck` (the version that works with Go 1.18):
6363
```bash
64-
go install honnef.co/go/tools/cmd/staticcheck
64+
go install honnef.co/go/tools/cmd/staticcheck@v0.3.2
6565
```
6666

6767
Installing `gotestsum`:

go.mod

Lines changed: 58 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/databricks/terraform-provider-databricks
22

3-
go 1.16
3+
go 1.18
44

55
require (
66
github.com/Azure/go-autorest/autorest v0.11.27
@@ -23,3 +23,60 @@ require (
2323
google.golang.org/api v0.86.0
2424
gopkg.in/ini.v1 v1.66.6
2525
)
26+
27+
require (
28+
cloud.google.com/go/compute v1.7.0 // indirect
29+
github.com/Azure/go-autorest v14.2.0+incompatible // indirect
30+
github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect
31+
github.com/Azure/go-autorest/logger v0.2.1 // indirect
32+
github.com/Azure/go-autorest/tracing v0.6.0 // indirect
33+
github.com/agext/levenshtein v1.2.2 // indirect
34+
github.com/apparentlymart/go-cidr v1.1.0 // indirect
35+
github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect
36+
github.com/davecgh/go-spew v1.1.1 // indirect
37+
github.com/dimchansky/utfbom v1.1.1 // indirect
38+
github.com/fatih/color v1.7.0 // indirect
39+
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect
40+
github.com/golang/protobuf v1.5.2 // indirect
41+
github.com/google/go-cmp v0.5.8 // indirect
42+
github.com/googleapis/enterprise-certificate-proxy v0.1.0 // indirect
43+
github.com/hashicorp/errwrap v1.0.0 // indirect
44+
github.com/hashicorp/go-checkpoint v0.5.0 // indirect
45+
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
46+
github.com/hashicorp/go-hclog v1.2.0 // indirect
47+
github.com/hashicorp/go-multierror v1.1.1 // indirect
48+
github.com/hashicorp/go-plugin v1.4.4 // indirect
49+
github.com/hashicorp/go-uuid v1.0.3 // indirect
50+
github.com/hashicorp/go-version v1.5.0 // indirect
51+
github.com/hashicorp/hc-install v0.3.2 // indirect
52+
github.com/hashicorp/logutils v1.0.0 // indirect
53+
github.com/hashicorp/terraform-exec v0.16.1 // indirect
54+
github.com/hashicorp/terraform-json v0.14.0 // indirect
55+
github.com/hashicorp/terraform-plugin-go v0.9.1 // indirect
56+
github.com/hashicorp/terraform-plugin-log v0.4.0 // indirect
57+
github.com/hashicorp/terraform-registry-address v0.0.0-20210412075316-9b2996cce896 // indirect
58+
github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734 // indirect
59+
github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d // indirect
60+
github.com/mattn/go-colorable v0.1.4 // indirect
61+
github.com/mattn/go-isatty v0.0.10 // indirect
62+
github.com/mitchellh/copystructure v1.2.0 // indirect
63+
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
64+
github.com/mitchellh/go-wordwrap v1.0.0 // indirect
65+
github.com/mitchellh/mapstructure v1.5.0 // indirect
66+
github.com/mitchellh/reflectwalk v1.0.2 // indirect
67+
github.com/oklog/run v1.0.0 // indirect
68+
github.com/pmezard/go-difflib v1.0.0 // indirect
69+
github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect
70+
github.com/vmihailenco/msgpack/v4 v4.3.12 // indirect
71+
github.com/vmihailenco/tagparser v0.1.1 // indirect
72+
go.opencensus.io v0.23.0 // indirect
73+
golang.org/x/crypto v0.0.0-20220517005047-85d78b3ac167 // indirect
74+
golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e // indirect
75+
golang.org/x/sys v0.0.0-20220624220833-87e55d714810 // indirect
76+
golang.org/x/text v0.3.7 // indirect
77+
google.golang.org/appengine v1.6.7 // indirect
78+
google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f // indirect
79+
google.golang.org/grpc v1.47.0 // indirect
80+
google.golang.org/protobuf v1.28.0 // indirect
81+
gopkg.in/yaml.v3 v3.0.1 // indirect
82+
)

0 commit comments

Comments
 (0)