Skip to content

Commit f077402

Browse files
Upgrade to go 1.18 (#446)
PRs like #445 are failing because golangci's new image is Go 1.18 `strings.Title` was deprecated in 1.18 So, we might as well upgrade to 1.18 and fix the `strings.Title` usage Also, as a drive-by, I updated the Grafana versions in pipelines
1 parent b37d1e9 commit f077402

File tree

8 files changed

+27
-1059
lines changed

8 files changed

+27
-1059
lines changed

.drone/drone.jsonnet

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
local grafanaVersions = ['8.4.3', '8.3.5', '8.2.7', '8.1.8', '7.5.15'];
1+
local grafanaVersions = ['8.4.4', '8.3.7', '8.2.7', '8.1.8', '7.5.15'];
22
local images = {
3-
go: 'golang:1.17',
3+
go: 'golang:1.18',
44
lint: 'golangci/golangci-lint',
55
grafana(version): 'grafana/grafana:' + version,
66
};

.drone/drone.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ steps:
3636
- ' echo "docs are out of sync, run \"go generate\""'
3737
- ' exit 1'
3838
- fi
39-
image: golang:1.17
39+
image: golang:1.18
4040
name: check for drift
4141
trigger:
4242
branch:
@@ -57,7 +57,7 @@ services: []
5757
steps:
5858
- commands:
5959
- go test ./...
60-
image: golang:1.17
60+
image: golang:1.18
6161
name: tests
6262
trigger:
6363
branch:
@@ -84,7 +84,7 @@ steps:
8484
GRAFANA_CLOUD_API_KEY:
8585
from_secret: grafana-cloud-api-key
8686
GRAFANA_CLOUD_ORG: terraformprovidergrafana
87-
image: golang:1.17
87+
image: golang:1.18
8888
name: tests
8989
trigger:
9090
branch:
@@ -114,7 +114,7 @@ steps:
114114
GRAFANA_SM_ACCESS_TOKEN:
115115
from_secret: grafana-sm-token
116116
GRAFANA_URL: https://terraformprovidergrafana.grafana.net/
117-
image: golang:1.17
117+
image: golang:1.18
118118
name: tests
119119
trigger:
120120
branch:
@@ -145,14 +145,14 @@ kind: secret
145145
name: grafana-sm-token
146146
---
147147
kind: pipeline
148-
name: 'oss tests: 8.4.3'
148+
name: 'oss tests: 8.4.4'
149149
platform:
150150
arch: amd64
151151
os: linux
152152
services:
153153
- environment:
154154
GF_DATABASE_URL: sqlite3:///var/lib/grafana/grafana.db?cache=private&mode=rwc&_journal_mode=WAL
155-
image: grafana/grafana:8.4.3
155+
image: grafana/grafana:8.4.4
156156
name: grafana
157157
steps:
158158
- commands:
@@ -162,8 +162,8 @@ steps:
162162
GRAFANA_AUTH: admin:admin
163163
GRAFANA_ORG_ID: 1
164164
GRAFANA_URL: http://grafana:3000
165-
GRAFANA_VERSION: 8.4.3
166-
image: golang:1.17
165+
GRAFANA_VERSION: 8.4.4
166+
image: golang:1.18
167167
name: tests
168168
trigger:
169169
branch:
@@ -176,14 +176,14 @@ workspace:
176176
path: /drone/terraform-provider-grafana
177177
---
178178
kind: pipeline
179-
name: 'oss tests: 8.3.5'
179+
name: 'oss tests: 8.3.7'
180180
platform:
181181
arch: amd64
182182
os: linux
183183
services:
184184
- environment:
185185
GF_DATABASE_URL: sqlite3:///var/lib/grafana/grafana.db?cache=private&mode=rwc&_journal_mode=WAL
186-
image: grafana/grafana:8.3.5
186+
image: grafana/grafana:8.3.7
187187
name: grafana
188188
steps:
189189
- commands:
@@ -193,8 +193,8 @@ steps:
193193
GRAFANA_AUTH: admin:admin
194194
GRAFANA_ORG_ID: 1
195195
GRAFANA_URL: http://grafana:3000
196-
GRAFANA_VERSION: 8.3.5
197-
image: golang:1.17
196+
GRAFANA_VERSION: 8.3.7
197+
image: golang:1.18
198198
name: tests
199199
trigger:
200200
branch:
@@ -225,7 +225,7 @@ steps:
225225
GRAFANA_ORG_ID: 1
226226
GRAFANA_URL: http://grafana:3000
227227
GRAFANA_VERSION: 8.2.7
228-
image: golang:1.17
228+
image: golang:1.18
229229
name: tests
230230
trigger:
231231
branch:
@@ -256,7 +256,7 @@ steps:
256256
GRAFANA_ORG_ID: 1
257257
GRAFANA_URL: http://grafana:3000
258258
GRAFANA_VERSION: 8.1.8
259-
image: golang:1.17
259+
image: golang:1.18
260260
name: tests
261261
trigger:
262262
branch:
@@ -287,7 +287,7 @@ steps:
287287
GRAFANA_ORG_ID: 1
288288
GRAFANA_URL: http://grafana:3000
289289
GRAFANA_VERSION: 7.5.15
290-
image: golang:1.17
290+
image: golang:1.18
291291
name: tests
292292
trigger:
293293
branch:
@@ -300,6 +300,6 @@ workspace:
300300
path: /drone/terraform-provider-grafana
301301
---
302302
kind: signature
303-
hmac: 7b059c8a8d75e11b8d0dc6643b5590761dacc5c419b778766960d748d4629546
303+
hmac: fb944ed34626806208f6ad39935f7d01bf1de4e6ee696f779c2b8b8f4233189b
304304

305305
...

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- name: Set up Go
2626
uses: actions/setup-go@v2
2727
with:
28-
go-version: 1.17
28+
go-version: 1.18
2929
- name: Import GPG key
3030
id: import_gpg
3131
uses: paultyng/[email protected]

GNUmakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
GRAFANA_VERSION ?= 8.4.3
1+
GRAFANA_VERSION ?= 8.4.4
22

33
testacc:
44
TF_ACC=1 go test ./... -v $(TESTARGS) -timeout 120m

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ networks:
77
services:
88

99
grafana-provider:
10-
image: golang:1.17
10+
image: golang:1.18
1111
environment:
1212
- GRAFANA_URL=http://grafana:3000
1313
- GRAFANA_AUTH=admin:admin

go.mod

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

3-
go 1.17
3+
go 1.18
44

55
require (
66
github.com/Masterminds/semver/v3 v3.1.1
@@ -12,6 +12,7 @@ require (
1212
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320
1313
github.com/hashicorp/terraform-plugin-docs v0.7.0
1414
github.com/hashicorp/terraform-plugin-sdk/v2 v2.12.0
15+
golang.org/x/text v0.3.7
1516
)
1617

1718
require (
@@ -66,7 +67,6 @@ require (
6667
golang.org/x/crypto v0.0.0-20211215165025-cf75a172585e // indirect
6768
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd // indirect
6869
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9 // indirect
69-
golang.org/x/text v0.3.7 // indirect
7070
google.golang.org/appengine v1.6.7 // indirect
7171
google.golang.org/genproto v0.0.0-20210917145530-b395a37504d4 // indirect
7272
google.golang.org/grpc v1.45.0 // indirect

0 commit comments

Comments
 (0)