Security: Update to Go 1.22.11 - Backport to v11.2.x (#99125)

* feat: update to Go 1.22.11

* chore: make drone

* CI: Force re-build

* build: update mariadb connection

The new Alpine base that the Golang images are built on no longer trust the CA of MySQL.

This is a backport of: https://github.com/grafana/grafana/pull/98857

(cherry picked from commit e1bb8ccb79)
This commit is contained in:
Mariell Hoversholm
2025-01-17 09:37:17 +01:00
committed by GitHub
parent bc7b67ff6a
commit 332064fecf
7 changed files with 144 additions and 144 deletions
+137 -137
View File
@@ -25,7 +25,7 @@ steps:
depends_on: []
environment:
CGO_ENABLED: 0
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: compile-build-cmd
- commands:
- ./bin/build verify-drone
@@ -75,7 +75,7 @@ steps:
- go install github.com/bazelbuild/buildtools/buildifier@latest
- buildifier --lint=warn -mode=check -r .
depends_on: []
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: lint-starlark
trigger:
event:
@@ -424,7 +424,7 @@ steps:
- apk add --update make
- CODEGEN_VERIFY=1 make gen-cue
depends_on: []
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: verify-gen-cue
- commands:
- '# It is required that generated jsonnet is committed and in sync with its inputs.'
@@ -433,21 +433,21 @@ steps:
- apk add --update make
- CODEGEN_VERIFY=1 make gen-jsonnet
depends_on: []
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: verify-gen-jsonnet
- commands:
- apk add --update make
- make gen-go
depends_on:
- verify-gen-cue
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: wire-install
- commands:
- apk add --update build-base shared-mime-info shared-mime-info-lang
- go list -f '{{.Dir}}/...' -m | xargs go test -short -covermode=atomic -timeout=5m
depends_on:
- wire-install
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: test-backend
- commands:
- apk add --update build-base
@@ -456,7 +456,7 @@ steps:
| grep -o '\(.*\)/' | sort -u)
depends_on:
- wire-install
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: test-backend-integration
trigger:
event:
@@ -510,7 +510,7 @@ steps:
depends_on: []
environment:
CGO_ENABLED: 0
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: compile-build-cmd
- commands:
- echo $(/usr/bin/github-app-external-token) > /github-app/token
@@ -554,16 +554,16 @@ steps:
- apk add --update make
- make gen-go
depends_on: []
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: wire-install
- commands:
- go run scripts/modowners/modowners.go check go.mod
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: validate-modfile
- commands:
- apk add --update make
- make swagger-validate
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: validate-openapi-spec
trigger:
event:
@@ -638,7 +638,7 @@ steps:
depends_on: []
environment:
CGO_ENABLED: 0
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: compile-build-cmd
- commands:
- '# It is required that code generated from Thema/CUE be committed and in sync
@@ -648,7 +648,7 @@ steps:
- apk add --update make
- CODEGEN_VERIFY=1 make gen-cue
depends_on: []
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: verify-gen-cue
- commands:
- '# It is required that generated jsonnet is committed and in sync with its inputs.'
@@ -657,14 +657,14 @@ steps:
- apk add --update make
- CODEGEN_VERIFY=1 make gen-jsonnet
depends_on: []
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: verify-gen-jsonnet
- commands:
- apk add --update make
- make gen-go
depends_on:
- verify-gen-cue
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: wire-install
- commands:
- yarn install --immutable || yarn install --immutable
@@ -697,7 +697,7 @@ steps:
from_secret: drone_token
- commands:
- /src/grafana-build artifacts -a targz:grafana:linux/amd64 -a targz:grafana:linux/arm64
-a targz:grafana:linux/arm/v7 --go-version=1.22.7 --yarn-cache=$$YARN_CACHE_FOLDER
-a targz:grafana:linux/arm/v7 --go-version=1.22.11 --yarn-cache=$$YARN_CACHE_FOLDER
--build-id=$$DRONE_BUILD_NUMBER --grafana-dir=$$PWD > packages.txt
depends_on:
- yarn-install
@@ -941,7 +941,7 @@ steps:
- /src/grafana-build artifacts -a docker:grafana:linux/amd64 -a docker:grafana:linux/amd64:ubuntu
-a docker:grafana:linux/arm64 -a docker:grafana:linux/arm64:ubuntu -a docker:grafana:linux/arm/v7
-a docker:grafana:linux/arm/v7:ubuntu --yarn-cache=$$YARN_CACHE_FOLDER --build-id=$$DRONE_BUILD_NUMBER
--go-version=1.22.7 --ubuntu-base=ubuntu:22.04 --alpine-base=alpine:3.20.3 --tag-format='{{
--go-version=1.22.11 --ubuntu-base=ubuntu:22.04 --alpine-base=alpine:3.20.3 --tag-format='{{
.version_base }}-{{ .buildID }}-{{ .arch }}' --grafana-dir=$$PWD --ubuntu-tag-format='{{
.version_base }}-{{ .buildID }}-ubuntu-{{ .arch }}' > docker.txt
- find ./dist -name '*docker*.tar.gz' -type f | xargs -n1 docker load -i
@@ -1104,7 +1104,7 @@ steps:
depends_on: []
environment:
CGO_ENABLED: 0
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: compile-build-cmd
- commands:
- echo $DRONE_RUNNER_NAME
@@ -1118,7 +1118,7 @@ steps:
- apk add --update make
- CODEGEN_VERIFY=1 make gen-cue
depends_on: []
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: verify-gen-cue
- commands:
- '# It is required that generated jsonnet is committed and in sync with its inputs.'
@@ -1127,14 +1127,14 @@ steps:
- apk add --update make
- CODEGEN_VERIFY=1 make gen-jsonnet
depends_on: []
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: verify-gen-jsonnet
- commands:
- apk add --update make
- make gen-go
depends_on:
- verify-gen-cue
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: wire-install
- commands:
- dockerize -wait tcp://postgres:5432 -timeout 120s
@@ -1155,7 +1155,7 @@ steps:
GRAFANA_TEST_DB: postgres
PGPASSWORD: grafanatest
POSTGRES_HOST: postgres
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: postgres-integration-tests
- commands:
- dockerize -wait tcp://mysql57:3306 -timeout 120s
@@ -1163,9 +1163,9 @@ steps:
name: wait-for-mysql-5.7
- commands:
- apk add --update build-base
- apk add --update mysql-client
- cat devenv/docker/blocks/mysql_tests/setup.sql | mysql -h mysql57 -P 3306 -u root
-prootpass
- apk add --update mariadb-client
- cat devenv/docker/blocks/mysql_tests/setup.sql | mariadb -h mysql57 -P 3306 -u
root -prootpass --disable-ssl-verify-server-cert
- go clean -testcache
- go test -p=1 -count=1 -covermode=atomic -timeout=5m -run '^TestIntegration' $(find
./pkg -type f -name '*_test.go' -exec grep -l '^func TestIntegration' '{}' '+'
@@ -1176,7 +1176,7 @@ steps:
environment:
GRAFANA_TEST_DB: mysql
MYSQL_HOST: mysql57
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: mysql-5.7-integration-tests
- commands:
- dockerize -wait tcp://mysql80:3306 -timeout 120s
@@ -1184,9 +1184,9 @@ steps:
name: wait-for-mysql-8.0
- commands:
- apk add --update build-base
- apk add --update mysql-client
- cat devenv/docker/blocks/mysql_tests/setup.sql | mysql -h mysql80 -P 3306 -u root
-prootpass
- apk add --update mariadb-client
- cat devenv/docker/blocks/mysql_tests/setup.sql | mariadb -h mysql80 -P 3306 -u
root -prootpass --disable-ssl-verify-server-cert
- go clean -testcache
- go test -p=1 -count=1 -covermode=atomic -timeout=5m -run '^TestIntegration' $(find
./pkg -type f -name '*_test.go' -exec grep -l '^func TestIntegration' '{}' '+'
@@ -1197,7 +1197,7 @@ steps:
environment:
GRAFANA_TEST_DB: mysql
MYSQL_HOST: mysql80
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: mysql-8.0-integration-tests
- commands:
- dockerize -wait tcp://redis:6379 -timeout 120s
@@ -1213,7 +1213,7 @@ steps:
- wait-for-redis
environment:
REDIS_URL: redis://redis:6379/0
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: redis-integration-tests
- commands:
- dockerize -wait tcp://memcached:11211 -timeout 120s
@@ -1229,7 +1229,7 @@ steps:
- wait-for-memcached
environment:
MEMCACHED_HOSTS: memcached:11211
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: memcached-integration-tests
- commands:
- dockerize -wait tcp://mimir_backend:8080 -timeout 120s
@@ -1246,7 +1246,7 @@ steps:
AM_TENANT_ID: test
AM_URL: http://mimir_backend:8080
failure: ignore
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: remote-alertmanager-integration-tests
trigger:
event:
@@ -1336,7 +1336,7 @@ steps:
- apk add --update make
- CODEGEN_VERIFY=1 make gen-cue
depends_on: []
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: verify-gen-cue
trigger:
event:
@@ -1456,7 +1456,7 @@ steps:
&& return 1; fi
depends_on:
- clone-enterprise
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: swagger-gen
trigger:
event:
@@ -1571,7 +1571,7 @@ steps:
depends_on: []
environment:
CGO_ENABLED: 0
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: compile-build-cmd
- commands:
- '# It is required that code generated from Thema/CUE be committed and in sync
@@ -1582,7 +1582,7 @@ steps:
- CODEGEN_VERIFY=1 make gen-cue
depends_on:
- clone-enterprise
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: verify-gen-cue
- commands:
- '# It is required that generated jsonnet is committed and in sync with its inputs.'
@@ -1592,14 +1592,14 @@ steps:
- CODEGEN_VERIFY=1 make gen-jsonnet
depends_on:
- clone-enterprise
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: verify-gen-jsonnet
- commands:
- apk add --update make
- make gen-go
depends_on:
- verify-gen-cue
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: wire-install
- commands:
- apk add --update build-base
@@ -1607,7 +1607,7 @@ steps:
- go test -v -run=^$ -benchmem -timeout=1h -count=8 -bench=. ${GO_PACKAGES}
depends_on:
- wire-install
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: sqlite-benchmark-integration-tests
- commands:
- apk add --update build-base
@@ -1619,7 +1619,7 @@ steps:
GRAFANA_TEST_DB: postgres
PGPASSWORD: grafanatest
POSTGRES_HOST: postgres
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: postgres-benchmark-integration-tests
- commands:
- apk add --update build-base
@@ -1630,7 +1630,7 @@ steps:
environment:
GRAFANA_TEST_DB: mysql
MYSQL_HOST: mysql57
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: mysql-5.7-benchmark-integration-tests
- commands:
- apk add --update build-base
@@ -1641,7 +1641,7 @@ steps:
environment:
GRAFANA_TEST_DB: mysql
MYSQL_HOST: mysql80
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: mysql-8.0-benchmark-integration-tests
trigger:
event:
@@ -1721,7 +1721,7 @@ steps:
- apk add --update make
- CODEGEN_VERIFY=1 make gen-cue
depends_on: []
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: verify-gen-cue
trigger:
branch: main
@@ -1894,7 +1894,7 @@ steps:
- apk add --update make
- CODEGEN_VERIFY=1 make gen-cue
depends_on: []
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: verify-gen-cue
- commands:
- '# It is required that generated jsonnet is committed and in sync with its inputs.'
@@ -1903,21 +1903,21 @@ steps:
- apk add --update make
- CODEGEN_VERIFY=1 make gen-jsonnet
depends_on: []
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: verify-gen-jsonnet
- commands:
- apk add --update make
- make gen-go
depends_on:
- verify-gen-cue
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: wire-install
- commands:
- apk add --update build-base shared-mime-info shared-mime-info-lang
- go list -f '{{.Dir}}/...' -m | xargs go test -short -covermode=atomic -timeout=5m
depends_on:
- wire-install
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: test-backend
- commands:
- apk add --update build-base
@@ -1926,7 +1926,7 @@ steps:
| grep -o '\(.*\)/' | sort -u)
depends_on:
- wire-install
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: test-backend-integration
trigger:
branch: main
@@ -1971,22 +1971,22 @@ steps:
depends_on: []
environment:
CGO_ENABLED: 0
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: compile-build-cmd
- commands:
- apk add --update make
- make gen-go
depends_on: []
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: wire-install
- commands:
- go run scripts/modowners/modowners.go check go.mod
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: validate-modfile
- commands:
- apk add --update make
- make swagger-validate
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: validate-openapi-spec
- commands:
- ./bin/build verify-drone
@@ -2117,7 +2117,7 @@ steps:
depends_on: []
environment:
CGO_ENABLED: 0
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: compile-build-cmd
- commands:
- '# It is required that code generated from Thema/CUE be committed and in sync
@@ -2127,7 +2127,7 @@ steps:
- apk add --update make
- CODEGEN_VERIFY=1 make gen-cue
depends_on: []
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: verify-gen-cue
- commands:
- '# It is required that generated jsonnet is committed and in sync with its inputs.'
@@ -2136,14 +2136,14 @@ steps:
- apk add --update make
- CODEGEN_VERIFY=1 make gen-jsonnet
depends_on: []
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: verify-gen-jsonnet
- commands:
- apk add --update make
- make gen-go
depends_on:
- verify-gen-cue
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: wire-install
- commands:
- yarn install --immutable || yarn install --immutable
@@ -2175,7 +2175,7 @@ steps:
name: build-frontend-packages
- commands:
- /src/grafana-build artifacts -a targz:grafana:linux/amd64 -a targz:grafana:linux/arm64
-a targz:grafana:linux/arm/v7 --go-version=1.22.7 --yarn-cache=$$YARN_CACHE_FOLDER
-a targz:grafana:linux/arm/v7 --go-version=1.22.11 --yarn-cache=$$YARN_CACHE_FOLDER
--build-id=$$DRONE_BUILD_NUMBER --grafana-dir=$$PWD > packages.txt
depends_on:
- update-package-json-version
@@ -2455,7 +2455,7 @@ steps:
- /src/grafana-build artifacts -a docker:grafana:linux/amd64 -a docker:grafana:linux/amd64:ubuntu
-a docker:grafana:linux/arm64 -a docker:grafana:linux/arm64:ubuntu -a docker:grafana:linux/arm/v7
-a docker:grafana:linux/arm/v7:ubuntu --yarn-cache=$$YARN_CACHE_FOLDER --build-id=$$DRONE_BUILD_NUMBER
--go-version=1.22.7 --ubuntu-base=ubuntu:22.04 --alpine-base=alpine:3.20.3 --tag-format='{{
--go-version=1.22.11 --ubuntu-base=ubuntu:22.04 --alpine-base=alpine:3.20.3 --tag-format='{{
.version_base }}-{{ .buildID }}-{{ .arch }}' --grafana-dir=$$PWD --ubuntu-tag-format='{{
.version_base }}-{{ .buildID }}-ubuntu-{{ .arch }}' > docker.txt
- find ./dist -name '*docker*.tar.gz' -type f | xargs -n1 docker load -i
@@ -2663,7 +2663,7 @@ steps:
depends_on: []
environment:
CGO_ENABLED: 0
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: compile-build-cmd
- commands:
- echo $DRONE_RUNNER_NAME
@@ -2677,7 +2677,7 @@ steps:
- apk add --update make
- CODEGEN_VERIFY=1 make gen-cue
depends_on: []
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: verify-gen-cue
- commands:
- '# It is required that generated jsonnet is committed and in sync with its inputs.'
@@ -2686,14 +2686,14 @@ steps:
- apk add --update make
- CODEGEN_VERIFY=1 make gen-jsonnet
depends_on: []
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: verify-gen-jsonnet
- commands:
- apk add --update make
- make gen-go
depends_on:
- verify-gen-cue
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: wire-install
- commands:
- dockerize -wait tcp://postgres:5432 -timeout 120s
@@ -2714,7 +2714,7 @@ steps:
GRAFANA_TEST_DB: postgres
PGPASSWORD: grafanatest
POSTGRES_HOST: postgres
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: postgres-integration-tests
- commands:
- dockerize -wait tcp://mysql57:3306 -timeout 120s
@@ -2722,9 +2722,9 @@ steps:
name: wait-for-mysql-5.7
- commands:
- apk add --update build-base
- apk add --update mysql-client
- cat devenv/docker/blocks/mysql_tests/setup.sql | mysql -h mysql57 -P 3306 -u root
-prootpass
- apk add --update mariadb-client
- cat devenv/docker/blocks/mysql_tests/setup.sql | mariadb -h mysql57 -P 3306 -u
root -prootpass --disable-ssl-verify-server-cert
- go clean -testcache
- go test -p=1 -count=1 -covermode=atomic -timeout=5m -run '^TestIntegration' $(find
./pkg -type f -name '*_test.go' -exec grep -l '^func TestIntegration' '{}' '+'
@@ -2735,7 +2735,7 @@ steps:
environment:
GRAFANA_TEST_DB: mysql
MYSQL_HOST: mysql57
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: mysql-5.7-integration-tests
- commands:
- dockerize -wait tcp://mysql80:3306 -timeout 120s
@@ -2743,9 +2743,9 @@ steps:
name: wait-for-mysql-8.0
- commands:
- apk add --update build-base
- apk add --update mysql-client
- cat devenv/docker/blocks/mysql_tests/setup.sql | mysql -h mysql80 -P 3306 -u root
-prootpass
- apk add --update mariadb-client
- cat devenv/docker/blocks/mysql_tests/setup.sql | mariadb -h mysql80 -P 3306 -u
root -prootpass --disable-ssl-verify-server-cert
- go clean -testcache
- go test -p=1 -count=1 -covermode=atomic -timeout=5m -run '^TestIntegration' $(find
./pkg -type f -name '*_test.go' -exec grep -l '^func TestIntegration' '{}' '+'
@@ -2756,7 +2756,7 @@ steps:
environment:
GRAFANA_TEST_DB: mysql
MYSQL_HOST: mysql80
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: mysql-8.0-integration-tests
- commands:
- dockerize -wait tcp://redis:6379 -timeout 120s
@@ -2772,7 +2772,7 @@ steps:
- wait-for-redis
environment:
REDIS_URL: redis://redis:6379/0
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: redis-integration-tests
- commands:
- dockerize -wait tcp://memcached:11211 -timeout 120s
@@ -2788,7 +2788,7 @@ steps:
- wait-for-memcached
environment:
MEMCACHED_HOSTS: memcached:11211
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: memcached-integration-tests
- commands:
- dockerize -wait tcp://mimir_backend:8080 -timeout 120s
@@ -2805,7 +2805,7 @@ steps:
AM_TENANT_ID: test
AM_URL: http://mimir_backend:8080
failure: ignore
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: remote-alertmanager-integration-tests
trigger:
branch: main
@@ -3067,7 +3067,7 @@ steps:
- apk add --update make
- CODEGEN_VERIFY=1 make gen-cue
depends_on: []
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: verify-gen-cue
- commands:
- '# It is required that generated jsonnet is committed and in sync with its inputs.'
@@ -3076,21 +3076,21 @@ steps:
- apk add --update make
- CODEGEN_VERIFY=1 make gen-jsonnet
depends_on: []
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: verify-gen-jsonnet
- commands:
- apk add --update make
- make gen-go
depends_on:
- verify-gen-cue
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: wire-install
- commands:
- apk add --update build-base shared-mime-info shared-mime-info-lang
- go list -f '{{.Dir}}/...' -m | xargs go test -short -covermode=atomic -timeout=5m
depends_on:
- wire-install
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: test-backend
- commands:
- apk add --update build-base
@@ -3099,7 +3099,7 @@ steps:
| grep -o '\(.*\)/' | sort -u)
depends_on:
- wire-install
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: test-backend-integration
trigger:
branch:
@@ -3142,22 +3142,22 @@ steps:
depends_on: []
environment:
CGO_ENABLED: 0
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: compile-build-cmd
- commands:
- apk add --update make
- make gen-go
depends_on: []
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: wire-install
- commands:
- go run scripts/modowners/modowners.go check go.mod
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: validate-modfile
- commands:
- apk add --update make
- make swagger-validate
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: validate-openapi-spec
trigger:
branch:
@@ -3247,7 +3247,7 @@ steps:
depends_on: []
environment:
CGO_ENABLED: 0
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: compile-build-cmd
- commands:
- echo $DRONE_RUNNER_NAME
@@ -3261,7 +3261,7 @@ steps:
- apk add --update make
- CODEGEN_VERIFY=1 make gen-cue
depends_on: []
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: verify-gen-cue
- commands:
- '# It is required that generated jsonnet is committed and in sync with its inputs.'
@@ -3270,14 +3270,14 @@ steps:
- apk add --update make
- CODEGEN_VERIFY=1 make gen-jsonnet
depends_on: []
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: verify-gen-jsonnet
- commands:
- apk add --update make
- make gen-go
depends_on:
- verify-gen-cue
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: wire-install
- commands:
- dockerize -wait tcp://postgres:5432 -timeout 120s
@@ -3298,7 +3298,7 @@ steps:
GRAFANA_TEST_DB: postgres
PGPASSWORD: grafanatest
POSTGRES_HOST: postgres
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: postgres-integration-tests
- commands:
- dockerize -wait tcp://mysql57:3306 -timeout 120s
@@ -3306,9 +3306,9 @@ steps:
name: wait-for-mysql-5.7
- commands:
- apk add --update build-base
- apk add --update mysql-client
- cat devenv/docker/blocks/mysql_tests/setup.sql | mysql -h mysql57 -P 3306 -u root
-prootpass
- apk add --update mariadb-client
- cat devenv/docker/blocks/mysql_tests/setup.sql | mariadb -h mysql57 -P 3306 -u
root -prootpass --disable-ssl-verify-server-cert
- go clean -testcache
- go test -p=1 -count=1 -covermode=atomic -timeout=5m -run '^TestIntegration' $(find
./pkg -type f -name '*_test.go' -exec grep -l '^func TestIntegration' '{}' '+'
@@ -3319,7 +3319,7 @@ steps:
environment:
GRAFANA_TEST_DB: mysql
MYSQL_HOST: mysql57
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: mysql-5.7-integration-tests
- commands:
- dockerize -wait tcp://mysql80:3306 -timeout 120s
@@ -3327,9 +3327,9 @@ steps:
name: wait-for-mysql-8.0
- commands:
- apk add --update build-base
- apk add --update mysql-client
- cat devenv/docker/blocks/mysql_tests/setup.sql | mysql -h mysql80 -P 3306 -u root
-prootpass
- apk add --update mariadb-client
- cat devenv/docker/blocks/mysql_tests/setup.sql | mariadb -h mysql80 -P 3306 -u
root -prootpass --disable-ssl-verify-server-cert
- go clean -testcache
- go test -p=1 -count=1 -covermode=atomic -timeout=5m -run '^TestIntegration' $(find
./pkg -type f -name '*_test.go' -exec grep -l '^func TestIntegration' '{}' '+'
@@ -3340,7 +3340,7 @@ steps:
environment:
GRAFANA_TEST_DB: mysql
MYSQL_HOST: mysql80
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: mysql-8.0-integration-tests
- commands:
- dockerize -wait tcp://redis:6379 -timeout 120s
@@ -3356,7 +3356,7 @@ steps:
- wait-for-redis
environment:
REDIS_URL: redis://redis:6379/0
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: redis-integration-tests
- commands:
- dockerize -wait tcp://memcached:11211 -timeout 120s
@@ -3372,7 +3372,7 @@ steps:
- wait-for-memcached
environment:
MEMCACHED_HOSTS: memcached:11211
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: memcached-integration-tests
- commands:
- dockerize -wait tcp://mimir_backend:8080 -timeout 120s
@@ -3389,7 +3389,7 @@ steps:
AM_TENANT_ID: test
AM_URL: http://mimir_backend:8080
failure: ignore
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: remote-alertmanager-integration-tests
trigger:
branch:
@@ -3492,7 +3492,7 @@ steps:
depends_on: []
environment:
CGO_ENABLED: 0
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: compile-build-cmd
- commands:
- ./bin/build artifacts docker fetch --edition oss
@@ -3624,7 +3624,7 @@ steps:
depends_on: []
environment:
CGO_ENABLED: 0
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: compile-build-cmd
- commands:
- ./bin/build artifacts docker fetch --edition oss
@@ -3765,7 +3765,7 @@ steps:
depends_on: []
environment:
CGO_ENABLED: 0
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: compile-build-cmd
- commands:
- ./bin/build artifacts packages --artifacts-editions=oss --tag $${DRONE_TAG} --src-bucket
@@ -3856,7 +3856,7 @@ steps:
depends_on: []
environment:
CGO_ENABLED: 0
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: compile-build-cmd
- commands:
- yarn install --immutable || yarn install --immutable
@@ -3956,7 +3956,7 @@ steps:
depends_on: []
environment:
CGO_ENABLED: 0
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: compile-build-cmd
- depends_on:
- compile-build-cmd
@@ -4072,7 +4072,7 @@ steps:
from_secret: grafana_api_key
GCP_KEY_BASE64:
from_secret: gcp_key_base64
GO_VERSION: 1.22.7
GO_VERSION: 1.22.11
GPG_PASSPHRASE:
from_secret: packages_gpg_passphrase
GPG_PRIVATE_KEY:
@@ -4147,7 +4147,7 @@ steps:
from_secret: grafana_api_key
GCP_KEY_BASE64:
from_secret: gcp_key_base64
GO_VERSION: 1.22.7
GO_VERSION: 1.22.11
GPG_PASSPHRASE:
from_secret: packages_gpg_passphrase
GPG_PRIVATE_KEY:
@@ -4204,13 +4204,13 @@ steps:
depends_on: []
environment:
CGO_ENABLED: 0
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: compile-build-cmd
- commands:
- ./bin/build whatsnew-checker
depends_on:
- compile-build-cmd
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: whats-new-checker
trigger:
event:
@@ -4309,7 +4309,7 @@ steps:
from_secret: grafana_api_key
GCP_KEY_BASE64:
from_secret: gcp_key_base64
GO_VERSION: 1.22.7
GO_VERSION: 1.22.11
GPG_PASSPHRASE:
from_secret: packages_gpg_passphrase
GPG_PRIVATE_KEY:
@@ -4460,7 +4460,7 @@ steps:
- apk add --update make
- CODEGEN_VERIFY=1 make gen-cue
depends_on: []
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: verify-gen-cue
- commands:
- '# It is required that generated jsonnet is committed and in sync with its inputs.'
@@ -4469,21 +4469,21 @@ steps:
- apk add --update make
- CODEGEN_VERIFY=1 make gen-jsonnet
depends_on: []
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: verify-gen-jsonnet
- commands:
- apk add --update make
- make gen-go
depends_on:
- verify-gen-cue
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: wire-install
- commands:
- apk add --update build-base shared-mime-info shared-mime-info-lang
- go list -f '{{.Dir}}/...' -m | xargs go test -short -covermode=atomic -timeout=5m
depends_on:
- wire-install
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: test-backend
- commands:
- apk add --update build-base
@@ -4492,7 +4492,7 @@ steps:
| grep -o '\(.*\)/' | sort -u)
depends_on:
- wire-install
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: test-backend-integration
trigger:
cron:
@@ -4546,7 +4546,7 @@ steps:
from_secret: grafana_api_key
GCP_KEY_BASE64:
from_secret: gcp_key_base64
GO_VERSION: 1.22.7
GO_VERSION: 1.22.11
GPG_PASSPHRASE:
from_secret: packages_gpg_passphrase
GPG_PRIVATE_KEY:
@@ -4690,7 +4690,7 @@ steps:
from_secret: grafana_api_key
GCP_KEY_BASE64:
from_secret: gcp_key_base64
GO_VERSION: 1.22.7
GO_VERSION: 1.22.11
GPG_PASSPHRASE:
from_secret: packages_gpg_passphrase
GPG_PRIVATE_KEY:
@@ -4796,7 +4796,7 @@ steps:
- export GITHUB_TOKEN=$(cat /github-app/token)
- 'dagger run --silent /src/grafana-build artifacts -a $${ARTIFACTS} --grafana-ref=$${GRAFANA_REF}
--enterprise-ref=$${ENTERPRISE_REF} --grafana-repo=$${GRAFANA_REPO} --version=$${VERSION} '
- --go-version=1.22.7
- --go-version=1.22.11
depends_on:
- github-app-generate-token
environment:
@@ -4817,7 +4817,7 @@ steps:
from_secret: grafana_api_key
GCP_KEY_BASE64:
from_secret: gcp_key_base64
GO_VERSION: 1.22.7
GO_VERSION: 1.22.11
GPG_PASSPHRASE:
from_secret: packages_gpg_passphrase
GPG_PRIVATE_KEY:
@@ -4962,7 +4962,7 @@ steps:
- apk add --update make
- CODEGEN_VERIFY=1 make gen-cue
depends_on: []
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: verify-gen-cue
- commands:
- '# It is required that generated jsonnet is committed and in sync with its inputs.'
@@ -4971,14 +4971,14 @@ steps:
- apk add --update make
- CODEGEN_VERIFY=1 make gen-jsonnet
depends_on: []
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: verify-gen-jsonnet
- commands:
- apk add --update make
- make gen-go
depends_on:
- verify-gen-cue
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: wire-install
- commands:
- dockerize -wait tcp://postgres:5432 -timeout 120s
@@ -4999,7 +4999,7 @@ steps:
GRAFANA_TEST_DB: postgres
PGPASSWORD: grafanatest
POSTGRES_HOST: postgres
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: postgres-integration-tests
- commands:
- dockerize -wait tcp://mysql57:3306 -timeout 120s
@@ -5007,9 +5007,9 @@ steps:
name: wait-for-mysql-5.7
- commands:
- apk add --update build-base
- apk add --update mysql-client
- cat devenv/docker/blocks/mysql_tests/setup.sql | mysql -h mysql57 -P 3306 -u root
-prootpass
- apk add --update mariadb-client
- cat devenv/docker/blocks/mysql_tests/setup.sql | mariadb -h mysql57 -P 3306 -u
root -prootpass --disable-ssl-verify-server-cert
- go clean -testcache
- go test -p=1 -count=1 -covermode=atomic -timeout=5m -run '^TestIntegration' $(find
./pkg -type f -name '*_test.go' -exec grep -l '^func TestIntegration' '{}' '+'
@@ -5020,7 +5020,7 @@ steps:
environment:
GRAFANA_TEST_DB: mysql
MYSQL_HOST: mysql57
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: mysql-5.7-integration-tests
- commands:
- dockerize -wait tcp://mysql80:3306 -timeout 120s
@@ -5028,9 +5028,9 @@ steps:
name: wait-for-mysql-8.0
- commands:
- apk add --update build-base
- apk add --update mysql-client
- cat devenv/docker/blocks/mysql_tests/setup.sql | mysql -h mysql80 -P 3306 -u root
-prootpass
- apk add --update mariadb-client
- cat devenv/docker/blocks/mysql_tests/setup.sql | mariadb -h mysql80 -P 3306 -u
root -prootpass --disable-ssl-verify-server-cert
- go clean -testcache
- go test -p=1 -count=1 -covermode=atomic -timeout=5m -run '^TestIntegration' $(find
./pkg -type f -name '*_test.go' -exec grep -l '^func TestIntegration' '{}' '+'
@@ -5041,7 +5041,7 @@ steps:
environment:
GRAFANA_TEST_DB: mysql
MYSQL_HOST: mysql80
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: mysql-8.0-integration-tests
- commands:
- dockerize -wait tcp://redis:6379 -timeout 120s
@@ -5057,7 +5057,7 @@ steps:
- wait-for-redis
environment:
REDIS_URL: redis://redis:6379/0
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: redis-integration-tests
- commands:
- dockerize -wait tcp://memcached:11211 -timeout 120s
@@ -5073,7 +5073,7 @@ steps:
- wait-for-memcached
environment:
MEMCACHED_HOSTS: memcached:11211
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: memcached-integration-tests
- commands:
- dockerize -wait tcp://mimir_backend:8080 -timeout 120s
@@ -5090,7 +5090,7 @@ steps:
AM_TENANT_ID: test
AM_URL: http://mimir_backend:8080
failure: ignore
image: golang:1.22.7-alpine
image: golang:1.22.11-alpine
name: remote-alertmanager-integration-tests
trigger:
event:
@@ -5396,7 +5396,7 @@ steps:
- commands:
- trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM docker:27-cli
- trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM alpine/git:2.40.1
- trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM golang:1.22.7-alpine
- trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM golang:1.22.11-alpine
- trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM node:20.9.0-alpine
- trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM node:20-bookworm
- trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM google/cloud-sdk:431.0.0
@@ -5435,7 +5435,7 @@ steps:
- commands:
- trivy --exit-code 1 --severity HIGH,CRITICAL docker:27-cli
- trivy --exit-code 1 --severity HIGH,CRITICAL alpine/git:2.40.1
- trivy --exit-code 1 --severity HIGH,CRITICAL golang:1.22.7-alpine
- trivy --exit-code 1 --severity HIGH,CRITICAL golang:1.22.11-alpine
- trivy --exit-code 1 --severity HIGH,CRITICAL node:20.9.0-alpine
- trivy --exit-code 1 --severity HIGH,CRITICAL node:20-bookworm
- trivy --exit-code 1 --severity HIGH,CRITICAL google/cloud-sdk:431.0.0
@@ -5705,6 +5705,6 @@ kind: secret
name: gcr_credentials
---
kind: signature
hmac: 3ef977010db0181ed37aef50714e0065522f03635866b172669998a03274e918
hmac: a63863f55ce7646ca090c519b4ba3c4ff8103b071097f827eafb7bad1aafcaac
...
+1 -1
View File
@@ -3,7 +3,7 @@
ARG BASE_IMAGE=alpine:3.19.1
ARG JS_IMAGE=node:20-alpine
ARG JS_PLATFORM=linux/amd64
ARG GO_IMAGE=golang:1.22.7-alpine
ARG GO_IMAGE=golang:1.22.11-alpine
ARG GO_SRC=go-builder
ARG JS_SRC=js-builder
+1 -1
View File
@@ -8,7 +8,7 @@ WIRE_TAGS = "oss"
include .bingo/Variables.mk
GO = go
GO_VERSION = 1.22.7
GO_VERSION = 1.22.11
GO_LINT_FILES ?= $(shell ./scripts/go-workspace/golangci-lint-includes.sh)
GO_TEST_FILES ?= $(shell ./scripts/go-workspace/test-includes.sh)
SH_FILES ?= $(shell find ./scripts -name *.sh)
+1 -1
View File
@@ -1,6 +1,6 @@
module github.com/grafana/grafana
go 1.22.7
go 1.22.11
// contains openapi encoder fixes. remove ASAP
replace cuelang.org/go => github.com/grafana/cue v0.0.0-20230926092038-971951014e3f // @grafana/grafana-as-code
+1 -1
View File
@@ -1,4 +1,4 @@
go 1.22.7
go 1.22.11
// The `skip:golangci-lint` comment tag is used to exclude the package from the `golangci-lint` GitHub Action.
// The module at the root of the repo (`.`) is excluded because ./pkg/... is included manually in the `golangci-lint` configuration.
+2 -2
View File
@@ -1052,8 +1052,8 @@ def postgres_integration_tests_steps():
def mysql_integration_tests_steps(hostname, version):
cmds = [
"apk add --update mysql-client",
"cat devenv/docker/blocks/mysql_tests/setup.sql | mysql -h {} -P 3306 -u root -prootpass".format(hostname),
"apk add --update mariadb-client", # alpine doesn't package mysql anymore; more info: https://wiki.alpinelinux.org/wiki/MySQL
"cat devenv/docker/blocks/mysql_tests/setup.sql | mariadb -h {} -P 3306 -u root -prootpass --disable-ssl-verify-server-cert".format(hostname),
"go clean -testcache",
"go test -p=1 -count=1 -covermode=atomic -timeout=5m -run '^TestIntegration' $(find ./pkg -type f -name '*_test.go' -exec grep -l '^func TestIntegration' '{}' '+' | grep -o '\\(.*\\)/' | sort -u)",
]
+1 -1
View File
@@ -3,7 +3,7 @@ global variables
"""
grabpl_version = "v3.1.1"
golang_version = "1.22.7"
golang_version = "1.22.11"
# nodejs_version should match what's in ".nvmrc", but without the v prefix.
nodejs_version = "20.9.0"