Skip to content

Commit

Permalink
[v9.5.x] Chore: Upgrade go to 1.21.10 (#87478)
Browse files Browse the repository at this point in the history
* [v9.5.x] Chore: Upgrade go to 1.21.10

---------

Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
Co-authored-by: Kevin Minehart <kmineh0151@gmail.com>
Co-authored-by: Dave Henderson <dave.henderson@grafana.com>
Co-authored-by: Matias Chomicki <matyax@gmail.com>
  • Loading branch information
4 people committed May 10, 2024
1 parent 445da17 commit 9f682fb
Show file tree
Hide file tree
Showing 12 changed files with 114 additions and 109 deletions.
198 changes: 99 additions & 99 deletions .drone.yml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
name: Set go version
uses: actions/setup-go@v3
with:
go-version: '1.21.8'
go-version: '1.21.10'

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-codeql-analysis-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Set go version
uses: actions/setup-go@v3
with:
go-version: '1.21.8'
go-version: '1.21.10'

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
ARG BASE_IMAGE=alpine:3.19.1
ARG JS_IMAGE=node:18-alpine
ARG JS_PLATFORM=linux/amd64
ARG GO_IMAGE=golang:1.21.8-alpine
ARG GO_IMAGE=golang:1.21.10-alpine

ARG GO_SRC=go-builder
ARG JS_SRC=js-builder
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ build-docker-full-ubuntu: ## Build Docker image based on Ubuntu for development.
--build-arg COMMIT_SHA=$$(git rev-parse HEAD) \
--build-arg BUILD_BRANCH=$$(git rev-parse --abbrev-ref HEAD) \
--build-arg BASE_IMAGE=ubuntu:22.04 \
--build-arg GO_IMAGE=golang:1.21.8 \
--build-arg GO_IMAGE=golang:1.21.10 \
--tag grafana/grafana$(TAG_SUFFIX):dev-ubuntu \
$(DOCKER_BUILD_ARGS)

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/grafana/grafana

go 1.19
go 1.21.10

// Override xorm's outdated go-mssqldb dependency, since we can't upgrade to current xorm (due to breaking changes).
// We need a more current go-mssqldb so we get rid of a version of apache/thrift with vulnerabilities.
Expand Down
1 change: 1 addition & 0 deletions pkg/services/sqlstore/session_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ func TestRetryingOnFailures(t *testing.T) {
require.NoError(t, err)
})
require.NoError(t, err)
require.NoError(t, rows.Err())
require.True(t, rows.Next()) // first row

str1 := ""
Expand Down
1 change: 1 addition & 0 deletions pkg/services/store/entity/sqlstash/folder_support.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ func updateFolderTree(ctx context.Context, tx *session.SessionTx, tenant int64)
}

all := []*folderInfo{}
//nolint:rowserrcheck
rows, err := tx.Query(ctx, "SELECT uid,folder,name,slug FROM entity WHERE kind=? AND tenant_id=? ORDER BY slug asc;",
entity.StandardKindFolder, tenant)
if err != nil {
Expand Down
6 changes: 6 additions & 0 deletions pkg/services/store/entity/sqlstash/sql_storage_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ func (s *sqlEntityServer) readFromHistory(ctx context.Context, r *entity.ReadEnt
"updated_at", "updated_by",
}

//nolint:rowserrcheck
rows, err := s.sess.Query(ctx,
"SELECT "+strings.Join(fields, ",")+
" FROM entity_history WHERE grn=? AND version=?", oid, r.Version)
Expand Down Expand Up @@ -473,6 +474,7 @@ func (s *sqlEntityServer) fillCreationInfo(ctx context.Context, tx *session.Sess
createdBy = &ignore
}

//nolint:rowserrcheck
rows, err := tx.Query(ctx, "SELECT created_at,created_by FROM entity WHERE grn=?", grn)
if err != nil {
return err
Expand All @@ -494,6 +496,8 @@ func (s *sqlEntityServer) selectForUpdate(ctx context.Context, tx *session.Sessi
if false { // TODO, MYSQL/PosgreSQL can lock the row " FOR UPDATE"
q += " FOR UPDATE"
}

//nolint:rowserrcheck
rows, err := tx.Query(ctx, q, grn)
if err != nil {
return nil, err
Expand Down Expand Up @@ -695,6 +699,7 @@ func (s *sqlEntityServer) History(ctx context.Context, r *entity.EntityHistoryRe
" WHERE grn=? " + page + "\n" +
" ORDER BY updated_at DESC LIMIT 100"

//nolint:rowserrcheck
rows, err := s.sess.Query(ctx, query, args...)
if err != nil {
return nil, err
Expand Down Expand Up @@ -780,6 +785,7 @@ func (s *sqlEntityServer) Search(ctx context.Context, r *entity.EntitySearchRequ

query, args := entityQuery.toQuery()

//nolint:rowserrcheck
rows, err := s.sess.Query(ctx, query, args...)
if err != nil {
return nil, err
Expand Down
3 changes: 0 additions & 3 deletions pkg/web/macaron.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
//go:build go1.3
// +build go1.3

// Copyright 2014 The Macaron Authors
//
// Licensed under the Apache License, Version 2.0 (the "License"): you may
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jest.mock('@grafana/data', () => ({

const now = dateTime().valueOf();
const intervalInSeconds = 60 * 5;
const endInput = encodeURIComponent(dateTime(now).add(5, 'hours').format('Y-MM-DD HH:mm'));
const endInput = encodeURIComponent(dateTime(now).utc().format('Y-MM-DD HH:mm'));

const getPanelData = (panelDataOverrides?: Partial<PanelData>) => {
const panelData = {
Expand Down
2 changes: 1 addition & 1 deletion scripts/drone/variables.star
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ global variables
"""

grabpl_version = "v3.0.50"
golang_version = "1.21.8"
golang_version = "1.21.10"

# nodejs_version should match what's in ".nvmrc", but without the v prefix.
nodejs_version = "18.12.0"

0 comments on commit 9f682fb

Please sign in to comment.